summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2015-01-24 21:38:15 +0100
committerClément Bœsch <u@pkh.me>2015-02-14 20:48:50 +0100
commitbab4fcebb112590c1213b59bd7572eb3a36bc83b (patch)
treed0a0f89d37e9706d2b4a817e1a8e1035f6f5b3cf /doc
parent9b964690e39928af616d88b3e8ab47a7db14a538 (diff)
avfilter: add paletteuse filter
Diffstat (limited to 'doc')
-rw-r--r--doc/filters.texi50
1 files changed, 50 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi
index 7789bf0cac..191b52f52e 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -6909,6 +6909,7 @@ pad="2*iw:2*ih:ow-iw:oh-ih"
@end example
@end itemize
+@anchor{palettegen}
@section palettegen
Generate one palette for a whole video stream.
@@ -6954,6 +6955,55 @@ ffmpeg -i input.mkv -vf palettegen palette.png
@end example
@end itemize
+@section paletteuse
+
+Use a palette to downsample an input video stream.
+
+The filter takes two inputs: one video stream and a palette. The palette must
+be a 256 pixels image.
+
+It accepts the following options:
+
+@table @option
+@item dither
+Select dithering mode. Available algorithms are:
+@table @samp
+@item bayer
+Ordered 8x8 bayer dithering (deterministic)
+@item heckbert
+Dithering as defined by Paul Heckbert in 1982 (simple error diffusion).
+Note: this dithering is sometimes considered "wrong" and is included as a
+reference.
+@item floyd_steinberg
+Floyd and Steingberg dithering (error diffusion)
+@item sierra2
+Frankie Sierra dithering v2 (error diffusion)
+@item sierra2_4a
+Frankie Sierra dithering v2 "Lite" (error diffusion)
+@end table
+
+Default is @var{sierra2_4a}.
+
+@item bayer_scale
+When @var{bayer} dithering is selected, this option defines the scale of the
+pattern (how much the crosshatch pattern is visible). A low value means more
+visible pattern for less banding, and higher value means less visible pattern
+at the cost of more banding.
+
+The option must be an integer value in the range [0,5]. Default is @var{2}.
+@end table
+
+@subsection Examples
+
+@itemize
+@item
+Use a palette (generated for example with @ref{palettegen}) to encode a GIF
+using @command{ffmpeg}:
+@example
+ffmpeg -i input.mkv -i palette.png -lavfi paletteuse output.gif
+@end example
+@end itemize
+
@section perspective
Correct perspective of video not recorded perpendicular to the screen.