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

lavfi: port MP noise filter

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 1e786797
......@@ -18,6 +18,7 @@ version <next>:
- il filter ported from libmpcodecs
- support ID3v2 tags in ASF files
- RF64 support in WAV muxer
- noise filter ported from libmpcodecs
version 1.1:
......
......@@ -36,6 +36,7 @@ Specifically, the GPL parts of FFmpeg are
- vf_hue.c
- vf_kerndeint.c
- vf_mp.c
- vf_noise.c
- vf_pp.c
- vf_smartblur.c
- vf_super2xsai.c
......
......@@ -2012,6 +2012,7 @@ movie_filter_deps="avcodec avformat"
mp_filter_deps="gpl avcodec swscale inline_asm"
mptestsrc_filter_deps="gpl"
negate_filter_deps="lut_filter"
noise_filter_deps="gpl"
resample_filter_deps="avresample"
ocv_filter_deps="libopencv"
pan_filter_deps="swresample"
......
......@@ -3630,7 +3630,6 @@ The list of the currently supported filters follows:
@item ivtc
@item kerndeint
@item mcdeint
@item noise
@item ow
@item perspective
@item phase
......@@ -3657,12 +3656,6 @@ Adjust gamma, brightness, contrast:
@example
mp=eq2=1.0:2:0.5
@end example
@item
Add temporal noise to input video:
@example
mp=noise=20t
@end example
@end itemize
See also mplayer(1), @url{http://www.mplayerhq.hu/}.
......@@ -3692,6 +3685,57 @@ noformat=yuv420p,vflip
noformat=yuv420p:yuv444p:yuv410p
@end example
@section noise
Add noise on video input frame.
This filter accepts a list of options in the form of @var{key}=@var{value}
pairs separated by ":". A description of the accepted options follows.
@table @option
@item all_seed
@item c0_seed
@item c1_seed
@item c2_seed
@item c3_seed
Set noise seed for specific pixel component or all pixel components in case
of @var{all_seed}. Default value is @code{123457}.
@item all_strength, as
@item c0_strength, c0s
@item c1_strength, c1s
@item c2_strength, c2s
@item c3_strength, c3s
Set noise strength for specific pixel component or all pixel components in case
@var{all_strength}. Default value is @code{0}. Allowed range is [0, 100].
@item all_flags, af
@item c0_flags, c0f
@item c1_flags, c1f
@item c2_flags, c2f
@item c3_flags, c3f
Set pixel component flags or set flags for all components if @var{all_flags}.
Available values for component flags are:
@table @samp
@item a
averaged temporal noise (smoother)
@item p
mix random noise with a (semi)regular pattern
@item q
higher quality (slightly better looking, slightly slower)
@item t
temporal noise (noise pattern changes between frames)
@item u
uniform noise (gaussian otherwise)
@end table
@end table
Some examples follow:
@example
Add temporal and uniform noise to input video:
noise=alls=20:allf=t+u
@end example
@section null
Pass the video source unchanged to the output.
......
......@@ -134,6 +134,7 @@ OBJS-$(CONFIG_LUTYUV_FILTER) += vf_lut.o
OBJS-$(CONFIG_MP_FILTER) += vf_mp.o
OBJS-$(CONFIG_NEGATE_FILTER) += vf_lut.o
OBJS-$(CONFIG_NOFORMAT_FILTER) += vf_format.o
OBJS-$(CONFIG_NOISE_FILTER) += vf_noise.o
OBJS-$(CONFIG_NULL_FILTER) += vf_null.o
OBJS-$(CONFIG_OCV_FILTER) += vf_libopencv.o
OBJS-$(CONFIG_OVERLAY_FILTER) += vf_overlay.o
......
......@@ -128,6 +128,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(MP, mp, vf);
REGISTER_FILTER(NEGATE, negate, vf);
REGISTER_FILTER(NOFORMAT, noformat, vf);
REGISTER_FILTER(NOISE, noise, vf);
REGISTER_FILTER(NULL, null, vf);
REGISTER_FILTER(OCV, ocv, vf);
REGISTER_FILTER(OVERLAY, overlay, vf);
......
......@@ -29,8 +29,8 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 37
#define LIBAVFILTER_VERSION_MICRO 103
#define LIBAVFILTER_VERSION_MINOR 38
#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