[FFmpeg-devel] [PATCH] lavc/rawdec: Only use AV_PIX_FMT_PAL8 for 1 bpp video

Mats Peterson matsp888 at yahoo.com
Sun Jan 31 22:26:07 CET 2016


On 01/31/2016 10:08 PM, Mats Peterson wrote:
>
> Even if you stubbornly decide to keep your patch, it is incorrect
> anyway. If a 1 bpp AVI contains a palette, black & white or not, pal8
> will be used regardless. Look at the snippet below. Furthermore, the
> palette side data packet will be retrieved twice, both here and at the
> end of the raw_decode() function.
>
> Don't you agree that it just creates a lot of unnecessary code noise to
> have to do this "switching" uniformly for 1 bpp in all file formats? I
> suggest you apply my patch, and we will get rid of stuff like this.
>

You'll have to look at the palette in the side data to decide if it's 
"mono" or not. And for qtrle one would have to add code for the special 
case of handling 1 bpp data. A lot of extra code for nothing.

Mats



More information about the ffmpeg-devel mailing list