Skip to content
Permalink
Browse files

avfilter: add palettegen filter

  • Loading branch information
ubitux committed Jan 26, 2015
1 parent 5ee8975 commit 0103b517d4640dfd07806d8395c675f6876d2b4b
Showing with 408 additions and 0 deletions.
  1. +24 −0 doc/filters.texi
  2. +1 −0 libavfilter/Makefile
  3. +1 −0 libavfilter/allfilters.c
  4. +382 −0 libavfilter/vf_palettegen.c
@@ -6927,6 +6927,30 @@ 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 option:

@table @option
@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.
Set by default.
@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.
@@ -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
@@ -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);

0 comments on commit 0103b51

Please sign in to comment.