[FFmpeg-devel] [PATCH] avfilter/palettegen: use AV_QSORT()

Clément Bœsch u at pkh.me
Thu Feb 26 14:20:51 CET 2015


On Wed, Feb 25, 2015 at 06:55:48PM +0100, Michael Niedermayer wrote:
> On Wed, Feb 25, 2015 at 04:10:44PM +0100, Clément Bœsch wrote:
> > From: Clément Bœsch <clement at stupeflix.com>
> > 
> > This makes the sorting of the colors along an axis (r, g or b)
> > predictible, and thus testable under FATE. The performance is not really
> > an issue here since the function is called only once at the end and will
> > need to sort very small number of entries, so an alternative would be to
> > make the sorting functions (see DECLARE_CMP_FUNC()) fallback on another
> > axis in case of equality. This approach was actually simpler.
> > 
> > I don't know if there is any advantage in using a multidimensional sort,
> > but it will affect the final palette one way or another.
> > ---
> >  libavfilter/vf_palettegen.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> LGTM 
> 

Applied, thanks.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150226/23fdb7e6/attachment.asc>


More information about the ffmpeg-devel mailing list