[FFmpeg-devel] [FFmpeg-cvslog] avutil/imgutils: remove special case for aligning the palette

wm4 nfxjfg at googlemail.com
Sat Feb 20 18:56:28 CET 2016


On Sat, 20 Feb 2016 17:41:40 +0000
Derek Buitenhuis <derek.buitenhuis at gmail.com> wrote:

> > ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Feb 14 15:22:47 2016 +0100| [0eb4092c1bf4d74c3b9a65fb0dbe4f90d3a316d0] | committer: Michael Niedermayer  
> 
> [...]
> 
> > +        if (align < 4) {
> > +            av_log(NULL, AV_LOG_ERROR, "Formats with a palette require a minimum alignment of 4\n");
> > +            return AVERROR(EINVAL);
> > +        }  
> 
> This is a silent API break. You changed behavior of a function in such a way
> that functioning code no longer works.
> 
> See, for example: https://github.com/FFMS/ffms2/issues/256
> 
> The related bit of code: https://github.com/FFMS/ffms2/blob/7c2e08109d6097d5a644722ca7cfafa002203457/src/core/videosource.cpp#L159-L162
> 
> (Why the heck GRAY8 has a palette at all is also a bit WTF,
> but unrelated to my point here.)

It doesn't have a palette, but code processing images can choose to
treat it as paletted - which is why AVFrames must have a palette for
formats that are PSEUDOPAL.

In my opinion, this is ridiculous and should be removed.

Anyway, this has nothing to do that PSEUDOPAL formats do NOT store a
palette in binary streams etc.


More information about the ffmpeg-devel mailing list