swscale: add two spatially stable dithering methods

Both of these dithering methods are from http://pippin.gimp.org/a_dither/ for
GIF they can be considered better than bayer (provides more gray-levels), and
spatial stability - often more than twice as good compression and less visual
flicker than error diffusion methods (the methods also avoids error-shadow
artifacts of diffusion dithers).

These methods are similar to blue/green noise type dither masks; but are
simple enough to generate their mask on the fly. They are still research work
in progress; though more expensive to generate masks (which can be used in a
LUT) like 'void and cluster' and similar methods will yield superior results
This commit is contained in:
Øyvind Kolås 2014-03-23 02:13:26 +01:00 committed by Michael Niedermayer
parent a490970af2
commit 3e6016622e
5 changed files with 82 additions and 23 deletions