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
1282A description of the accepted parameters follows.1282A description of the accepted parameters follows.
1283 1283
1284@table @option1284@table @option
1285@item nr1285@item noise_reduction, nr
1286Set the noise reduction in dB, allowed range is 0.01 to 97.1286Set the noise reduction in dB, allowed range is 0.01 to 97.
1287Default value is 12 dB.1287Default value is 12 dB.
1288 1288
1289@item nf1289@item noise_floor, nf
1290Set the noise floor in dB, allowed range is -80 to -20.1290Set the noise floor in dB, allowed range is -80 to -20.
1291Default value is -50 dB.1291Default value is -50 dB.
1292 1292
1293@item nt1293@item noise_type, nt
1294Set the noise type.1294Set the noise type.
1295 1295
1296It accepts the following values:1296It accepts the following values:
1297@table @option1297@table @option
1298@item w1298@item white, w
1299Select white noise.1299Select white noise.
1300 1300
1301@item v1301@item vinyl, v
1302Select vinyl noise.1302Select vinyl noise.
1303 1303
1304@item s1304@item shellac, s
1305Select shellac noise.1305Select shellac noise.
1306 1306
1307@item c1307@item custom, c
1308Select custom noise, defined in @code{bn} option.1308Select custom noise, defined in @code{bn} option.
1309 1309
1310Default value is white noise.1310Default value is white noise.
1311@end table1311@end table
1312 1312
1313@item bn1313@item band_noise, bn
1314Set custom band noise for every one of 15 bands.1314Set custom band noise for every one of 15 bands.
1315Bands are separated by ' ' or '|'.1315Bands are separated by ' ' or '|'.
1316 1316
1317@item rf1317@item residual_floor, rf
1318Set the residual floor in dB, allowed range is -80 to -20.1318Set the residual floor in dB, allowed range is -80 to -20.
1319Default value is -38 dB.1319Default value is -38 dB.
1320 1320
1321@item tn1321@item track_noise, tn
1322Enable noise tracking. By default is disabled.1322Enable noise tracking. By default is disabled.
1323With this enabled, noise floor is automatically adjusted.1323With this enabled, noise floor is automatically adjusted.
1324 1324
1325@item tr1325@item track_residual, tr
1326Enable residual tracking. By default is disabled.1326Enable residual tracking. By default is disabled.
1327 1327
1328@item om1328@item output_mode, om
1329Set the output mode.1329Set the output mode.
1330 1330
1331It accepts the following values:1331It accepts the following values:
1332@table @option1332@table @option
1333@item i1333@item input, i
1334Pass input unchanged.1334Pass input unchanged.
1335 1335
1336@item o1336@item output, o
1337Pass noise filtered out.1337Pass noise filtered out.
1338 1338
1339@item n1339@item noise, n
1340Pass only noise.1340Pass only noise.
1341 1341
1342Default value is @var{o}.1342Default value is @var{output}.
1343@end table1343@end table
1344@end table1344@end table
1345 1345
libavfilter/af_afftdn.c+15−0
@@ -145,20 +145,35 @@ typedef struct AudioFFTDeNoiseContext { · 144 unmodified lines
145#define AFR AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM145#define AFR AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
146 146
147static const AVOption afftdn_options[] = {147static const AVOption afftdn_options[] = {
148 { "noise_reduction", "set the noise reduction",OFFSET(noise_reduction), AV_OPT_TYPE_FLOAT,{.dbl = 12}, .01, 97, AFR },
148 { "nr", "set the noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_FLOAT, {.dbl = 12}, .01, 97, AFR },149 { "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 },
149 { "nf", "set the noise floor", OFFSET(noise_floor), AV_OPT_TYPE_FLOAT, {.dbl =-50}, -80,-20, AFR },151 { "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" },
150 { "nt", "set the noise type", OFFSET(noise_type), AV_OPT_TYPE_INT, {.i64 = WHITE_NOISE}, WHITE_NOISE, NB_NOISE-1, AF, "type" },153 { "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" },
151 { "w", "white noise", 0, AV_OPT_TYPE_CONST, {.i64 = WHITE_NOISE}, 0, 0, AF, "type" },155 { "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" },
152 { "v", "vinyl noise", 0, AV_OPT_TYPE_CONST, {.i64 = VINYL_NOISE}, 0, 0, AF, "type" },157 { "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" },
153 { "s", "shellac noise", 0, AV_OPT_TYPE_CONST, {.i64 = SHELLAC_NOISE}, 0, 0, AF, "type" },159 { "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" },
154 { "c", "custom noise", 0, AV_OPT_TYPE_CONST, {.i64 = CUSTOM_NOISE}, 0, 0, AF, "type" },161 { "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 },
155 { "bn", "set the custom bands noise", OFFSET(band_noise_str), AV_OPT_TYPE_STRING, {.str = 0}, 0, 0, AF },163 { "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 },
156 { "rf", "set the residual floor", OFFSET(residual_floor), AV_OPT_TYPE_FLOAT, {.dbl =-38}, -80,-20, AFR },165 { "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 },
157 { "tn", "track noise", OFFSET(track_noise), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AFR },167 { "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 },
158 { "tr", "track residual", OFFSET(track_residual), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AFR },169 { "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" },
159 { "om", "set output mode", OFFSET(output_mode), AV_OPT_TYPE_INT, {.i64 = OUT_MODE}, 0, NB_MODES-1, AFR, "mode" },171 { "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" },
160 { "i", "input", 0, AV_OPT_TYPE_CONST, {.i64 = IN_MODE}, 0, 0, AFR, "mode" },173 { "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" },
161 { "o", "output", 0, AV_OPT_TYPE_CONST, {.i64 = OUT_MODE}, 0, 0, AFR, "mode" },175 { "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" },
162 { "n", "noise", 0, AV_OPT_TYPE_CONST, {.i64 = NOISE_MODE}, 0, 0, AFR, "mode" },177 { "n", "noise", 0, AV_OPT_TYPE_CONST, {.i64 = NOISE_MODE}, 0, 0, AFR, "mode" },
163 { NULL }178 { NULL }
164};179};

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