[FFmpeg-devel] [PATCH 5/6] avfilter: add paletteuse filter

Calvin Walton mailing-lists at kepstin.ca
Fri Jan 30 17:42:54 CET 2015


On Tue, 2015-01-27 at 14:20 +0100, Clément Bœsch wrote:
> On Sun, Jan 25, 2015 at 07:55:22PM +0100, Clément Bœsch wrote:
> > ---
> >  doc/filters.texi            |  31 +++++
> >  libavfilter/Makefile        |   1 +
> >  libavfilter/allfilters.c    |   1 +
> >  libavfilter/vf_paletteuse.c | 282 
> > ++++++++++++++++++++++++++++++++++++++++++++
> >  4 files changed, 315 insertions(+)
> >  create mode 100644 libavfilter/vf_paletteuse.c
> > 
> 
> So I did various improvements here by implementing various other 
> error
> diffusion based dithering methods: Floyd/Steinberg, Sierra2 and
> Sierra2-4A. All of them seem better than Heckbert. You can observe
> Heckbert vs Sierra4 here: https://lut.im/xAxNDhk4/lGZV0BS4
> 
> This match what's being said on
> http://www.efg2.com/Lab/Library/ImageProcessing/DHALF.TXT about the
> "false" Floyd-Steinberg filter, which is actually from Heckbert 
> paper.

I don't know if you've seen this, but 
http://bisqwit.iki.fi/story/howto/dither/jy/ has an interesting and 
detailed look through a bunch of positional dithering algorithms 
designed for animation that might be interesting.

> 
> Somehow, Sierra4 seems to produce smaller output here (but can't be 
> used
> as a generic rule, tested on only one input). Still, all these error
> diffusion ditherings make a huge impact on size:
> 
> -rw-r--r-- 1 ux ux  37M Jan 27 12:03 out-dither-floyd_steinberg.gif
> -rw-r--r-- 1 ux ux  38M Jan 27 12:03 out-dither-heckbert.gif
> -rw-r--r-- 1 ux ux 8.5M Jan 27 12:03 out-dither-none.gif
> -rw-r--r-- 1 ux ux  38M Jan 27 12:03 out-dither-sierra2_4a.gif
> -rw-r--r-- 1 ux ux  34M Jan 27 12:03 out-dither-sierra2.gif
> 
> So I'm currently trying to implement some ordered dithering to get a 
> way
> more stable output for mostly still images. If you have 
> recommendation on
> some dithering algorithm(s) I could test (it seems there are a bunch 
> of
> them out here), I'm all hear.
> 
> There are many improvement possible in this filter, notably on how 
> the
> color is chosen, but I will probably push this patchset at the end 
> of the
> week because the results are already good enough IMO.
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 




More information about the ffmpeg-devel mailing list