video_filter: add dithering filter
This video filter adds several dithering algorithms, which can help with color depth for small palettes. Useful for converting video palette to GIF (256 color) palette, etc.
- You would specify a dithering mode (algorithm) and a palette as such.
./vlc --video-filter=dither --dither-mode=floyd-steinberg --palette="#FFFFFF,#000000" BigBuckBunny.mp4
- Valid dithering modes are
floyd-steinberg
,sierra-filter-lite
,jarvis-judice-ninke
,euclidean-distance
, andrandomization
. - The palette is specified by comma separated hexadecimal colors.
- Valid dithering modes are
- For the error diffusion algorithms, I implemented serpentine scanning (Boustrophedon transform) to eliminate artifacts.
- I created a 5-bit palette look-up table so that color lookups can be fast, at a low memory cost.
This is my first merge request