[FFmpeg-cvslog] avfilter/af_afftdn: add more verbose options aliases
Paul B Mahol
git at videolan.org
Sun Feb 27 13:03:32 EET 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Feb 27 12:00:21 2022 +0100| [0d0002cd20b496c96d659b21b7cd462a100ebbc9] | committer: Paul B Mahol
avfilter/af_afftdn: add more verbose options aliases
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d0002cd20b496c96d659b21b7cd462a100ebbc9
---
doc/filters.texi | 32 ++++++++++++++++----------------
libavfilter/af_afftdn.c | 15 +++++++++++++++
2 files changed, 31 insertions(+), 16 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index 0650879cfa..25a11fcd10 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -1282,64 +1282,64 @@ Denoise audio samples with FFT.
A description of the accepted parameters follows.
@table @option
- at item nr
+ at item noise_reduction, nr
Set the noise reduction in dB, allowed range is 0.01 to 97.
Default value is 12 dB.
- at item nf
+ at item noise_floor, nf
Set the noise floor in dB, allowed range is -80 to -20.
Default value is -50 dB.
- at item nt
+ at item noise_type, nt
Set the noise type.
It accepts the following values:
@table @option
- at item w
+ at item white, w
Select white noise.
- at item v
+ at item vinyl, v
Select vinyl noise.
- at item s
+ at item shellac, s
Select shellac noise.
- at item c
+ at item custom, c
Select custom noise, defined in @code{bn} option.
Default value is white noise.
@end table
- at item bn
+ at item band_noise, bn
Set custom band noise for every one of 15 bands.
Bands are separated by ' ' or '|'.
- at item rf
+ at item residual_floor, rf
Set the residual floor in dB, allowed range is -80 to -20.
Default value is -38 dB.
- at item tn
+ at item track_noise, tn
Enable noise tracking. By default is disabled.
With this enabled, noise floor is automatically adjusted.
- at item tr
+ at item track_residual, tr
Enable residual tracking. By default is disabled.
- at item om
+ at item output_mode, om
Set the output mode.
It accepts the following values:
@table @option
- at item i
+ at item input, i
Pass input unchanged.
- at item o
+ at item output, o
Pass noise filtered out.
- at item n
+ at item noise, n
Pass only noise.
-Default value is @var{o}.
+Default value is @var{output}.
@end table
@end table
diff --git a/libavfilter/af_afftdn.c b/libavfilter/af_afftdn.c
index 628336b18b..2758ae8a8d 100644
--- a/libavfilter/af_afftdn.c
+++ b/libavfilter/af_afftdn.c
@@ -145,20 +145,35 @@ typedef struct AudioFFTDeNoiseContext {
#define AFR AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
static const AVOption afftdn_options[] = {
+ { "noise_reduction", "set the noise reduction",OFFSET(noise_reduction), AV_OPT_TYPE_FLOAT,{.dbl = 12}, .01, 97, AFR },
{ "nr", "set the noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_FLOAT, {.dbl = 12}, .01, 97, AFR },
+ { "noise_floor", "set the noise floor",OFFSET(noise_floor), AV_OPT_TYPE_FLOAT, {.dbl =-50}, -80,-20, AFR },
{ "nf", "set the noise floor", OFFSET(noise_floor), AV_OPT_TYPE_FLOAT, {.dbl =-50}, -80,-20, AFR },
+ { "noise_type", "set the noise type", OFFSET(noise_type), AV_OPT_TYPE_INT, {.i64 = WHITE_NOISE}, WHITE_NOISE, NB_NOISE-1, AF, "type" },
{ "nt", "set the noise type", OFFSET(noise_type), AV_OPT_TYPE_INT, {.i64 = WHITE_NOISE}, WHITE_NOISE, NB_NOISE-1, AF, "type" },
+ { "white", "white noise", 0, AV_OPT_TYPE_CONST, {.i64 = WHITE_NOISE}, 0, 0, AF, "type" },
{ "w", "white noise", 0, AV_OPT_TYPE_CONST, {.i64 = WHITE_NOISE}, 0, 0, AF, "type" },
+ { "vinyl", "vinyl noise", 0, AV_OPT_TYPE_CONST, {.i64 = VINYL_NOISE}, 0, 0, AF, "type" },
{ "v", "vinyl noise", 0, AV_OPT_TYPE_CONST, {.i64 = VINYL_NOISE}, 0, 0, AF, "type" },
+ { "shellac", "shellac noise", 0, AV_OPT_TYPE_CONST, {.i64 = SHELLAC_NOISE}, 0, 0, AF, "type" },
{ "s", "shellac noise", 0, AV_OPT_TYPE_CONST, {.i64 = SHELLAC_NOISE}, 0, 0, AF, "type" },
+ { "custom", "custom noise", 0, AV_OPT_TYPE_CONST, {.i64 = CUSTOM_NOISE}, 0, 0, AF, "type" },
{ "c", "custom noise", 0, AV_OPT_TYPE_CONST, {.i64 = CUSTOM_NOISE}, 0, 0, AF, "type" },
+ { "band_noise", "set the custom bands noise", OFFSET(band_noise_str), AV_OPT_TYPE_STRING, {.str = 0}, 0, 0, AF },
{ "bn", "set the custom bands noise", OFFSET(band_noise_str), AV_OPT_TYPE_STRING, {.str = 0}, 0, 0, AF },
+ { "residual_floor", "set the residual floor",OFFSET(residual_floor), AV_OPT_TYPE_FLOAT, {.dbl =-38}, -80,-20, AFR },
{ "rf", "set the residual floor", OFFSET(residual_floor), AV_OPT_TYPE_FLOAT, {.dbl =-38}, -80,-20, AFR },
+ { "track_noise", "track noise", OFFSET(track_noise), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AFR },
{ "tn", "track noise", OFFSET(track_noise), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AFR },
+ { "track_residuals", "track residual",OFFSET(track_residual), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AFR },
{ "tr", "track residual", OFFSET(track_residual), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AFR },
+ { "output_mode", "set output mode", OFFSET(output_mode), AV_OPT_TYPE_INT, {.i64 = OUT_MODE}, 0, NB_MODES-1, AFR, "mode" },
{ "om", "set output mode", OFFSET(output_mode), AV_OPT_TYPE_INT, {.i64 = OUT_MODE}, 0, NB_MODES-1, AFR, "mode" },
+ { "input", "input", 0, AV_OPT_TYPE_CONST, {.i64 = IN_MODE}, 0, 0, AFR, "mode" },
{ "i", "input", 0, AV_OPT_TYPE_CONST, {.i64 = IN_MODE}, 0, 0, AFR, "mode" },
+ { "output", "output", 0, AV_OPT_TYPE_CONST, {.i64 = OUT_MODE}, 0, 0, AFR, "mode" },
{ "o", "output", 0, AV_OPT_TYPE_CONST, {.i64 = OUT_MODE}, 0, 0, AFR, "mode" },
+ { "noise", "noise", 0, AV_OPT_TYPE_CONST, {.i64 = NOISE_MODE}, 0, 0, AFR, "mode" },
{ "n", "noise", 0, AV_OPT_TYPE_CONST, {.i64 = NOISE_MODE}, 0, 0, AFR, "mode" },
{ NULL }
};
More information about the ffmpeg-cvslog
mailing list