[FFmpeg-devel] Color quantization for GIF v2

Clément Bœsch u at pkh.me
Mon Feb 9 18:35:08 CET 2015

Hi folks,

TL;DR: http://lucy.pkh.me/ffgif/outputs/ (note: this page is heavy; over 200M)

So here is the new version of the patchset. Many changes since previous time,
here is a summary:

palettegen filter:
  • added max_colors and stats_mode options
  • RGB 5:5:5 to full resolution RGB (24 bits) using a hashtable for the

paletteuse filter:
  • new error dithering methods
  • added an option to tweak the scaling (intensity) of the bayer dithering
  • RGB 5:5:5 to full resolution RGB (24 bits) using a kdtree for the lookup

  • still no FATE test, sorry
  • slow, especially the color nearest lookup in paletteuse
  • palettegen could be improved, see the TODOs
  • we might still want to consider a per frame palette approach
  • still no nice deterministic dithering
  • 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.

More information about the ffmpeg-devel mailing list