[FFmpeg-devel] [PATCH] get rid of nonsense palette pointer for RGB8, GRAY8 etc.

Reimar Döffinger Reimar.Doeffinger
Fri Mar 20 19:39:54 CET 2009

On Fri, Mar 20, 2009 at 07:10:25PM +0100, Michael Niedermayer wrote:
> On Fri, Mar 20, 2009 at 06:40:57PM +0100, Reimar D?ffinger wrote:
> > Hello,
> > I have no idea why that code came to be like that, but I know for sure
> > it causes regression tests to fail because the silly copyPlanar function
> > things that palette pointer is the U plane it needs to copy.
> > Probably that function should be fixed anyway, but this change still
> > seems right:
> pixfmt.h says:
>  * For all the 8bit per pixel formats, an RGB32 palette is in data[1] like
>  * for pal8. This palette is filled in automatically by the function
>  * allocating the picture.

At least for GRAY8 this seems more than questionable.
Particularly since as explained in the other email the palette is all-0
for it currently.
To verify after "make libavtest" run:
./ffmpeg_g -y -flags +bitexact -dct fastint -idct simple -sws_flags +accurate_rnd+bitexact -f image2pipe -i ././tests/data/b-pgmpipe.pgm -f rawvideo test.raw

> so indeed a palette should be in data[1]

Seems like it is part of the API, but given that it never worked for
GRAY8 anyway, could I convince you to change the (documented, not actual
since it never worked beyond providing the memory for the palette, but
not the correct contents) API for that format?

More information about the ffmpeg-devel mailing list