[FFmpeg-devel] [PATCH] lavc/rawdec: Only use AV_PIX_FMT_PAL8 for 1 bpp video
michael at niedermayer.cc
Sun Jan 31 15:27:25 CET 2016
On Sun, Jan 31, 2016 at 03:16:46PM +0100, Mats Peterson wrote:
> On 01/31/2016 03:07 PM, Michael Niedermayer wrote:
> >indeed, i should have clearly stated that i applied the pal8
> >patches with the plan to use pal8 only when neccessary.
> >I had asked you to implement exactly that but it seemed you didnt
> >know how to do that cleanly and simply so i thought "no problem,
> >i know how to do that, ill do it"
> >i had not expected this to be controversal
> Well, it would have been nice to know that you did it at least. I
> had no idea until you mentioned it.
> >basically 100% of avis with monowhite are black&white, we do not have
> >a single (no craftet) sample that contains paletted monochrome data
> >in avi.
> >IMHO its bizare to convert black and white 1 bpp data in the decoder
> >to 8bit paletted data
> >we reject colorspace/pixel format converting in the decoder normally
> >unless its somehow a mess otherwise.
> >and its a problem to for using the output because an encoder has to
> >deal and encode 8bit paletted data from such avis even though they
> >really are just black and white if pal8 is used
> It's not bizarre at all. Black & white is just a variant of
> palettized data in this context, it's not monochrome. And just
> because you don't have a non-b/w sample, it doesn't mean you should
> use monow. A 1 bpp AVI is not monochrome once again, it's
> palettized, even if it's only with black & white. The same semantics
> as with 1 bpp depth in QuickTime.
well, avi is a "old" format and ive worked with avis and maintained
the avi demuxer for a long time. So if i dont remember a paletted 1bpp
avi thats some indication that these would be rather rare if they
exist at all
> And since you don't have a "pal2" or "pal4" format, it suddenly
> seems perfectly OK to convert this to pal8? THere's no logic in
the problem is what happens with the data after the rawvideo decoder
if its to be stored in a file the encoder will store 8bit paletted data
(if it supports that) vs. 1bit monochrome data (if it supports that)
making generated files potentially several times bigger
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: Digital signature
More information about the ffmpeg-devel