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
656656 autoregressive modelling.
657657
658658 @table @option
659−@item w
659+@item window, w
660660 Set window size, in milliseconds. Allowed range is from @code{10} to
661661 @code{100}. Default value is @code{55} milliseconds.
662662 This sets size of window which will be processed at once.
663663
664−@item o
664+@item overlap, o
665665 Set window overlap, in percentage of window size. Allowed range is from
666666 @code{50} to @code{95}. Default value is @code{75} percent.
667667 Setting this to a very high value increases impulsive noise removal but makes
668668 whole process much slower.
669669
670−@item a
670+@item arorder, a
671671 Set autoregression order, in percentage of window size. Allowed range is from
672672 @code{0} to @code{25}. Default value is @code{2} percent. This option also
673673 controls quality of interpolated samples using neighbour good samples.
674674
675−@item t
675+@item threshold, t
676676 Set threshold value. Allowed range is from @code{1} to @code{100}.
677677 Default value is @code{2}.
678678 This controls the strength of impulsive noise which is going to be removed.
679679 The lower value, the more samples will be detected as impulsive noise.
680680
681−@item b
681+@item burst, b
682682 Set burst fusion, in percentage of window size. Allowed range is @code{0} to
683683 @code{10}. Default value is @code{2}.
684684 If any two samples detected as noise are spaced less than this value then any
685685 sample between those two samples will be also detected as noise.
686686
687−@item m
687+@item method, m
688688 Set overlap method.
689689
690690 It accepts the following values:
691691 @table @option
692−@item a
692+@item add, a
693693 Select overlap-add method. Even not interpolated samples are slightly
694694 changed with this method.
695695
696−@item s
696+@item save, s
697697 Select overlap-save method. Not interpolated samples remain unchanged.
698698 @end table
699699
@@ -707,38 +707,38 @@ Samples detected as clipped are replaced by interpolated samples using · 7 unmodified lines
707707 autoregressive modelling.
708708
709709 @table @option
710−@item w
710+@item window, w
711711 Set window size, in milliseconds. Allowed range is from @code{10} to @code{100}.
712712 Default value is @code{55} milliseconds.
713713 This sets size of window which will be processed at once.
714714
715−@item o
715+@item overlap, o
716716 Set window overlap, in percentage of window size. Allowed range is from @code{50}
717717 to @code{95}. Default value is @code{75} percent.
718718
719−@item a
719+@item arorder, a
720720 Set autoregression order, in percentage of window size. Allowed range is from
721721 @code{0} to @code{25}. Default value is @code{8} percent. This option also controls
722722 quality of interpolated samples using neighbour good samples.
723723
724−@item t
724+@item threshold, t
725725 Set threshold value. Allowed range is from @code{1} to @code{100}.
726726 Default value is @code{10}. Higher values make clip detection less aggressive.
727727
728−@item n
728+@item hsize, n
729729 Set size of histogram used to detect clips. Allowed range is from @code{100} to @code{9999}.
730730 Default value is @code{1000}. Higher values make clip detection less aggressive.
731731
732−@item m
732+@item method, m
733733 Set overlap method.
734734
735735 It accepts the following values:
736736 @table @option
737−@item a
737+@item add, a
738738 Select overlap-add method. Even not interpolated samples are slightly changed
739739 with this method.
740740
741−@item s
741+@item save, s
742742 Select overlap-save method. Not interpolated samples remain unchanged.
743743 @end table
744744
libavfilter/af_adeclick.c+24−8
@@ -92,13 +92,21 @@ typedef struct AudioDeclickContext { · 91 unmodified lines
9292 #define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
9393
9494 static const AVOption adeclick_options[] = {
95+ { "window", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
9596 { "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 },
9698 { "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 },
97100 { "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 },
98102 { "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 },
99104 { "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" },
100106 { "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" },
101108 { "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" },
102110 { "s", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
103111 { NULL }
104112 };
@@ -769,14 +777,22 @@ AVFilter ff_af_adeclick = { · 664 unmodified lines
769777 };
770778
771779 static const AVOption adeclip_options[] = {
772− { "w", "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 },
774− { "a", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=8}, 0, 25, AF },
775− { "t", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=10}, 1, 100, AF },
776− { "n", "set histogram size", OFFSET(nb_hbins), AV_OPT_TYPE_INT, {.i64=1000}, 100, 9999, AF },
777− { "m", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
778− { "a", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
779− { "s", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
780+ { "window", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
781+ { "w", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
782+ { "overlap", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
783+ { "o", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
784+ { "arorder", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=8}, 0, 25, AF },
785+ { "a", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=8}, 0, 25, AF },
786+ { "threshold", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=10}, 1, 100, AF },
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" },
780796 { NULL }
781797 };
782798

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