Skip to content

video_filter: add dithering filter

Brandon Li requested to merge PulseBeat_02/vlc:dither into master

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, and randomization.
    • The palette is specified by comma separated hexadecimal colors.
  • 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 🙂 feedback appreciated

Merge request reports

Loading