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

Michael Niedermayer michael at niedermayer.cc
Sat Feb 20 22:24:07 CET 2016


On Sat, Feb 20, 2016 at 05:41:40PM +0000, Derek Buitenhuis 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.

yes, i posted a patch that would have maintained API more but people
did not like it

peer review said:
"> I'd totally expect each line _and_ the start of the palette to be
 > aligned to the requested slignment.

 It's what I would expect as well."

so i did that and i added the check above to catch the case where
this results in unaligned AVFrame.
dependig on how the AVFrame is used that can be a problem or can also
be no problem.

should i remove this check ? (this would be undefined behavior if
someone accesses the palette with int*, i belive there is some code in
our codebase which does this ...)

should i replace it by a warning ?

should i revert the whole patchset (that will result in generated raw
rgb files to be invalid for nut, avi and mov)

should i revert this and apply the other patchset that maintains API
more but that was rejected by people ?

do you suggest something else ?
also iam very happy to leave this to others, if someone else wants to
take over, its rather difficult to implement this in a way that makes
everyone happy.


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- 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/20160220/26ba5a54/attachment.sig>


More information about the ffmpeg-devel mailing list