[FFmpeg-devel] [PATCH]Simplify some palette calculations

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Nov 14 08:51:10 CET 2011


On 13 Nov 2011, at 20:11, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> As suggested by Reimar.
> 
> Please comment, Carl 

&a[0] is the same as just a.
As for the comment Michael had, for example a & ~0x03030303 after the shift would make the new code equivalent.
I am not sure what is correct, but I think a lot of other palette handling code has this same issue of giving weird results if there are more than 6 bits set in the palette variable.
I wonder whether all those shouldn't be using VGA palette and rotate the highest two bits in each byte in the lowest bit instead of shifting them up into the next component.


More information about the ffmpeg-devel mailing list