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

Michael Niedermayer michael at niedermayer.cc
Sun Jan 31 23:19:46 CET 2016

On Sun, Jan 31, 2016 at 11:11:31PM +0100, Mats Peterson wrote:
> 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".

yes, "can" litterally, one can do it, but iam not suggesting that
this should be done (or should not be done)

> 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.

i think that default palette code could be removed if 1bpp->pal8
isnt done when theres no palete

also i dont think its just avi. The raw video decoder is potentially
used for more than avi.
mkv and nut come to mind as potential formats that might use the
same codepath

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160131/c7e8a340/attachment.sig>

More information about the ffmpeg-devel mailing list