History

avfilter/af_adeclick: add more descriptive options names

Paul B Mahol committed 5 years ago

Commit ba2cebb1 parent bd50e712 files · +40 −24Browse files

Unified · Split

2 files
  1. doc/filters.texi +16 −16
  2. libavfilter/af_adeclick.c +24 −8
doc/filters.texi+16−16
@@ -656,44 +656,44 @@ Samples detected as impulsive noise are replaced by interpolated samples using · 655 unmodified lines
656autoregressive modelling.656autoregressive modelling.
657 657
658@table @option658@table @option
659@item w659@item window, w
660Set window size, in milliseconds. Allowed range is from @code{10} to660Set window size, in milliseconds. Allowed range is from @code{10} to
661@code{100}. Default value is @code{55} milliseconds.661@code{100}. Default value is @code{55} milliseconds.
662This sets size of window which will be processed at once.662This sets size of window which will be processed at once.
663 663
664@item o664@item overlap, o
665Set window overlap, in percentage of window size. Allowed range is from665Set window overlap, in percentage of window size. Allowed range is from
666@code{50} to @code{95}. Default value is @code{75} percent.666@code{50} to @code{95}. Default value is @code{75} percent.
667Setting this to a very high value increases impulsive noise removal but makes667Setting this to a very high value increases impulsive noise removal but makes
668whole process much slower.668whole process much slower.
669 669
670@item a670@item arorder, a
671Set autoregression order, in percentage of window size. Allowed range is from671Set autoregression order, in percentage of window size. Allowed range is from
672@code{0} to @code{25}. Default value is @code{2} percent. This option also672@code{0} to @code{25}. Default value is @code{2} percent. This option also
673controls quality of interpolated samples using neighbour good samples.673controls quality of interpolated samples using neighbour good samples.
674 674
675@item t675@item threshold, t
676Set threshold value. Allowed range is from @code{1} to @code{100}.676Set threshold value. Allowed range is from @code{1} to @code{100}.
677Default value is @code{2}.677Default value is @code{2}.
678This controls the strength of impulsive noise which is going to be removed.678This controls the strength of impulsive noise which is going to be removed.
679The lower value, the more samples will be detected as impulsive noise.679The lower value, the more samples will be detected as impulsive noise.
680 680
681@item b681@item burst, b
682Set burst fusion, in percentage of window size. Allowed range is @code{0} to682Set burst fusion, in percentage of window size. Allowed range is @code{0} to
683@code{10}. Default value is @code{2}.683@code{10}. Default value is @code{2}.
684If any two samples detected as noise are spaced less than this value then any684If any two samples detected as noise are spaced less than this value then any
685sample between those two samples will be also detected as noise.685sample between those two samples will be also detected as noise.
686 686
687@item m687@item method, m
688Set overlap method.688Set overlap method.
689 689
690It accepts the following values:690It accepts the following values:
691@table @option691@table @option
692@item a692@item add, a
693Select overlap-add method. Even not interpolated samples are slightly693Select overlap-add method. Even not interpolated samples are slightly
694changed with this method.694changed with this method.
695 695
696@item s696@item save, s
697Select overlap-save method. Not interpolated samples remain unchanged.697Select overlap-save method. Not interpolated samples remain unchanged.
698@end table698@end table
699 699
@@ -707,38 +707,38 @@ Samples detected as clipped are replaced by interpolated samples using · 7 unmodified lines
707autoregressive modelling.707autoregressive modelling.
708 708
709@table @option709@table @option
710@item w710@item window, w
711Set window size, in milliseconds. Allowed range is from @code{10} to @code{100}.711Set window size, in milliseconds. Allowed range is from @code{10} to @code{100}.
712Default value is @code{55} milliseconds.712Default value is @code{55} milliseconds.
713This sets size of window which will be processed at once.713This sets size of window which will be processed at once.
714 714
715@item o715@item overlap, o
716Set window overlap, in percentage of window size. Allowed range is from @code{50}716Set window overlap, in percentage of window size. Allowed range is from @code{50}
717to @code{95}. Default value is @code{75} percent.717to @code{95}. Default value is @code{75} percent.
718 718
719@item a719@item arorder, a
720Set autoregression order, in percentage of window size. Allowed range is from720Set autoregression order, in percentage of window size. Allowed range is from
721@code{0} to @code{25}. Default value is @code{8} percent. This option also controls721@code{0} to @code{25}. Default value is @code{8} percent. This option also controls
722quality of interpolated samples using neighbour good samples.722quality of interpolated samples using neighbour good samples.
723 723
724@item t724@item threshold, t
725Set threshold value. Allowed range is from @code{1} to @code{100}.725Set threshold value. Allowed range is from @code{1} to @code{100}.
726Default value is @code{10}. Higher values make clip detection less aggressive.726Default value is @code{10}. Higher values make clip detection less aggressive.
727 727
728@item n728@item hsize, n
729Set size of histogram used to detect clips. Allowed range is from @code{100} to @code{9999}.729Set size of histogram used to detect clips. Allowed range is from @code{100} to @code{9999}.
730Default value is @code{1000}. Higher values make clip detection less aggressive.730Default value is @code{1000}. Higher values make clip detection less aggressive.
731 731
732@item m732@item method, m
733Set overlap method.733Set overlap method.
734 734
735It accepts the following values:735It accepts the following values:
736@table @option736@table @option
737@item a737@item add, a
738Select overlap-add method. Even not interpolated samples are slightly changed738Select overlap-add method. Even not interpolated samples are slightly changed
739with this method.739with this method.
740 740
741@item s741@item save, s
742Select overlap-save method. Not interpolated samples remain unchanged.742Select overlap-save method. Not interpolated samples remain unchanged.
743@end table743@end table
744 744
libavfilter/af_adeclick.c+24−8
@@ -92,13 +92,21 @@ typedef struct AudioDeclickContext { · 91 unmodified lines
92#define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM92#define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
93 93
94static const AVOption adeclick_options[] = {94static const AVOption adeclick_options[] = {
95 { "window", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
95 { "w", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },96 { "w", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
97 { "overlap", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
96 { "o", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },98 { "o", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
99 { "arorder", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 25, AF },
97 { "a", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 25, AF },100 { "a", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 25, AF },
101 { "threshold", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 1, 100, AF },
98 { "t", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 1, 100, AF },102 { "t", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 1, 100, AF },
103 { "burst", "set burst fusion", OFFSET(burst), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 10, AF },
99 { "b", "set burst fusion", OFFSET(burst), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 10, AF },104 { "b", "set burst fusion", OFFSET(burst), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 10, AF },
105 { "method", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
100 { "m", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },106 { "m", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
107 { "add", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
101 { "a", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },108 { "a", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
109 { "save", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
102 { "s", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },110 { "s", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
103 { NULL }111 { NULL }
104};112};
@@ -769,14 +777,22 @@ AVFilter ff_af_adeclick = { · 664 unmodified lines
769};777};
770 778
771static const AVOption adeclip_options[] = {779static const AVOption adeclip_options[] = {
772 { "w", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },780 { "window", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
773 { "o", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },781 { "w", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
774 { "a", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=8}, 0, 25, AF },782 { "overlap", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
775 { "t", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=10}, 1, 100, AF },783 { "o", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
776 { "n", "set histogram size", OFFSET(nb_hbins), AV_OPT_TYPE_INT, {.i64=1000}, 100, 9999, AF },784 { "arorder", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=8}, 0, 25, AF },
777 { "m", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },785 { "a", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=8}, 0, 25, AF },
778 { "a", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },786 { "threshold", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=10}, 1, 100, AF },
779 { "s", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },787 { "t", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=10}, 1, 100, AF },
788 { "hsize", "set histogram size", OFFSET(nb_hbins), AV_OPT_TYPE_INT, {.i64=1000}, 100, 9999, AF },
789 { "n", "set histogram size", OFFSET(nb_hbins), AV_OPT_TYPE_INT, {.i64=1000}, 100, 9999, AF },
790 { "method", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
791 { "m", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
792 { "add", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
793 { "a", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
794 { "save", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
795 { "s", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
780 { NULL }796 { NULL }
781};797};
782 798

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