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

Unified Diff: webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc

Issue 3003303002: Made the AEC3 alignment mandatory for using the adaptive filter delay (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
diff --git a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
index f3b310657dbc81ca4ed778c884ab732cc628ca36..70801976888e0291028a654f0eb143fb38cd5e17 100644
--- a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
+++ b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
@@ -95,10 +95,10 @@ void ResidualEchoEstimator::Estimate(
RTC_DCHECK(R2);
const rtc::Optional<size_t> delay =
- aec_state.FilterDelay()
- ? aec_state.FilterDelay()
- : (aec_state.ExternalDelay() ? aec_state.ExternalDelay()
- : rtc::Optional<size_t>());
+ aec_state.ExternalDelay()
+ ? (aec_state.FilterDelay() ? aec_state.FilterDelay()
+ : aec_state.ExternalDelay())
+ : rtc::Optional<size_t>();
// Estimate the power of the stationary noise in the render signal.
RenderNoisePower(render_buffer, &X2_noise_floor_, &X2_noise_floor_counter_);
@@ -115,7 +115,7 @@ void ResidualEchoEstimator::Estimate(
} else {
// Estimate the echo generating signal power.
std::array<float, kFftLengthBy2Plus1> X2;
- if (aec_state.ExternalDelay() || aec_state.FilterDelay()) {
+ if (aec_state.ExternalDelay() && aec_state.FilterDelay()) {
RTC_DCHECK(delay);
const int delay_use = static_cast<int>(*delay);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698