From 3e6016622e6fc5967e55d41e8074558d43bc33c0 Mon Sep 17 00:00:00 2001 From: Øyvind Kolås Date: Sun, 23 Mar 2014 02:13:26 +0100 Subject: 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 --- libswscale/swscale_internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libswscale/swscale_internal.h') diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 5ce54d0dc3..8c2dc7998d 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -66,6 +66,8 @@ typedef enum SwsDither { SWS_DITHER_AUTO, SWS_DITHER_BAYER, SWS_DITHER_ED, + SWS_DITHER_A_DITHER, + SWS_DITHER_X_DITHER, NB_SWS_DITHER, } SwsDither; -- cgit v1.2.3