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

Michael Niedermayer michaelni
Fri Mar 20 19:42:47 CET 2009


On Fri, Mar 20, 2009 at 07:39:54PM +0100, Reimar D?ffinger wrote:
> 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?

removing the palette for gray8 will require a special case in all paletted
encoders. I think this is worse than fixing whatever failed to set the
palette and the code that dumps it into a raw file

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090320/813bcb6d/attachment.pgp>



More information about the ffmpeg-devel mailing list