Patent attributes
An palette index map of a video coding unit may be flipped during palette coding if a large run of similar pixels are present at the beginning of the coding unit and a small run of similar pixels are present at the end of the coding unit. The flipping may enable efficient signaling and coding of the large run of pixels. An indication may be sent signaling the flipping. During decoding, an inverse flip may be performed to restore the pixels of the flipped coding unit to their original positions. Selection of a prediction mode for palette coding may take into account various combinations of an index mode run followed by a copy-above mode run. A prediction mode with die smallest per-pixel average bit cost may be selected. Palette sharing may be enabled.