mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter: add audio denoising (afftdn) filter
This commit is contained in:
parent
e294b5cf64
commit
efb65abedf
@ -31,6 +31,7 @@ version <next>:
|
||||
- Block-Matching 3d (bm3d) denoising filter
|
||||
- acrossover filter
|
||||
- ilbc decoder
|
||||
- audio denoiser as afftdn filter
|
||||
|
||||
|
||||
version 4.0:
|
||||
|
3
configure
vendored
3
configure
vendored
@ -3339,6 +3339,8 @@ libssh_protocol_deps="libssh"
|
||||
libtls_conflict="openssl gnutls mbedtls"
|
||||
|
||||
# filters
|
||||
afftdn_filter_deps="avcodec"
|
||||
afftdn_filter_select="fft"
|
||||
afftfilt_filter_deps="avcodec"
|
||||
afftfilt_filter_select="fft"
|
||||
afir_filter_deps="avcodec"
|
||||
@ -6857,6 +6859,7 @@ done
|
||||
enabled zlib && add_cppflags -DZLIB_CONST
|
||||
|
||||
# conditional library dependencies, in any order
|
||||
enabled afftdn_filter && prepend avfilter_deps "avcodec"
|
||||
enabled afftfilt_filter && prepend avfilter_deps "avcodec"
|
||||
enabled afir_filter && prepend avfilter_deps "avcodec"
|
||||
enabled amovie_filter && prepend avfilter_deps "avformat avcodec"
|
||||
|
@ -974,6 +974,96 @@ afade=t=out:st=875:d=25
|
||||
@end example
|
||||
@end itemize
|
||||
|
||||
@section afftdn
|
||||
Denoise audio samples with FFT.
|
||||
|
||||
A description of the accepted parameters follows.
|
||||
|
||||
@table @option
|
||||
@item nr
|
||||
Set the noise reduction in dB, allowed range is 0.01 to 97.
|
||||
Default value is 12 dB.
|
||||
|
||||
@item nf
|
||||
Set the noise floor in dB, allowed range is -80 to -20.
|
||||
Default value is -50 dB.
|
||||
|
||||
@item nt
|
||||
Set the noise type.
|
||||
|
||||
It accepts the following values:
|
||||
@table @option
|
||||
@item w
|
||||
Select white noise.
|
||||
|
||||
@item v
|
||||
Select vinyl noise.
|
||||
|
||||
@item s
|
||||
Select shellac noise.
|
||||
|
||||
@item c
|
||||
Select custom noise, defined in @code{bn} option.
|
||||
|
||||
Default value is white noise.
|
||||
@end table
|
||||
|
||||
@item bn
|
||||
Set custom band noise for every one of 15 bands.
|
||||
Bands are separated by ' ' or '|'.
|
||||
|
||||
@item rf
|
||||
Set the residual floor in dB, allowed range is -80 to -20.
|
||||
Default value is -38 dB.
|
||||
|
||||
@item tn
|
||||
Enable noise tracking. By default is disabled.
|
||||
With this enabled, noise floor is automatically adjusted.
|
||||
|
||||
@item tr
|
||||
Enable residual tracking. By default is disabled.
|
||||
|
||||
@item om
|
||||
Set the output mode.
|
||||
|
||||
It accepts the following values:
|
||||
@table @option
|
||||
@item i
|
||||
Pass input unchanged.
|
||||
|
||||
@item o
|
||||
Pass noise filtered out.
|
||||
|
||||
@item n
|
||||
Pass only noise.
|
||||
|
||||
Default value is @var{o}.
|
||||
@end table
|
||||
@end table
|
||||
|
||||
@subsection Commands
|
||||
|
||||
This filter supports the following commands:
|
||||
@table @option
|
||||
@item sample_noise, sn
|
||||
Start or stop measuring noise profile.
|
||||
Syntax for the command is : "start" or "stop" string.
|
||||
After measuring noise profile is stopped it will be
|
||||
automatically applied in filtering.
|
||||
|
||||
@item noise_reduction, nr
|
||||
Change noise reduction. Argument is single float number.
|
||||
Syntax for the command is : "@var{noise_reduction}"
|
||||
|
||||
@item noise_floor, nf
|
||||
Change noise floor. Argument is single float number.
|
||||
Syntax for the command is : "@var{noise_floor}"
|
||||
|
||||
@item output_mode, om
|
||||
Change output mode operation.
|
||||
Syntax for the command is : "i", "o" or "n" string.
|
||||
@end table
|
||||
|
||||
@section afftfilt
|
||||
Apply arbitrary expressions to samples in frequency domain.
|
||||
|
||||
|
@ -46,6 +46,7 @@ OBJS-$(CONFIG_AECHO_FILTER) += af_aecho.o
|
||||
OBJS-$(CONFIG_AEMPHASIS_FILTER) += af_aemphasis.o
|
||||
OBJS-$(CONFIG_AEVAL_FILTER) += aeval.o
|
||||
OBJS-$(CONFIG_AFADE_FILTER) += af_afade.o
|
||||
OBJS-$(CONFIG_AFFTDN_FILTER) += af_afftdn.o
|
||||
OBJS-$(CONFIG_AFFTFILT_FILTER) += af_afftfilt.o
|
||||
OBJS-$(CONFIG_AFIR_FILTER) += af_afir.o
|
||||
OBJS-$(CONFIG_AFORMAT_FILTER) += af_aformat.o
|
||||
|
1421
libavfilter/af_afftdn.c
Normal file
1421
libavfilter/af_afftdn.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -39,6 +39,7 @@ extern AVFilter ff_af_aecho;
|
||||
extern AVFilter ff_af_aemphasis;
|
||||
extern AVFilter ff_af_aeval;
|
||||
extern AVFilter ff_af_afade;
|
||||
extern AVFilter ff_af_afftdn;
|
||||
extern AVFilter ff_af_afftfilt;
|
||||
extern AVFilter ff_af_afir;
|
||||
extern AVFilter ff_af_aformat;
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "libavutil/version.h"
|
||||
|
||||
#define LIBAVFILTER_VERSION_MAJOR 7
|
||||
#define LIBAVFILTER_VERSION_MINOR 32
|
||||
#define LIBAVFILTER_VERSION_MINOR 33
|
||||
#define LIBAVFILTER_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
||||
|
Loading…
Reference in New Issue
Block a user