[FFmpeg-cvslog] avfilter/af_adeclick: add more descriptive options names
Paul B Mahol
git at videolan.org
Thu Feb 11 12:40:10 EET 2021
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Feb 11 11:32:46 2021 +0100| [ba2cebb49ca974f44e5729975717f550a49aaa0f] | committer: Paul B Mahol
avfilter/af_adeclick: add more descriptive options names
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ba2cebb49ca974f44e5729975717f550a49aaa0f
---
doc/filters.texi | 32 ++++++++++++++++----------------
libavfilter/af_adeclick.c | 32 ++++++++++++++++++++++++--------
2 files changed, 40 insertions(+), 24 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index e6ddaaa77b..3bc9a69770 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -656,44 +656,44 @@ Samples detected as impulsive noise are replaced by interpolated samples using
autoregressive modelling.
@table @option
- at item w
+ at 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.
- at item o
+ at 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.
- at item a
+ at 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.
- at item t
+ at 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.
- at item b
+ at 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.
- at item m
+ at item method, m
Set overlap method.
It accepts the following values:
@table @option
- at item a
+ at item add, a
Select overlap-add method. Even not interpolated samples are slightly
changed with this method.
- at item s
+ at 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
- at item w
+ at 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.
- at item o
+ at 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.
- at item a
+ at 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.
- at item t
+ at 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.
- at item n
+ at 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.
- at item m
+ at item method, m
Set overlap method.
It accepts the following values:
@table @option
- at item a
+ at item add, a
Select overlap-add method. Even not interpolated samples are slightly changed
with this method.
- at item s
+ at item save, s
Select overlap-save method. Not interpolated samples remain unchanged.
@end table
diff --git a/libavfilter/af_adeclick.c b/libavfilter/af_adeclick.c
index e86a1f7bef..c8a41cd60e 100644
--- a/libavfilter/af_adeclick.c
+++ b/libavfilter/af_adeclick.c
@@ -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 }
};
More information about the ffmpeg-cvslog
mailing list