[FFmpeg-devel] [PATCH] pixdesc: remove PIX_FMT_FLAG flag from pixel formats which are *not* paletted

Stefano Sabatini stefano.sabatini-lala at poste.it
Wed Aug 3 18:28:03 CEST 2011

On date Monday 2011-08-01 09:01:32 +0200, Michael Niedermayer encoded:
> On Thu, Jul 28, 2011 at 01:27:31PM +0200, Stefano Sabatini wrote:
> > The flag was required for an hack in libswscale. Since now libswscale
> > distinguishes between formats which store palette in the image, and
> > formats which use it internally in libswscale, the flag is no longer
> > required.
> treating 8 bit per pixel formats like paletted formats is not only
> usefull in swscale. But also can be usefull in other filters, like
> contrast/brightness/gamma filters. For them for example its just needed
> to apply the change to the palette and then switch the pix format to
> PAL8

> of course that can be done  without the flag too but the flag 
> might lead to slightly simpler code somewhere, not a major thing though

Simpler code somewhere, and obfuscated/special-cased code everywhere
else. So I'd tend to keep things clear, and name things for what they
FFmpeg = Formidable & Fundamental Meaningful Practical Erudite God

More information about the ffmpeg-devel mailing list