1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/af_adeclick: add more descriptive options names

This commit is contained in:
Paul B Mahol 2021-02-11 11:32:46 +01:00
parent bd50e715a9
commit ba2cebb49c
2 changed files with 40 additions and 24 deletions

View File

@ -656,44 +656,44 @@ Samples detected as impulsive noise are replaced by interpolated samples using
autoregressive modelling.
@table @option
@item w
@item window, w
Set window size, in milliseconds. Allowed range is from @code{10} to
@code{100}. Default value is @code{55} milliseconds.
This sets size of window which will be processed at once.
@item o
@item overlap, o
Set window overlap, in percentage of window size. Allowed range is from
@code{50} to @code{95}. Default value is @code{75} percent.
Setting this to a very high value increases impulsive noise removal but makes
whole process much slower.
@item a
@item arorder, a
Set autoregression order, in percentage of window size. Allowed range is from
@code{0} to @code{25}. Default value is @code{2} percent. This option also
controls quality of interpolated samples using neighbour good samples.
@item t
@item threshold, t
Set threshold value. Allowed range is from @code{1} to @code{100}.
Default value is @code{2}.
This controls the strength of impulsive noise which is going to be removed.
The lower value, the more samples will be detected as impulsive noise.
@item b
@item burst, b
Set burst fusion, in percentage of window size. Allowed range is @code{0} to
@code{10}. Default value is @code{2}.
If any two samples detected as noise are spaced less than this value then any
sample between those two samples will be also detected as noise.
@item m
@item method, m
Set overlap method.
It accepts the following values:
@table @option
@item a
@item add, a
Select overlap-add method. Even not interpolated samples are slightly
changed with this method.
@item s
@item save, s
Select overlap-save method. Not interpolated samples remain unchanged.
@end table
@ -707,38 +707,38 @@ Samples detected as clipped are replaced by interpolated samples using
autoregressive modelling.
@table @option
@item w
@item window, w
Set window size, in milliseconds. Allowed range is from @code{10} to @code{100}.
Default value is @code{55} milliseconds.
This sets size of window which will be processed at once.
@item o
@item overlap, o
Set window overlap, in percentage of window size. Allowed range is from @code{50}
to @code{95}. Default value is @code{75} percent.
@item a
@item arorder, a
Set autoregression order, in percentage of window size. Allowed range is from
@code{0} to @code{25}. Default value is @code{8} percent. This option also controls
quality of interpolated samples using neighbour good samples.
@item t
@item threshold, t
Set threshold value. Allowed range is from @code{1} to @code{100}.
Default value is @code{10}. Higher values make clip detection less aggressive.
@item n
@item hsize, n
Set size of histogram used to detect clips. Allowed range is from @code{100} to @code{9999}.
Default value is @code{1000}. Higher values make clip detection less aggressive.
@item m
@item method, m
Set overlap method.
It accepts the following values:
@table @option
@item a
@item add, a
Select overlap-add method. Even not interpolated samples are slightly changed
with this method.
@item s
@item save, s
Select overlap-save method. Not interpolated samples remain unchanged.
@end table

View File

@ -92,13 +92,21 @@ typedef struct AudioDeclickContext {
#define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
static const AVOption adeclick_options[] = {
{ "window", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
{ "w", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
{ "overlap", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
{ "o", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
{ "arorder", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 25, AF },
{ "a", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 25, AF },
{ "threshold", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 1, 100, AF },
{ "t", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 1, 100, AF },
{ "burst", "set burst fusion", OFFSET(burst), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 10, AF },
{ "b", "set burst fusion", OFFSET(burst), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 10, AF },
{ "method", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
{ "m", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
{ "add", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
{ "a", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
{ "save", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
{ "s", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
{ NULL }
};
@ -769,14 +777,22 @@ AVFilter ff_af_adeclick = {
};
static const AVOption adeclip_options[] = {
{ "w", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
{ "o", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
{ "a", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=8}, 0, 25, AF },
{ "t", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=10}, 1, 100, AF },
{ "n", "set histogram size", OFFSET(nb_hbins), AV_OPT_TYPE_INT, {.i64=1000}, 100, 9999, AF },
{ "m", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
{ "a", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
{ "s", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
{ "window", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
{ "w", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
{ "overlap", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
{ "o", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
{ "arorder", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=8}, 0, 25, AF },
{ "a", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=8}, 0, 25, AF },
{ "threshold", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=10}, 1, 100, AF },
{ "t", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=10}, 1, 100, AF },
{ "hsize", "set histogram size", OFFSET(nb_hbins), AV_OPT_TYPE_INT, {.i64=1000}, 100, 9999, AF },
{ "n", "set histogram size", OFFSET(nb_hbins), AV_OPT_TYPE_INT, {.i64=1000}, 100, 9999, AF },
{ "method", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
{ "m", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
{ "add", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
{ "a", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
{ "save", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
{ "s", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
{ NULL }
};