Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: webrtc/modules/audio_processing/include/audio_processing.h

Issue 2567513003: Added basic framework for AEC3 in the audio processing module (Closed)
Patch Set: Changes in response to reviewer comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // the delay difference more heavily, and back off from the difference more. 61 // the delay difference more heavily, and back off from the difference more.
62 // Adjustments force a readaptation of the filter, so they should be avoided 62 // Adjustments force a readaptation of the filter, so they should be avoided
63 // except when really necessary. 63 // except when really necessary.
64 struct ExtendedFilter { 64 struct ExtendedFilter {
65 ExtendedFilter() : enabled(false) {} 65 ExtendedFilter() : enabled(false) {}
66 explicit ExtendedFilter(bool enabled) : enabled(enabled) {} 66 explicit ExtendedFilter(bool enabled) : enabled(enabled) {}
67 static const ConfigOptionID identifier = ConfigOptionID::kExtendedFilter; 67 static const ConfigOptionID identifier = ConfigOptionID::kExtendedFilter;
68 bool enabled; 68 bool enabled;
69 }; 69 };
70 70
71 // Enables the next generation AEC functionality. This feature replaces the
72 // standard methods for echo removal in the AEC. This configuration only applies
73 // to EchoCancellation and not EchoControlMobile. It can be set in the
74 // constructor or using AudioProcessing::SetExtraOptions().
75 struct EchoCanceller3 {
76 EchoCanceller3() : enabled(false) {}
77 explicit EchoCanceller3(bool enabled) : enabled(enabled) {}
78 static const ConfigOptionID identifier = ConfigOptionID::kEchoCanceller3;
79 bool enabled;
80 };
81
82 // Enables the refined linear filter adaptation in the echo canceller. 71 // Enables the refined linear filter adaptation in the echo canceller.
83 // This configuration only applies to EchoCancellation and not 72 // This configuration only applies to EchoCancellation and not
84 // EchoControlMobile. It can be set in the constructor 73 // EchoControlMobile. It can be set in the constructor
85 // or using AudioProcessing::SetExtraOptions(). 74 // or using AudioProcessing::SetExtraOptions().
86 struct RefinedAdaptiveFilter { 75 struct RefinedAdaptiveFilter {
87 RefinedAdaptiveFilter() : enabled(false) {} 76 RefinedAdaptiveFilter() : enabled(false) {}
88 explicit RefinedAdaptiveFilter(bool enabled) : enabled(enabled) {} 77 explicit RefinedAdaptiveFilter(bool enabled) : enabled(enabled) {}
89 static const ConfigOptionID identifier = 78 static const ConfigOptionID identifier =
90 ConfigOptionID::kAecRefinedAdaptiveFilter; 79 ConfigOptionID::kAecRefinedAdaptiveFilter;
91 bool enabled; 80 bool enabled;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) 256 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
268 bool enabled = false; 257 bool enabled = false;
269 #else 258 #else
270 bool enabled = true; 259 bool enabled = true;
271 #endif 260 #endif
272 } residual_echo_detector; 261 } residual_echo_detector;
273 262
274 struct HighPassFilter { 263 struct HighPassFilter {
275 bool enabled = false; 264 bool enabled = false;
276 } high_pass_filter; 265 } high_pass_filter;
266
267 // Enables the next generation AEC functionality. This feature replaces the
268 // standard methods for echo removal in the AEC.
269 // The functionality is not yet activated in the code and turning this on
270 // does not yet have the desired behavior.
271 struct EchoCanceller3 {
272 bool enabled = false;
273 } echo_canceller3;
277 }; 274 };
278 275
279 // TODO(mgraczyk): Remove once all methods that use ChannelLayout are gone. 276 // TODO(mgraczyk): Remove once all methods that use ChannelLayout are gone.
280 enum ChannelLayout { 277 enum ChannelLayout {
281 kMono, 278 kMono,
282 // Left, right. 279 // Left, right.
283 kStereo, 280 kStereo,
284 // Mono, keyboard, and mic. 281 // Mono, keyboard, and mic.
285 kMonoAndKeyboard, 282 kMonoAndKeyboard,
286 // Left, right, keyboard, and mic. 283 // Left, right, keyboard, and mic.
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 // This does not impact the size of frames passed to |ProcessStream()|. 1078 // This does not impact the size of frames passed to |ProcessStream()|.
1082 virtual int set_frame_size_ms(int size) = 0; 1079 virtual int set_frame_size_ms(int size) = 0;
1083 virtual int frame_size_ms() const = 0; 1080 virtual int frame_size_ms() const = 0;
1084 1081
1085 protected: 1082 protected:
1086 virtual ~VoiceDetection() {} 1083 virtual ~VoiceDetection() {}
1087 }; 1084 };
1088 } // namespace webrtc 1085 } // namespace webrtc
1089 1086
1090 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ 1087 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/echo_cancellation_impl.cc ('k') | webrtc/modules/audio_processing/include/config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698