| 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 extended filter mode in the AEC, along with robustness | 40 // Use to enable the delay correction feature. This now engages an extended |
| 41 // measures around the reported system delays. It comes with a significant | 41 // filter mode in the AEC, along with robustness measures around the reported |
| 42 // increase in AEC complexity, but is much more robust to unreliable reported | 42 // system delays. It comes with a significant increase in AEC complexity, but is |
| 43 // delays. | 43 // much more robust to unreliable reported 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). | |
| 60 struct DelayCorrection { | 57 struct DelayCorrection { |
| 61 DelayCorrection() : enabled(false) {} | 58 DelayCorrection() : enabled(false) {} |
| 62 explicit DelayCorrection(bool enabled) : enabled(enabled) {} | 59 explicit DelayCorrection(bool enabled) : enabled(enabled) {} |
| 63 bool enabled; | 60 bool enabled; |
| 64 }; | 61 }; |
| 65 struct ExtendedFilter { | |
| 66 ExtendedFilter() : enabled(false) {} | |
| 67 explicit ExtendedFilter(bool enabled) : enabled(enabled) {} | |
| 68 bool enabled; | |
| 69 }; | |
| 70 | 62 |
| 71 // Use to disable the reported system delays. By disabling the reported system | 63 // Use to disable the reported system delays. By disabling the reported system |
| 72 // delays the echo cancellation algorithm assumes the process and reverse | 64 // delays the echo cancellation algorithm assumes the process and reverse |
| 73 // streams to be aligned. This configuration only applies to EchoCancellation | 65 // streams to be aligned. This configuration only applies to EchoCancellation |
| 74 // and not EchoControlMobile and is set with AudioProcessing::SetExtraOptions(). | 66 // and not EchoControlMobile and is set with AudioProcessing::SetExtraOptions(). |
| 75 // Note that by disabling reported system delays the EchoCancellation may | 67 // Note that by disabling reported system delays the EchoCancellation may |
| 76 // regress in performance. | 68 // regress in performance. |
| 77 struct ReportedDelay { | 69 struct ReportedDelay { |
| 78 ReportedDelay() : enabled(true) {} | 70 ReportedDelay() : enabled(true) {} |
| 79 explicit ReportedDelay(bool enabled) : enabled(enabled) {} | 71 explicit ReportedDelay(bool enabled) : enabled(enabled) {} |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 // This does not impact the size of frames passed to |ProcessStream()|. | 782 // This does not impact the size of frames passed to |ProcessStream()|. |
| 791 virtual int set_frame_size_ms(int size) = 0; | 783 virtual int set_frame_size_ms(int size) = 0; |
| 792 virtual int frame_size_ms() const = 0; | 784 virtual int frame_size_ms() const = 0; |
| 793 | 785 |
| 794 protected: | 786 protected: |
| 795 virtual ~VoiceDetection() {} | 787 virtual ~VoiceDetection() {} |
| 796 }; | 788 }; |
| 797 } // namespace webrtc | 789 } // namespace webrtc |
| 798 | 790 |
| 799 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ | 791 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ |
| OLD | NEW |