[FFmpeg-devel] [PATCH] avfilter/palettegen: use AV_QSORT()
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(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 473 bytes
Desc: not available
More information about the ffmpeg-devel