From 6ebc4d3f7dbcdf93c742a51135f456c875e4cd95 Mon Sep 17 00:00:00 2001 From: peah Date: Mon, 7 Mar 2016 16:59:39 -0800 Subject: [PATCH] Changed name for the upcoming AEC from NextGenerationAec to AEC3. BUG=webrtc:5201 Review URL: https://codereview.webrtc.org/1763703002 Cr-Commit-Position: refs/heads/master@{#11895} --- webrtc/common.h | 2 +- webrtc/modules/audio_processing/aec/aec_core.cc | 13 ++++++------- webrtc/modules/audio_processing/aec/aec_core.h | 4 ++-- .../audio_processing/aec/aec_core_internal.h | 2 +- .../audio_processing/echo_cancellation_impl.cc | 11 +++++------ .../audio_processing/echo_cancellation_impl.h | 4 ++-- .../audio_processing/include/audio_processing.h | 8 ++++---- .../modules/audio_processing/test/process_test.cc | 6 +++--- 8 files changed, 24 insertions(+), 26 deletions(-) diff --git a/webrtc/common.h b/webrtc/common.h index e33d3efe07..58aba517e9 100644 --- a/webrtc/common.h +++ b/webrtc/common.h @@ -32,7 +32,7 @@ enum class ConfigOptionID { kExperimentalNs, kBeamforming, kIntelligibility, - kNextGenerationAec + kEchoCanceller3 }; // Class Config is designed to ease passing a set of options across webrtc code. diff --git a/webrtc/modules/audio_processing/aec/aec_core.cc b/webrtc/modules/audio_processing/aec/aec_core.cc index e7a10cda68..1b5f03fec4 100644 --- a/webrtc/modules/audio_processing/aec/aec_core.cc +++ b/webrtc/modules/audio_processing/aec/aec_core.cc @@ -1439,7 +1439,7 @@ AecCore* WebRtcAec_CreateAec() { WebRtc_set_lookahead(aec->delay_estimator, kLookaheadBlocks); #endif aec->extended_filter_enabled = 0; - aec->next_generation_aec_enabled = 0; + aec->aec3_enabled = 0; // Assembly optimization WebRtcAec_FilterFar = FilterFar; @@ -1873,14 +1873,13 @@ int WebRtcAec_delay_agnostic_enabled(AecCore* self) { return self->delay_agnostic_enabled; } -void WebRtcAec_enable_next_generation_aec(AecCore* self, int enable) { - self->next_generation_aec_enabled = (enable != 0); +void WebRtcAec_enable_aec3(AecCore* self, int enable) { + self->aec3_enabled = (enable != 0); } -int WebRtcAec_next_generation_aec_enabled(AecCore* self) { - assert(self->next_generation_aec_enabled == 0 || - self->next_generation_aec_enabled == 1); - return self->next_generation_aec_enabled; +int WebRtcAec_aec3_enabled(AecCore* self) { + assert(self->aec3_enabled == 0 || self->aec3_enabled == 1); + return self->aec3_enabled; } diff --git a/webrtc/modules/audio_processing/aec/aec_core.h b/webrtc/modules/audio_processing/aec/aec_core.h index 854b7236e7..ffff8cae7e 100644 --- a/webrtc/modules/audio_processing/aec/aec_core.h +++ b/webrtc/modules/audio_processing/aec/aec_core.h @@ -114,10 +114,10 @@ void WebRtcAec_enable_delay_agnostic(AecCore* self, int enable); int WebRtcAec_delay_agnostic_enabled(AecCore* self); // Non-zero enables, zero disables. -void WebRtcAec_enable_next_generation_aec(AecCore* self, int enable); +void WebRtcAec_enable_aec3(AecCore* self, int enable); // Returns 1 if the next generation aec is enabled and zero if disabled. -int WebRtcAec_next_generation_aec_enabled(AecCore* self); +int WebRtcAec_aec3_enabled(AecCore* self); // Enables or disables extended filter mode. Non-zero enables, zero disables. void WebRtcAec_enable_extended_filter(AecCore* self, int enable); diff --git a/webrtc/modules/audio_processing/aec/aec_core_internal.h b/webrtc/modules/audio_processing/aec/aec_core_internal.h index b13c077bd7..810d517834 100644 --- a/webrtc/modules/audio_processing/aec/aec_core_internal.h +++ b/webrtc/modules/audio_processing/aec/aec_core_internal.h @@ -150,7 +150,7 @@ struct AecCore { // 1 = extended filter mode enabled, 0 = disabled. int extended_filter_enabled; // 1 = next generation aec mode enabled, 0 = disabled. - int next_generation_aec_enabled; + int aec3_enabled; // Runtime selection of number of filter partitions. int num_partitions; diff --git a/webrtc/modules/audio_processing/echo_cancellation_impl.cc b/webrtc/modules/audio_processing/echo_cancellation_impl.cc index cea905515a..223e188a35 100644 --- a/webrtc/modules/audio_processing/echo_cancellation_impl.cc +++ b/webrtc/modules/audio_processing/echo_cancellation_impl.cc @@ -102,7 +102,7 @@ EchoCancellationImpl::EchoCancellationImpl(const AudioProcessing* apm, delay_logging_enabled_(false), extended_filter_enabled_(false), delay_agnostic_enabled_(false), - next_generation_aec_enabled_(false), + aec3_enabled_(false), render_queue_element_max_size_(0) { RTC_DCHECK(apm); RTC_DCHECK(crit_render); @@ -387,9 +387,9 @@ bool EchoCancellationImpl::is_delay_agnostic_enabled() const { return delay_agnostic_enabled_; } -bool EchoCancellationImpl::is_next_generation_aec_enabled() const { +bool EchoCancellationImpl::is_aec3_enabled() const { rtc::CritScope cs(crit_capture_); - return next_generation_aec_enabled_; + return aec3_enabled_; } bool EchoCancellationImpl::is_extended_filter_enabled() const { @@ -503,7 +503,7 @@ void EchoCancellationImpl::SetExtraOptions(const Config& config) { rtc::CritScope cs(crit_capture_); extended_filter_enabled_ = config.Get().enabled; delay_agnostic_enabled_ = config.Get().enabled; - next_generation_aec_enabled_ = config.Get().enabled; + aec3_enabled_ = config.Get().enabled; } Configure(); } @@ -524,8 +524,7 @@ int EchoCancellationImpl::Configure() { extended_filter_enabled_ ? 1 : 0); WebRtcAec_enable_delay_agnostic(WebRtcAec_aec_core(my_handle), delay_agnostic_enabled_ ? 1 : 0); - WebRtcAec_enable_next_generation_aec(WebRtcAec_aec_core(my_handle), - next_generation_aec_enabled_ ? 1 : 0); + WebRtcAec_enable_aec3(WebRtcAec_aec_core(my_handle), aec3_enabled_ ? 1 : 0); const int handle_error = WebRtcAec_set_config(my_handle, config); if (handle_error != AudioProcessing::kNoError) { error = AudioProcessing::kNoError; diff --git a/webrtc/modules/audio_processing/echo_cancellation_impl.h b/webrtc/modules/audio_processing/echo_cancellation_impl.h index ff7c3ae319..935e7209a8 100644 --- a/webrtc/modules/audio_processing/echo_cancellation_impl.h +++ b/webrtc/modules/audio_processing/echo_cancellation_impl.h @@ -43,7 +43,7 @@ class EchoCancellationImpl : public EchoCancellation { void SetExtraOptions(const Config& config); bool is_delay_agnostic_enabled() const; bool is_extended_filter_enabled() const; - bool is_next_generation_aec_enabled() const; + bool is_aec3_enabled() const; // Reads render side data that has been queued on the render call. // Called holding the capture lock. @@ -94,7 +94,7 @@ class EchoCancellationImpl : public EchoCancellation { bool delay_logging_enabled_ GUARDED_BY(crit_capture_); bool extended_filter_enabled_ GUARDED_BY(crit_capture_); bool delay_agnostic_enabled_ GUARDED_BY(crit_capture_); - bool next_generation_aec_enabled_ GUARDED_BY(crit_capture_); + bool aec3_enabled_ GUARDED_BY(crit_capture_); size_t render_queue_element_max_size_ GUARDED_BY(crit_render_) GUARDED_BY(crit_capture_); diff --git a/webrtc/modules/audio_processing/include/audio_processing.h b/webrtc/modules/audio_processing/include/audio_processing.h index 8af5f53e1e..6fb10c6f85 100644 --- a/webrtc/modules/audio_processing/include/audio_processing.h +++ b/webrtc/modules/audio_processing/include/audio_processing.h @@ -73,10 +73,10 @@ struct ExtendedFilter { // standard methods for echo removal in the AEC. This configuration only applies // to EchoCancellation and not EchoControlMobile. It can be set in the // constructor or using AudioProcessing::SetExtraOptions(). -struct NextGenerationAec { - NextGenerationAec() : enabled(false) {} - explicit NextGenerationAec(bool enabled) : enabled(enabled) {} - static const ConfigOptionID identifier = ConfigOptionID::kNextGenerationAec; +struct EchoCanceller3 { + EchoCanceller3() : enabled(false) {} + explicit EchoCanceller3(bool enabled) : enabled(enabled) {} + static const ConfigOptionID identifier = ConfigOptionID::kEchoCanceller3; bool enabled; }; diff --git a/webrtc/modules/audio_processing/test/process_test.cc b/webrtc/modules/audio_processing/test/process_test.cc index d3b16be31f..576245f63a 100644 --- a/webrtc/modules/audio_processing/test/process_test.cc +++ b/webrtc/modules/audio_processing/test/process_test.cc @@ -81,7 +81,7 @@ void usage() { printf(" --aec_suppression_level LEVEL [0 - 2]\n"); printf(" --extended_filter\n"); printf(" --no_reported_delay\n"); - printf(" --next_generation_aec\n"); + printf(" --aec3\n"); printf("\n -aecm Echo control mobile\n"); printf(" --aecm_echo_path_in_file FILE\n"); printf(" --aecm_echo_path_out_file FILE\n"); @@ -268,8 +268,8 @@ void void_main(int argc, char* argv[]) { } else if (strcmp(argv[i], "--delay_agnostic") == 0) { config.Set(new DelayAgnostic(true)); - } else if (strcmp(argv[i], "--next_generation_aec") == 0) { - config.Set(new NextGenerationAec(true)); + } else if (strcmp(argv[i], "--aec3") == 0) { + config.Set(new EchoCanceller3(true)); } else if (strcmp(argv[i], "-aecm") == 0) { ASSERT_EQ(apm->kNoError, apm->echo_control_mobile()->Enable(true));