[FFmpeg-devel] [PATCH] avfilter/palettegen: use AV_QSORT()
Michael Niedermayer
michaelni at gmx.at
Wed Feb 25 18:55:48 CET 2015
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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150225/3e2b263c/attachment.asc>
More information about the ffmpeg-devel
mailing list