OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 class Beamformer; | 30 class Beamformer; |
31 | 31 |
32 class EchoCancellation; | 32 class EchoCancellation; |
33 class EchoControlMobile; | 33 class EchoControlMobile; |
34 class GainControl; | 34 class GainControl; |
35 class HighPassFilter; | 35 class HighPassFilter; |
36 class LevelEstimator; | 36 class LevelEstimator; |
37 class NoiseSuppression; | 37 class NoiseSuppression; |
38 class VoiceDetection; | 38 class VoiceDetection; |
39 | 39 |
40 // Use to enable the delay correction feature. This now engages an extended | 40 // Use to enable the extended filter mode in the AEC, along with robustness |
41 // filter mode in the AEC, along with robustness measures around the reported | 41 // measures around the reported system delays. It comes with a significant |
42 // system delays. It comes with a significant increase in AEC complexity, but is | 42 // increase in AEC complexity, but is much more robust to unreliable reported |
43 // much more robust to unreliable reported delays. | 43 // delays. |
44 // | 44 // |
45 // Detailed changes to the algorithm: | 45 // Detailed changes to the algorithm: |
46 // - The filter length is changed from 48 to 128 ms. This comes with tuning of | 46 // - The filter length is changed from 48 to 128 ms. This comes with tuning of |
47 // several parameters: i) filter adaptation stepsize and error threshold; | 47 // several parameters: i) filter adaptation stepsize and error threshold; |
48 // ii) non-linear processing smoothing and overdrive. | 48 // ii) non-linear processing smoothing and overdrive. |
49 // - Option to ignore the reported delays on platforms which we deem | 49 // - Option to ignore the reported delays on platforms which we deem |
50 // sufficiently unreliable. See WEBRTC_UNTRUSTED_DELAY in echo_cancellation.c. | 50 // sufficiently unreliable. See WEBRTC_UNTRUSTED_DELAY in echo_cancellation.c. |
51 // - Faster startup times by removing the excessive "startup phase" processing | 51 // - Faster startup times by removing the excessive "startup phase" processing |
52 // of reported delays. | 52 // of reported delays. |
53 // - Much more conservative adjustments to the far-end read pointer. We smooth | 53 // - Much more conservative adjustments to the far-end read pointer. We smooth |
54 // the delay difference more heavily, and back off from the difference more. | 54 // the delay difference more heavily, and back off from the difference more. |
55 // Adjustments force a readaptation of the filter, so they should be avoided | 55 // Adjustments force a readaptation of the filter, so they should be avoided |
56 // except when really necessary. | 56 // except when really necessary. |
| 57 // TODO(henrik.lundin): Remove DelayCorrection once ExtendedFilter has |
| 58 // propagated through to all channels |
| 59 // (https://code.google.com/p/webrtc/issues/detail?id=4696). |
57 struct DelayCorrection { | 60 struct DelayCorrection { |
58 DelayCorrection() : enabled(false) {} | 61 DelayCorrection() : enabled(false) {} |
59 explicit DelayCorrection(bool enabled) : enabled(enabled) {} | 62 explicit DelayCorrection(bool enabled) : enabled(enabled) {} |
60 bool enabled; | 63 bool enabled; |
61 }; | 64 }; |
| 65 struct ExtendedFilter { |
| 66 ExtendedFilter() : enabled(false) {} |
| 67 explicit ExtendedFilter(bool enabled) : enabled(enabled) {} |
| 68 bool enabled; |
| 69 }; |
62 | 70 |
63 // Use to disable the reported system delays. By disabling the reported system | 71 // Use to disable the reported system delays. By disabling the reported system |
64 // delays the echo cancellation algorithm assumes the process and reverse | 72 // delays the echo cancellation algorithm assumes the process and reverse |
65 // streams to be aligned. This configuration only applies to EchoCancellation | 73 // streams to be aligned. This configuration only applies to EchoCancellation |
66 // and not EchoControlMobile and is set with AudioProcessing::SetExtraOptions(). | 74 // and not EchoControlMobile and is set with AudioProcessing::SetExtraOptions(). |
67 // Note that by disabling reported system delays the EchoCancellation may | 75 // Note that by disabling reported system delays the EchoCancellation may |
68 // regress in performance. | 76 // regress in performance. |
69 struct ReportedDelay { | 77 struct ReportedDelay { |
70 ReportedDelay() : enabled(true) {} | 78 ReportedDelay() : enabled(true) {} |
71 explicit ReportedDelay(bool enabled) : enabled(enabled) {} | 79 explicit ReportedDelay(bool enabled) : enabled(enabled) {} |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 // This does not impact the size of frames passed to |ProcessStream()|. | 790 // This does not impact the size of frames passed to |ProcessStream()|. |
783 virtual int set_frame_size_ms(int size) = 0; | 791 virtual int set_frame_size_ms(int size) = 0; |
784 virtual int frame_size_ms() const = 0; | 792 virtual int frame_size_ms() const = 0; |
785 | 793 |
786 protected: | 794 protected: |
787 virtual ~VoiceDetection() {} | 795 virtual ~VoiceDetection() {} |
788 }; | 796 }; |
789 } // namespace webrtc | 797 } // namespace webrtc |
790 | 798 |
791 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ | 799 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ |
OLD | NEW |