Palette experiment: encode color indices based on context
The basic idea is to use a pixel’s neighboring colors as
context to predict its own color. Up to 4 neighbors are
considered here: left, left-above, above, right-above.
To reduce the number of contexts, the combination of any
4 (or less) colors are mapped to a reduced number of
patterns. For example, 1111, 2222, 3333, … , can be mapped
to the same pattern: AAAA. SImilarly, 1122, 1133, 2233, …,
can be mapped to the pattern AABB. In this way, the total
number of color contexts is reduced to 16.
This almost doubles the gain of palette coding on screen
content videos.
on screen_content
--enable-palette +14.2%
--enable-palette --enable-tx-skip +21.2%
on derflr
--enable-palette +0.12%
with all other experiments +6.16%