Commit 30015584 authored by Paul B Mahol's avatar Paul B Mahol

avfilter: add erosion, dilation, deflate & inflate filter

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent a39512ba
......@@ -16,6 +16,7 @@ version <next>:
- removegrain video filter
- Intel QSV-accelerated MPEG-2 video and HEVC encoding
- libkvazaar HEVC encoder
- erosion, dilation, deflate and inflate video filters
version 2.7:
......
......@@ -3718,6 +3718,24 @@ Set whether or not chroma is considered in the metric calculations. Default is
@code{1}.
@end table
@section deflate
Apply deflate effect to the video.
This filter replaces the pixel by the local(3x3) average by taking into account
only values lower than the pixel.
It accepts the following options:
@table @option
@item threshold0
@item threshold1
@item threshold2
@item threshold3
Allows to limit the maximum change for each plane, default is 65535.
If 0, plane will remain unchanged.
@end table
@section dejudder
Remove judder produced by partially interlaced telecined content.
......@@ -3904,6 +3922,33 @@ A number representing position of the first frame with respect to the telecine
pattern. This is to be used if the stream is cut. The default value is @code{0}.
@end table
@section dilation
Apply dilation effect to the video.
This filter replaces the pixel by the local(3x3) maximum.
It accepts the following options:
@table @option
@item threshold0
@item threshold1
@item threshold2
@item threshold3
Allows to limit the maximum change for each plane, default is 65535.
If 0, plane will remain unchanged.
@item coordinates
Flag which specifies the pixel to refer to. Default is 255 i.e. all eight
pixels are used.
Flags to local 3x3 coordinates maps like this:
1 2 3
4 5
6 7 8
@end table
@section drawbox
Draw a colored box on the input image.
......@@ -4759,6 +4804,33 @@ value.
@end table
@section erosion
Apply erosion effect to the video.
This filter replaces the pixel by the local(3x3) minimum.
It accepts the following options:
@table @option
@item threshold0
@item threshold1
@item threshold2
@item threshold3
Allows to limit the maximum change for each plane, default is 65535.
If 0, plane will remain unchanged.
@item coordinates
Flag which specifies the pixel to refer to. Default is 255 i.e. all eight
pixels are used.
Flags to local 3x3 coordinates maps like this:
1 2 3
4 5
6 7 8
@end table
@section extractplanes
Extract color channel components from input video stream into
......@@ -6356,6 +6428,24 @@ Default value is @code{none}.
Swap luma/chroma/alpha fields. Exchange even & odd lines. Default value is @code{0}.
@end table
@section inflate
Apply inflate effect to the video.
This filter replaces the pixel by the local(3x3) average by taking into account
only values higher than the pixel.
It accepts the following options:
@table @option
@item threshold0
@item threshold1
@item threshold2
@item threshold3
Allows to limit the maximum change for each plane, default is 65535.
If 0, plane will remain unchanged.
@end table
@section interlace
Simple interlacing filter from progressive contents. This interleaves upper (or
......
......@@ -112,10 +112,12 @@ OBJS-$(CONFIG_CROPDETECT_FILTER) += vf_cropdetect.o
OBJS-$(CONFIG_CURVES_FILTER) += vf_curves.o
OBJS-$(CONFIG_DCTDNOIZ_FILTER) += vf_dctdnoiz.o
OBJS-$(CONFIG_DECIMATE_FILTER) += vf_decimate.o
OBJS-$(CONFIG_DEFLATE_FILTER) += vf_neighbor.o
OBJS-$(CONFIG_DEJUDDER_FILTER) += vf_dejudder.o
OBJS-$(CONFIG_DELOGO_FILTER) += vf_delogo.o
OBJS-$(CONFIG_DESHAKE_FILTER) += vf_deshake.o
OBJS-$(CONFIG_DETELECINE_FILTER) += vf_detelecine.o
OBJS-$(CONFIG_DILATION_FILTER) += vf_neighbor.o
OBJS-$(CONFIG_DRAWBOX_FILTER) += vf_drawbox.o
OBJS-$(CONFIG_DRAWGRAPH_FILTER) += f_drawgraph.o
OBJS-$(CONFIG_DRAWGRID_FILTER) += vf_drawbox.o
......@@ -123,6 +125,7 @@ OBJS-$(CONFIG_DRAWTEXT_FILTER) += vf_drawtext.o
OBJS-$(CONFIG_ELBG_FILTER) += vf_elbg.o
OBJS-$(CONFIG_EDGEDETECT_FILTER) += vf_edgedetect.o
OBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
OBJS-$(CONFIG_EROSION_FILTER) += vf_neighbor.o
OBJS-$(CONFIG_EXTRACTPLANES_FILTER) += vf_extractplanes.o
OBJS-$(CONFIG_FADE_FILTER) += vf_fade.o
OBJS-$(CONFIG_FFTFILT_FILTER) += vf_fftfilt.o
......@@ -147,6 +150,7 @@ OBJS-$(CONFIG_HQX_FILTER) += vf_hqx.o
OBJS-$(CONFIG_HUE_FILTER) += vf_hue.o
OBJS-$(CONFIG_IDET_FILTER) += vf_idet.o
OBJS-$(CONFIG_IL_FILTER) += vf_il.o
OBJS-$(CONFIG_INFLATE_FILTER) += vf_neighbor.o
OBJS-$(CONFIG_INTERLACE_FILTER) += vf_interlace.o
OBJS-$(CONFIG_INTERLEAVE_FILTER) += f_interleave.o
OBJS-$(CONFIG_KERNDEINT_FILTER) += vf_kerndeint.o
......
......@@ -128,10 +128,12 @@ void avfilter_register_all(void)
REGISTER_FILTER(CURVES, curves, vf);
REGISTER_FILTER(DCTDNOIZ, dctdnoiz, vf);
REGISTER_FILTER(DECIMATE, decimate, vf);
REGISTER_FILTER(DEFLATE, deflate, vf);
REGISTER_FILTER(DEJUDDER, dejudder, vf);
REGISTER_FILTER(DELOGO, delogo, vf);
REGISTER_FILTER(DESHAKE, deshake, vf);
REGISTER_FILTER(DETELECINE, detelecine, vf);
REGISTER_FILTER(DILATION, dilation, vf);
REGISTER_FILTER(DRAWBOX, drawbox, vf);
REGISTER_FILTER(DRAWGRAPH, drawgraph, vf);
REGISTER_FILTER(DRAWGRID, drawgrid, vf);
......@@ -139,6 +141,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(EDGEDETECT, edgedetect, vf);
REGISTER_FILTER(ELBG, elbg, vf);
REGISTER_FILTER(EQ, eq, vf);
REGISTER_FILTER(EROSION, erosion, vf);
REGISTER_FILTER(EXTRACTPLANES, extractplanes, vf);
REGISTER_FILTER(FADE, fade, vf);
REGISTER_FILTER(FFTFILT, fftfilt, vf);
......@@ -163,6 +166,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(HUE, hue, vf);
REGISTER_FILTER(IDET, idet, vf);
REGISTER_FILTER(IL, il, vf);
REGISTER_FILTER(INFLATE, inflate, vf);
REGISTER_FILTER(INTERLACE, interlace, vf);
REGISTER_FILTER(INTERLEAVE, interleave, vf);
REGISTER_FILTER(KERNDEINT, kerndeint, vf);
......
......@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 21
#define LIBAVFILTER_VERSION_MINOR 22
#define LIBAVFILTER_VERSION_MICRO 100
#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