Unified · Split
| @@ -656,44 +656,44 @@ Samples detected as impulsive noise are replaced by interpolated samples using · 655 unmodified lines | |||
| 656 | autoregressive modelling. | 656 | autoregressive modelling. |
| 657 | 657 | ||
| 658 | @table @option | 658 | @table @option |
| 659 | @item w | 659 | @item window, w |
| 660 | Set window size, in milliseconds. Allowed range is from @code{10} to | 660 | Set 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. |
| 662 | This sets size of window which will be processed at once. | 662 | This sets size of window which will be processed at once. |
| 663 | 663 | ||
| 664 | @item o | 664 | @item overlap, o |
| 665 | Set window overlap, in percentage of window size. Allowed range is from | 665 | Set 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. |
| 667 | Setting this to a very high value increases impulsive noise removal but makes | 667 | Setting this to a very high value increases impulsive noise removal but makes |
| 668 | whole process much slower. | 668 | whole process much slower. |
| 669 | 669 | ||
| 670 | @item a | 670 | @item arorder, a |
| 671 | Set autoregression order, in percentage of window size. Allowed range is from | 671 | Set 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 also | 672 | @code{0} to @code{25}. Default value is @code{2} percent. This option also |
| 673 | controls quality of interpolated samples using neighbour good samples. | 673 | controls quality of interpolated samples using neighbour good samples. |
| 674 | 674 | ||
| 675 | @item t | 675 | @item threshold, t |
| 676 | Set threshold value. Allowed range is from @code{1} to @code{100}. | 676 | Set threshold value. Allowed range is from @code{1} to @code{100}. |
| 677 | Default value is @code{2}. | 677 | Default value is @code{2}. |
| 678 | This controls the strength of impulsive noise which is going to be removed. | 678 | This controls the strength of impulsive noise which is going to be removed. |
| 679 | The lower value, the more samples will be detected as impulsive noise. | 679 | The lower value, the more samples will be detected as impulsive noise. |
| 680 | 680 | ||
| 681 | @item b | 681 | @item burst, b |
| 682 | Set burst fusion, in percentage of window size. Allowed range is @code{0} to | 682 | Set 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}. |
| 684 | If any two samples detected as noise are spaced less than this value then any | 684 | If any two samples detected as noise are spaced less than this value then any |
| 685 | sample between those two samples will be also detected as noise. | 685 | sample between those two samples will be also detected as noise. |
| 686 | 686 | ||
| 687 | @item m | 687 | @item method, m |
| 688 | Set overlap method. | 688 | Set overlap method. |
| 689 | 689 | ||
| 690 | It accepts the following values: | 690 | It accepts the following values: |
| 691 | @table @option | 691 | @table @option |
| 692 | @item a | 692 | @item add, a |
| 693 | Select overlap-add method. Even not interpolated samples are slightly | 693 | Select overlap-add method. Even not interpolated samples are slightly |
| 694 | changed with this method. | 694 | changed with this method. |
| 695 | 695 | ||
| 696 | @item s | 696 | @item save, s |
| 697 | Select overlap-save method. Not interpolated samples remain unchanged. | 697 | Select overlap-save method. Not interpolated samples remain unchanged. |
| 698 | @end table | 698 | @end table |
| 699 | 699 | ||
| @@ -707,38 +707,38 @@ Samples detected as clipped are replaced by interpolated samples using · 7 unmodified lines | |||
| 707 | autoregressive modelling. | 707 | autoregressive modelling. |
| 708 | 708 | ||
| 709 | @table @option | 709 | @table @option |
| 710 | @item w | 710 | @item window, w |
| 711 | Set window size, in milliseconds. Allowed range is from @code{10} to @code{100}. | 711 | Set window size, in milliseconds. Allowed range is from @code{10} to @code{100}. |
| 712 | Default value is @code{55} milliseconds. | 712 | Default value is @code{55} milliseconds. |
| 713 | This sets size of window which will be processed at once. | 713 | This sets size of window which will be processed at once. |
| 714 | 714 | ||
| 715 | @item o | 715 | @item overlap, o |
| 716 | Set window overlap, in percentage of window size. Allowed range is from @code{50} | 716 | Set window overlap, in percentage of window size. Allowed range is from @code{50} |
| 717 | to @code{95}. Default value is @code{75} percent. | 717 | to @code{95}. Default value is @code{75} percent. |
| 718 | 718 | ||
| 719 | @item a | 719 | @item arorder, a |
| 720 | Set autoregression order, in percentage of window size. Allowed range is from | 720 | Set 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 controls | 721 | @code{0} to @code{25}. Default value is @code{8} percent. This option also controls |
| 722 | quality of interpolated samples using neighbour good samples. | 722 | quality of interpolated samples using neighbour good samples. |
| 723 | 723 | ||
| 724 | @item t | 724 | @item threshold, t |
| 725 | Set threshold value. Allowed range is from @code{1} to @code{100}. | 725 | Set threshold value. Allowed range is from @code{1} to @code{100}. |
| 726 | Default value is @code{10}. Higher values make clip detection less aggressive. | 726 | Default value is @code{10}. Higher values make clip detection less aggressive. |
| 727 | 727 | ||
| 728 | @item n | 728 | @item hsize, n |
| 729 | Set size of histogram used to detect clips. Allowed range is from @code{100} to @code{9999}. | 729 | Set size of histogram used to detect clips. Allowed range is from @code{100} to @code{9999}. |
| 730 | Default value is @code{1000}. Higher values make clip detection less aggressive. | 730 | Default value is @code{1000}. Higher values make clip detection less aggressive. |
| 731 | 731 | ||
| 732 | @item m | 732 | @item method, m |
| 733 | Set overlap method. | 733 | Set overlap method. |
| 734 | 734 | ||
| 735 | It accepts the following values: | 735 | It accepts the following values: |
| 736 | @table @option | 736 | @table @option |
| 737 | @item a | 737 | @item add, a |
| 738 | Select overlap-add method. Even not interpolated samples are slightly changed | 738 | Select overlap-add method. Even not interpolated samples are slightly changed |
| 739 | with this method. | 739 | with this method. |
| 740 | 740 | ||
| 741 | @item s | 741 | @item save, s |
| 742 | Select overlap-save method. Not interpolated samples remain unchanged. | 742 | Select overlap-save method. Not interpolated samples remain unchanged. |
| 743 | @end table | 743 | @end table |
| 744 | 744 | ||
| @@ -92,13 +92,21 @@ typedef struct AudioDeclickContext { · 91 unmodified lines | |||
| 92 | #define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM | 92 | #define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
| 93 | 93 | ||
| 94 | static const AVOption adeclick_options[] = { | 94 | static 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 | ||
| 771 | static const AVOption adeclip_options[] = { | 779 | static 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 | ||