Commit 32eaf406 authored by Paul B Mahol's avatar Paul B Mahol

avfilter: add limitdiff video filter

parent 73fe19f0
......@@ -26,6 +26,7 @@ version <next>:
- GEM Raster image decoder
- asdr audio filter
- speex decoder
- limitdiff video filter
version 4.4:
......
......@@ -14488,6 +14488,37 @@ ffmpeg -i main.mpg -i ref.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];
@end example
@end itemize
@section limitdiff
Apply limited difference filter using second and optionally third video stream.
The filter accepts the following options:
@table @option
@item threshold
Set the threshold to use when allowing certain differences between video streams.
Any absolute difference value lower or exact than this threshold will pick pixel components from
first video stream.
@item elasticity
Set the elasticity of soft thresholding when processing video streams.
This value multiplied with first one sets second threshold.
Any absolute difference value greater or exact than second threshold will pick pixel components
from second video stream. For values between those two threshold
linear interpolation between first and second video stream will be used.
@item reference
Enable the reference (third) video stream processing. By default is disabled.
If set, this video stream will be used for calculating absolute difference with first video
stream.
@item planes
Specify which planes will be processed. Defaults to all available.
@end table
@subsection Commands
This filter supports the all above options as @ref{commands} except option @samp{reference}.
@section limiter
Limits the pixel components values to the specified range [min, max].
......
......@@ -323,6 +323,7 @@ OBJS-$(CONFIG_LATENCY_FILTER) += f_latency.o
OBJS-$(CONFIG_LENSCORRECTION_FILTER) += vf_lenscorrection.o
OBJS-$(CONFIG_LENSFUN_FILTER) += vf_lensfun.o
OBJS-$(CONFIG_LIBVMAF_FILTER) += vf_libvmaf.o framesync.o
OBJS-$(CONFIG_LIMITDIFF_FILTER) += vf_limitdiff.o framesync.o
OBJS-$(CONFIG_LIMITER_FILTER) += vf_limiter.o
OBJS-$(CONFIG_LOOP_FILTER) += f_loop.o
OBJS-$(CONFIG_LUMAKEY_FILTER) += vf_lumakey.o
......
......@@ -308,6 +308,7 @@ extern const AVFilter ff_vf_latency;
extern const AVFilter ff_vf_lenscorrection;
extern const AVFilter ff_vf_lensfun;
extern const AVFilter ff_vf_libvmaf;
extern const AVFilter ff_vf_limitdiff;
extern const AVFilter ff_vf_limiter;
extern const AVFilter ff_vf_loop;
extern const AVFilter ff_vf_lumakey;
......
......@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 8
#define LIBAVFILTER_VERSION_MINOR 12
#define LIBAVFILTER_VERSION_MINOR 13
#define LIBAVFILTER_VERSION_MICRO 100
......
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