Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
bab4fceb
Commit
bab4fceb
authored
Jan 24, 2015
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: add paletteuse filter
parent
9b964690
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
989 additions
and
0 deletions
+989
-0
filters.texi
doc/filters.texi
+50
-0
Makefile
libavfilter/Makefile
+1
-0
allfilters.c
libavfilter/allfilters.c
+1
-0
vf_paletteuse.c
libavfilter/vf_paletteuse.c
+937
-0
No files found.
doc/filters.texi
View file @
bab4fceb
...
...
@@ -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.
...
...
libavfilter/Makefile
View file @
bab4fceb
...
...
@@ -161,6 +161,7 @@ OBJS-$(CONFIG_OVERLAY_FILTER) += vf_overlay.o dualinput.o framesy
OBJS-$(CONFIG_OWDENOISE_FILTER)
+=
vf_owdenoise.o
OBJS-$(CONFIG_PAD_FILTER)
+=
vf_pad.o
OBJS-$(CONFIG_PALETTEGEN_FILTER)
+=
vf_palettegen.o
OBJS-$(CONFIG_PALETTEUSE_FILTER)
+=
vf_paletteuse.o
dualinput.o
framesync.o
OBJS-$(CONFIG_PERMS_FILTER)
+=
f_perms.o
OBJS-$(CONFIG_PERSPECTIVE_FILTER)
+=
vf_perspective.o
OBJS-$(CONFIG_PHASE_FILTER)
+=
vf_phase.o
...
...
libavfilter/allfilters.c
View file @
bab4fceb
...
...
@@ -176,6 +176,7 @@ void avfilter_register_all(void)
REGISTER_FILTER
(
OWDENOISE
,
owdenoise
,
vf
);
REGISTER_FILTER
(
PAD
,
pad
,
vf
);
REGISTER_FILTER
(
PALETTEGEN
,
palettegen
,
vf
);
REGISTER_FILTER
(
PALETTEUSE
,
paletteuse
,
vf
);
REGISTER_FILTER
(
PERMS
,
perms
,
vf
);
REGISTER_FILTER
(
PERSPECTIVE
,
perspective
,
vf
);
REGISTER_FILTER
(
PHASE
,
phase
,
vf
);
...
...
libavfilter/vf_paletteuse.c
0 → 100644
View file @
bab4fceb
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment