[FFmpeg-devel] Color quantization for GIF v2
Clément Bœsch
u at pkh.me
Tue Feb 10 18:33:48 CET 2015
On Mon, Feb 09, 2015 at 06:35:08PM +0100, Clément Bœsch wrote:
[...]
> • I added many debug utils (understand: dead code) in palettegen which is
> very useful for debugging and error checking. I'd like to keep them if no
> one mind. For example, it allows generating pictures such as
> https://lut.im/uqeEiTF3/zscEoFRw to debug the lookup color 3d tree.
I transformed most of them into options. I'll send a new patch when this is
completely done.
And for the record, here are the benchmark of the different search algorithms:
[~/src/ffmpeg]☭ for i in 1 2 3; do time ./ffmpeg -v error -i legend.m4v -i palette.png -lavfi paletteuse=dither=sierra2_4a:color_search=nns_iterative -y out-dither-sierra2_4a.gif; done
./ffmpeg -v error -i legend.m4v -i palette.png -lavfi - 8.29s user 0.04s system 102% cpu 8.110 total
./ffmpeg -v error -i legend.m4v -i palette.png -lavfi - 8.23s user 0.05s system 101% cpu 8.185 total
./ffmpeg -v error -i legend.m4v -i palette.png -lavfi - 8.29s user 0.04s system 99% cpu 8.345 total
[~/src/ffmpeg]☭ for i in 1 2 3; do time ./ffmpeg -v error -i legend.m4v -i palette.png -lavfi paletteuse=dither=sierra2_4a:color_search=nns_recursive -y out-dither-sierra2_4a.gif; done
./ffmpeg -v error -i legend.m4v -i palette.png -lavfi - 8.63s user 0.03s system 102% cpu 8.443 total
./ffmpeg -v error -i legend.m4v -i palette.png -lavfi - 8.70s user 0.01s system 100% cpu 8.704 total
./ffmpeg -v error -i legend.m4v -i palette.png -lavfi - 8.62s user 0.04s system 99% cpu 8.691 total
[~/src/ffmpeg]☭ for i in 1 2 3; do time ./ffmpeg -v error -i legend.m4v -i palette.png -lavfi paletteuse=dither=sierra2_4a:color_search=bruteforce -y out-dither-sierra2_4a.gif; done
./ffmpeg -v error -i legend.m4v -i palette.png -lavfi - 29.45s user 0.04s system 100% cpu 29.301 total
./ffmpeg -v error -i legend.m4v -i palette.png -lavfi - 29.35s user 0.04s system 99% cpu 29.430 total
./ffmpeg -v error -i legend.m4v -i palette.png -lavfi - 29.59s user 0.05s system 100% cpu 29.424 total
(i7-3520M, 6 seconds video in 512x512; and yes, this is slower than real time.)
--
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/20150210/32621e6c/attachment.asc>
More information about the ffmpeg-devel
mailing list