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}
This commit is contained in:
peah 2016-03-07 16:59:39 -08:00 committed by Commit bot
parent e1d9a4a2c9
commit 6ebc4d3f7d
8 changed files with 24 additions and 26 deletions

View File

@ -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.

View File

@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -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<ExtendedFilter>().enabled;
delay_agnostic_enabled_ = config.Get<DelayAgnostic>().enabled;
next_generation_aec_enabled_ = config.Get<NextGenerationAec>().enabled;
aec3_enabled_ = config.Get<EchoCanceller3>().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;

View File

@ -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_);

View File

@ -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;
};

View File

@ -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<DelayAgnostic>(new DelayAgnostic(true));
} else if (strcmp(argv[i], "--next_generation_aec") == 0) {
config.Set<NextGenerationAec>(new NextGenerationAec(true));
} else if (strcmp(argv[i], "--aec3") == 0) {
config.Set<EchoCanceller3>(new EchoCanceller3(true));
} else if (strcmp(argv[i], "-aecm") == 0) {
ASSERT_EQ(apm->kNoError, apm->echo_control_mobile()->Enable(true));