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
9b964690
Commit
9b964690
authored
Jan 24, 2015
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: add palettegen filter
parent
3cab173e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
594 additions
and
0 deletions
+594
-0
filters.texi
doc/filters.texi
+45
-0
Makefile
libavfilter/Makefile
+1
-0
allfilters.c
libavfilter/allfilters.c
+1
-0
vf_palettegen.c
libavfilter/vf_palettegen.c
+547
-0
No files found.
doc/filters.texi
View file @
9b964690
...
...
@@ -6909,6 +6909,51 @@ pad="2*iw:2*ih:ow-iw:oh-ih"
@end example
@end itemize
@section palettegen
Generate one palette for a whole video stream.
It accepts the following options:
@table @option
@item max_colors
Set the maximum number of colors to quantize in the palette.
Note: the palette will still contain 256 colors; the unused palette entries
will be black.
@item reserve_transparent
Create a palette of 255 colors maximum and reserve the last one for
transparency. Reserving the transparency color is useful for GIF optimization.
If not set, the maximum of colors in the palette will be 256. You probably want
to disable this option for a standalone image.
Set by default.
@item stats_mode
Set statistics mode.
It accepts the following values:
@table @samp
@item full
Compute full frame histograms.
@item diff
Compute histograms only for the part that differs from previous frame. This
might be relevant to give more importance to the moving part of your input if
the background is static.
@end table
Default value is @var{full}.
@end table
@subsection Examples
@itemize
@item
Generate a representative palette of a given video using @command{ffmpeg}:
@example
ffmpeg -i input.mkv -vf palettegen palette.png
@end example
@end itemize
@section perspective
Correct perspective of video not recorded perpendicular to the screen.
...
...
libavfilter/Makefile
View file @
9b964690
...
...
@@ -160,6 +160,7 @@ OBJS-$(CONFIG_OPENCL) += deshake_opencl.o unsharp_opencl.
OBJS-$(CONFIG_OVERLAY_FILTER)
+=
vf_overlay.o
dualinput.o
framesync.o
OBJS-$(CONFIG_OWDENOISE_FILTER)
+=
vf_owdenoise.o
OBJS-$(CONFIG_PAD_FILTER)
+=
vf_pad.o
OBJS-$(CONFIG_PALETTEGEN_FILTER)
+=
vf_palettegen.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 @
9b964690
...
...
@@ -175,6 +175,7 @@ void avfilter_register_all(void)
REGISTER_FILTER
(
OVERLAY
,
overlay
,
vf
);
REGISTER_FILTER
(
OWDENOISE
,
owdenoise
,
vf
);
REGISTER_FILTER
(
PAD
,
pad
,
vf
);
REGISTER_FILTER
(
PALETTEGEN
,
palettegen
,
vf
);
REGISTER_FILTER
(
PERMS
,
perms
,
vf
);
REGISTER_FILTER
(
PERSPECTIVE
,
perspective
,
vf
);
REGISTER_FILTER
(
PHASE
,
phase
,
vf
);
...
...
libavfilter/vf_palettegen.c
0 → 100644
View file @
9b964690
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