History

avfilter/af_afftdn: add more verbose options aliases

Paul B Mahol committed 4 years ago

Commit 0d0002c1 parent 592cef62 files · +31 −16Browse files

Unified · Split

2 files
  1. doc/filters.texi +16 −16
  2. libavfilter/af_afftdn.c +15 −0
doc/filters.texi+16−16
@@ -1282,64 +1282,64 @@ Denoise audio samples with FFT. · 1281 unmodified lines
12821282 A description of the accepted parameters follows.
12831283
12841284 @table @option
1285−@item nr
1285+@item noise_reduction, nr
12861286 Set the noise reduction in dB, allowed range is 0.01 to 97.
12871287 Default value is 12 dB.
12881288
1289−@item nf
1289+@item noise_floor, nf
12901290 Set the noise floor in dB, allowed range is -80 to -20.
12911291 Default value is -50 dB.
12921292
1293−@item nt
1293+@item noise_type, nt
12941294 Set the noise type.
12951295
12961296 It accepts the following values:
12971297 @table @option
1298−@item w
1298+@item white, w
12991299 Select white noise.
13001300
1301−@item v
1301+@item vinyl, v
13021302 Select vinyl noise.
13031303
1304−@item s
1304+@item shellac, s
13051305 Select shellac noise.
13061306
1307−@item c
1307+@item custom, c
13081308 Select custom noise, defined in @code{bn} option.
13091309
13101310 Default value is white noise.
13111311 @end table
13121312
1313−@item bn
1313+@item band_noise, bn
13141314 Set custom band noise for every one of 15 bands.
13151315 Bands are separated by ' ' or '|'.
13161316
1317−@item rf
1317+@item residual_floor, rf
13181318 Set the residual floor in dB, allowed range is -80 to -20.
13191319 Default value is -38 dB.
13201320
1321−@item tn
1321+@item track_noise, tn
13221322 Enable noise tracking. By default is disabled.
13231323 With this enabled, noise floor is automatically adjusted.
13241324
1325−@item tr
1325+@item track_residual, tr
13261326 Enable residual tracking. By default is disabled.
13271327
1328−@item om
1328+@item output_mode, om
13291329 Set the output mode.
13301330
13311331 It accepts the following values:
13321332 @table @option
1333−@item i
1333+@item input, i
13341334 Pass input unchanged.
13351335
1336−@item o
1336+@item output, o
13371337 Pass noise filtered out.
13381338
1339−@item n
1339+@item noise, n
13401340 Pass only noise.
13411341
1342−Default value is @var{o}.
1342+Default value is @var{output}.
13431343 @end table
13441344 @end table
13451345
libavfilter/af_afftdn.c+15−0
@@ -145,20 +145,35 @@ typedef struct AudioFFTDeNoiseContext { · 144 unmodified lines
145145 #define AFR AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
146146
147147 static const AVOption afftdn_options[] = {
148+ { "noise_reduction", "set the noise reduction",OFFSET(noise_reduction), AV_OPT_TYPE_FLOAT,{.dbl = 12}, .01, 97, AFR },
148149 { "nr", "set the noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_FLOAT, {.dbl = 12}, .01, 97, AFR },
150+ { "noise_floor", "set the noise floor",OFFSET(noise_floor), AV_OPT_TYPE_FLOAT, {.dbl =-50}, -80,-20, AFR },
149151 { "nf", "set the noise floor", OFFSET(noise_floor), AV_OPT_TYPE_FLOAT, {.dbl =-50}, -80,-20, AFR },
152+ { "noise_type", "set the noise type", OFFSET(noise_type), AV_OPT_TYPE_INT, {.i64 = WHITE_NOISE}, WHITE_NOISE, NB_NOISE-1, AF, "type" },
150153 { "nt", "set the noise type", OFFSET(noise_type), AV_OPT_TYPE_INT, {.i64 = WHITE_NOISE}, WHITE_NOISE, NB_NOISE-1, AF, "type" },
154+ { "white", "white noise", 0, AV_OPT_TYPE_CONST, {.i64 = WHITE_NOISE}, 0, 0, AF, "type" },
151155 { "w", "white noise", 0, AV_OPT_TYPE_CONST, {.i64 = WHITE_NOISE}, 0, 0, AF, "type" },
156+ { "vinyl", "vinyl noise", 0, AV_OPT_TYPE_CONST, {.i64 = VINYL_NOISE}, 0, 0, AF, "type" },
152157 { "v", "vinyl noise", 0, AV_OPT_TYPE_CONST, {.i64 = VINYL_NOISE}, 0, 0, AF, "type" },
158+ { "shellac", "shellac noise", 0, AV_OPT_TYPE_CONST, {.i64 = SHELLAC_NOISE}, 0, 0, AF, "type" },
153159 { "s", "shellac noise", 0, AV_OPT_TYPE_CONST, {.i64 = SHELLAC_NOISE}, 0, 0, AF, "type" },
160+ { "custom", "custom noise", 0, AV_OPT_TYPE_CONST, {.i64 = CUSTOM_NOISE}, 0, 0, AF, "type" },
154161 { "c", "custom noise", 0, AV_OPT_TYPE_CONST, {.i64 = CUSTOM_NOISE}, 0, 0, AF, "type" },
162+ { "band_noise", "set the custom bands noise", OFFSET(band_noise_str), AV_OPT_TYPE_STRING, {.str = 0}, 0, 0, AF },
155163 { "bn", "set the custom bands noise", OFFSET(band_noise_str), AV_OPT_TYPE_STRING, {.str = 0}, 0, 0, AF },
164+ { "residual_floor", "set the residual floor",OFFSET(residual_floor), AV_OPT_TYPE_FLOAT, {.dbl =-38}, -80,-20, AFR },
156165 { "rf", "set the residual floor", OFFSET(residual_floor), AV_OPT_TYPE_FLOAT, {.dbl =-38}, -80,-20, AFR },
166+ { "track_noise", "track noise", OFFSET(track_noise), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AFR },
157167 { "tn", "track noise", OFFSET(track_noise), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AFR },
168+ { "track_residuals", "track residual",OFFSET(track_residual), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AFR },
158169 { "tr", "track residual", OFFSET(track_residual), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AFR },
170+ { "output_mode", "set output mode", OFFSET(output_mode), AV_OPT_TYPE_INT, {.i64 = OUT_MODE}, 0, NB_MODES-1, AFR, "mode" },
159171 { "om", "set output mode", OFFSET(output_mode), AV_OPT_TYPE_INT, {.i64 = OUT_MODE}, 0, NB_MODES-1, AFR, "mode" },
172+ { "input", "input", 0, AV_OPT_TYPE_CONST, {.i64 = IN_MODE}, 0, 0, AFR, "mode" },
160173 { "i", "input", 0, AV_OPT_TYPE_CONST, {.i64 = IN_MODE}, 0, 0, AFR, "mode" },
174+ { "output", "output", 0, AV_OPT_TYPE_CONST, {.i64 = OUT_MODE}, 0, 0, AFR, "mode" },
161175 { "o", "output", 0, AV_OPT_TYPE_CONST, {.i64 = OUT_MODE}, 0, 0, AFR, "mode" },
176+ { "noise", "noise", 0, AV_OPT_TYPE_CONST, {.i64 = NOISE_MODE}, 0, 0, AFR, "mode" },
162177 { "n", "noise", 0, AV_OPT_TYPE_CONST, {.i64 = NOISE_MODE}, 0, 0, AFR, "mode" },
163178 { NULL }
164179 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t