Made the AEC3 alignment a mandatory for using the adaptive filter delay
This CL ensures that the adaptive filter delay is not used for fine tune echo removal unless the render and capture signals have been properly aligned. BUG=webrtc:8189 Review-Url: https://codereview.webrtc.org/3003303002 Cr-Commit-Position: refs/heads/master@{#19492}
This commit is contained in:
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user