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

Mats Peterson matsp888 at yahoo.com
Sun Jan 31 23:11:31 CET 2016


On 01/31/2016 11:08 PM, Michael Niedermayer wrote:
> On Sun, Jan 31, 2016 at 10:53:35PM +0100, Mats Peterson wrote:
>> On 01/31/2016 10:49 PM, Mats Peterson wrote:
>>>> this decission should be made by other developers, who where not
>>>> involved in this disagreement, that should result in a outcome that
>>>> represents the preferrances of the community better.
>>>>
>>>
>>> wm4 is already on my side, as far as I understand.
>>>
>>
>> Just because we have monow and monob pixel formats, it doesn't mean
>> they should be used wherever 1 bpp data is involved. And once again,
>> the semantics according to Microsoft are that 1 bpp AVI is NEVER
>> monochrome, it is ALWAYS palettized, regardless of the number of
>> colors, or whether they are black & white or not. And implementing
>> "mono switches" for 1 bpp depth for every file format involves
>> writing a lot of superfluous code just for this, and in the case of
>> qtrle, creating a whole new loop for the 1 bpp case. Overkill.
>
> i did not suggest that.
> my suggestion is just about the raw video decoder, that is if a
> AVPacket contains monochrome 1bpp black/white data without a palette
> that this is passed through and not converted to pal8
>

I thought you did, since you once said "this can be done for qtrle as 
well". And using monow for the single case of a 1 bpp AVI without a 
palette is a bit far fetched to me, since AVIs are never monochrome. 
That's why i initialize a default palette in raw_init_decoder() once again.

Mats



More information about the ffmpeg-devel mailing list