Commit b157be1f authored by Stefano Sabatini's avatar Stefano Sabatini Committed by Anton Khirnov

lavfi: port libmpcodecs delogo filter

The ported filter supports named option parsing and more YUV formats.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent ce6b6ef6
......@@ -1482,6 +1482,7 @@ udp_protocol_deps="network"
blackframe_filter_deps="gpl"
boxblur_filter_deps="gpl"
cropdetect_filter_deps="gpl"
delogo_filter_deps="gpl"
drawtext_filter_deps="libfreetype"
frei0r_filter_deps="frei0r dlopen strtok_r"
frei0r_src_filter_deps="frei0r dlopen strtok_r"
......
......@@ -381,6 +381,58 @@ indicates never reset and return the largest area encountered during
playback.
@end table
@section delogo
Suppress a TV station logo by a simple interpolation of the surrounding
pixels. Just set a rectangle covering the logo and watch it disappear
(and sometimes something even uglier appear - your mileage may vary).
The filter accepts parameters as a string of the form
"@var{x}:@var{y}:@var{w}:@var{h}:@var{band}", or as a list of
@var{key}=@var{value} pairs, separated by ":".
The description of the accepted parameters follows.
@table @option
@item x, y
Specify the top left corner coordinates of the logo. They must be
specified.
@item w, h
Specify the width and height of the logo to clear. They must be
specified.
@item band, t
Specify the thickness of the fuzzy edge of the rectangle (added to
@var{w} and @var{h}). The default value is 4.
@item show
When set to 1, a green rectangle is drawn on the screen to simplify
finding the right @var{x}, @var{y}, @var{w}, @var{h} parameters, and
@var{band} is set to 4. The default value is 0.
@end table
Some examples follow.
@itemize
@item
Set a rectangle covering the area with top left corner coordinates 0,0
and size 100x77, setting a band of size 10:
@example
delogo=0:0:100:77:10
@end example
@item
As the previous example, but use named options:
@example
delogo=x=0:y=0:w=100:h=77:band=10
@end example
@end itemize
@section drawbox
Draw a colored box on the input image.
......
......@@ -24,6 +24,7 @@ OBJS-$(CONFIG_BOXBLUR_FILTER) += vf_boxblur.o
OBJS-$(CONFIG_COPY_FILTER) += vf_copy.o
OBJS-$(CONFIG_CROP_FILTER) += vf_crop.o
OBJS-$(CONFIG_CROPDETECT_FILTER) += vf_cropdetect.o
OBJS-$(CONFIG_DELOGO_FILTER) += vf_delogo.o
OBJS-$(CONFIG_DRAWBOX_FILTER) += vf_drawbox.o
OBJS-$(CONFIG_DRAWTEXT_FILTER) += vf_drawtext.o
OBJS-$(CONFIG_FADE_FILTER) += vf_fade.o
......
......@@ -45,6 +45,7 @@ void avfilter_register_all(void)
REGISTER_FILTER (COPY, copy, vf);
REGISTER_FILTER (CROP, crop, vf);
REGISTER_FILTER (CROPDETECT, cropdetect, vf);
REGISTER_FILTER (DELOGO, delogo, vf);
REGISTER_FILTER (DRAWBOX, drawbox, vf);
REGISTER_FILTER (DRAWTEXT, drawtext, vf);
REGISTER_FILTER (FADE, fade, vf);
......
......@@ -29,7 +29,7 @@
#include "libavutil/rational.h"
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 10
#define LIBAVFILTER_VERSION_MINOR 11
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment