Commit 841df7bf authored by Stefano Sabatini's avatar Stefano Sabatini

lavfi: port sab filter from libmpcodecs

parent 08041711
......@@ -40,6 +40,7 @@ Specifically, the GPL parts of FFmpeg are
- vf_noise.c
- vf_owdenoise.c
- vf_pp.c
- vf_sab.c
- vf_smartblur.c
- vf_stereo3d.c
- vf_super2xsai.c
......
......@@ -2168,6 +2168,7 @@ owdenoise_filter_deps="gpl"
pan_filter_deps="swresample"
pp_filter_deps="gpl postproc"
removelogo_filter_deps="avcodec avformat swscale"
sab_filter_deps="gpl swscale"
scale_filter_deps="swscale"
smartblur_filter_deps="gpl swscale"
showspectrum_filter_deps="avcodec rdft"
......
......@@ -5772,6 +5772,42 @@ much, but it will increase the amount of blurring needed to cover over
the image and will destroy more information than necessary, and extra
pixels will slow things down on a large logo.
@section sab
Apply Shape Adaptive Blur.
The filter accepts the following options:
@table @option
@item luma_radius, lr
Set luma blur filter strength, must be a value in range 0.1-4.0, default
value is 1.0. A greater value will result in a more blurred image, and
in slower processing.
@item luma_pre_filter_radius, lpfr
Set luma pre-filter radius, must be a value in the 0.1-2.0 range, default
value is 1.0.
@item luma_strength, ls
Set luma maximum difference between pixels to still be considered, must
be a value in the 0.1-100.0 range, default value is 1.0.
@item chroma_radius, cr
Set chroma blur filter strength, must be a value in range 0.1-4.0. A
greater value will result in a more blurred image, and in slower
processing.
@item chroma_pre_filter_radius, cpfr
Set chroma pre-filter radius, must be a value in the 0.1-2.0 range.
@item chroma_strength, cs
Set chroma maximum difference between pixels to still be considered,
must be a value in the 0.1-100.0 range.
@end table
Each chroma option value, if not explicitly specified, is set to the
corresponding luma option value.
@section scale
Scale (resize) the input video, using the libswscale library.
......
......@@ -16,6 +16,7 @@ FFLIBS-$(CONFIG_PAN_FILTER) += swresample
FFLIBS-$(CONFIG_PP_FILTER) += postproc
FFLIBS-$(CONFIG_REMOVELOGO_FILTER) += avformat avcodec swscale
FFLIBS-$(CONFIG_RESAMPLE_FILTER) += avresample
FFLIBS-$(CONFIG_SAB_FILTER) += swscale
FFLIBS-$(CONFIG_SCALE_FILTER) += swscale
FFLIBS-$(CONFIG_SHOWSPECTRUM_FILTER) += avcodec
FFLIBS-$(CONFIG_SMARTBLUR_FILTER) += swscale
......@@ -168,6 +169,7 @@ OBJS-$(CONFIG_PIXDESCTEST_FILTER) += vf_pixdesctest.o
OBJS-$(CONFIG_PP_FILTER) += vf_pp.o
OBJS-$(CONFIG_REMOVELOGO_FILTER) += bbox.o lswsutils.o lavfutils.o vf_removelogo.o
OBJS-$(CONFIG_SEPARATEFIELDS_FILTER) += vf_separatefields.o
OBJS-$(CONFIG_SAB_FILTER) += vf_sab.o
OBJS-$(CONFIG_SCALE_FILTER) += vf_scale.o
OBJS-$(CONFIG_SELECT_FILTER) += f_select.o
OBJS-$(CONFIG_SENDCMD_FILTER) += f_sendcmd.o
......
......@@ -163,6 +163,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(PIXDESCTEST, pixdesctest, vf);
REGISTER_FILTER(PP, pp, vf);
REGISTER_FILTER(REMOVELOGO, removelogo, vf);
REGISTER_FILTER(SAB, sab, vf);
REGISTER_FILTER(SCALE, scale, vf);
REGISTER_FILTER(SELECT, select, vf);
REGISTER_FILTER(SENDCMD, sendcmd, vf);
......
......@@ -30,8 +30,8 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 74
#define LIBAVFILTER_VERSION_MICRO 101
#define LIBAVFILTER_VERSION_MINOR 75
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
......
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