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

Unified Diff: webrtc/modules/audio_processing/echo_cancellation_impl.cc

Issue 1887003002: Added support in the AEC for refined filter adaptation. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changes in response to reviewer comments. Created 4 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/echo_cancellation_impl.cc
diff --git a/webrtc/modules/audio_processing/echo_cancellation_impl.cc b/webrtc/modules/audio_processing/echo_cancellation_impl.cc
index 12ea75efe1b65ff9f3da7bda63d027426c449830..c18ed94bd2c1b97bb4157e610c647149bab41560 100644
--- a/webrtc/modules/audio_processing/echo_cancellation_impl.cc
+++ b/webrtc/modules/audio_processing/echo_cancellation_impl.cc
@@ -415,7 +415,16 @@ bool EchoCancellationImpl::is_aec3_enabled() const {
std::string EchoCancellationImpl::GetExperimentsDescription() {
rtc::CritScope cs(crit_capture_);
- return aec3_enabled_ ? "AEC3" : "";
+ std::string description = (aec3_enabled_ ? "AEC3" : "");
+ if (refined_adaptive_filter_enabled_) {
+ description += ";RefinedAdaptiveFilter";
+ }
+ return description;
+}
+
+bool EchoCancellationImpl::is_refined_adaptive_filter_enabled() const {
+ rtc::CritScope cs(crit_capture_);
+ return refined_adaptive_filter_enabled_;
}
bool EchoCancellationImpl::is_extended_filter_enabled() const {
@@ -534,6 +543,8 @@ void EchoCancellationImpl::SetExtraOptions(const Config& config) {
rtc::CritScope cs(crit_capture_);
extended_filter_enabled_ = config.Get<ExtendedFilter>().enabled;
delay_agnostic_enabled_ = config.Get<DelayAgnostic>().enabled;
+ refined_adaptive_filter_enabled_ =
+ config.Get<RefinedAdaptiveFilter>().enabled;
aec3_enabled_ = config.Get<EchoCanceller3>().enabled;
}
Configure();
@@ -556,6 +567,9 @@ int EchoCancellationImpl::Configure() {
delay_agnostic_enabled_ ? 1 : 0);
WebRtcAec_enable_aec3(WebRtcAec_aec_core(canceller->state()),
aec3_enabled_ ? 1 : 0);
+ WebRtcAec_enable_refined_adaptive_filter(
+ WebRtcAec_aec_core(canceller->state()),
+ refined_adaptive_filter_enabled_);
const int handle_error = WebRtcAec_set_config(canceller->state(), config);
if (handle_error != AudioProcessing::kNoError) {
error = AudioProcessing::kNoError;
« no previous file with comments | « webrtc/modules/audio_processing/echo_cancellation_impl.h ('k') | webrtc/modules/audio_processing/include/audio_processing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698