Ensure that the adaptive filter is properly adapted in AEC3

Bug: webrtc:8746
Change-Id: I087a7c629be51df6751aa44f6f7d22a6b2d46d0b
Reviewed-on: https://webrtc-review.googlesource.com/39510
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21622}
This commit is contained in:
Per Åhgren 2018-01-15 13:22:43 +01:00 committed by Commit Bot
parent b5adc9e4cb
commit 3f1c062c6e

View File

@ -154,7 +154,7 @@ void AecState::Update(
// TODO(peah): Move?
filter_has_had_time_to_converge_ =
blocks_with_proper_filter_adaptation_ >= 2 * kNumBlocksPerSecond;
blocks_with_proper_filter_adaptation_ >= 2.5 * kNumBlocksPerSecond;
initial_state_ =
blocks_with_proper_filter_adaptation_ < 5 * kNumBlocksPerSecond;
@ -162,7 +162,7 @@ void AecState::Update(
// Flag whether the linear filter estimate is usable.
usable_linear_estimate_ =
!echo_saturation_ &&
(converged_filter || filter_has_had_time_to_converge_) &&
(converged_filter && filter_has_had_time_to_converge_) &&
capture_block_counter_ >= 2 * kNumBlocksPerSecond && !TransparentMode();
// After an amount of active render samples for which an echo should have been