AEC3: Fix ENR in the dominant nearend detection
Correcting a mistake in the dominant nearend detection where the meaning of the echo-to-nearend ratio was inversed. Bug: webrtc:8671 Change-Id: I7f56369fad1784e256150c312b6b3dafcb9d0f71 Reviewed-on: https://webrtc-review.googlesource.com/c/112136 Reviewed-by: Per Åhgren <peah@webrtc.org> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25818}
This commit is contained in:

committed by
Commit Bot

parent
cf69d2209b
commit
de10eea6fc
@ -182,8 +182,8 @@ struct RTC_EXPORT EchoCanceller3Config {
|
|||||||
0.25f);
|
0.25f);
|
||||||
|
|
||||||
struct DominantNearendDetection {
|
struct DominantNearendDetection {
|
||||||
float enr_threshold = 4.f;
|
float enr_threshold = .25f;
|
||||||
float enr_exit_threshold = .1f;
|
float enr_exit_threshold = 10.f;
|
||||||
float snr_threshold = 30.f;
|
float snr_threshold = 30.f;
|
||||||
int hold_duration = 50;
|
int hold_duration = 50;
|
||||||
int trigger_threshold = 12;
|
int trigger_threshold = 12;
|
||||||
|
@ -419,7 +419,7 @@ void SuppressionGain::DominantNearendDetector::Update(
|
|||||||
// Detect strong active nearend if the nearend is sufficiently stronger than
|
// Detect strong active nearend if the nearend is sufficiently stronger than
|
||||||
// the echo and the nearend noise.
|
// the echo and the nearend noise.
|
||||||
if ((!initial_state || use_during_initial_phase_) &&
|
if ((!initial_state || use_during_initial_phase_) &&
|
||||||
ne_sum > enr_threshold_ * echo_sum &&
|
echo_sum < enr_threshold_ * ne_sum &&
|
||||||
ne_sum > snr_threshold_ * noise_sum) {
|
ne_sum > snr_threshold_ * noise_sum) {
|
||||||
if (++trigger_counter_ >= trigger_threshold_) {
|
if (++trigger_counter_ >= trigger_threshold_) {
|
||||||
// After a period of strong active nearend activity, flag nearend mode.
|
// After a period of strong active nearend activity, flag nearend mode.
|
||||||
@ -432,7 +432,7 @@ void SuppressionGain::DominantNearendDetector::Update(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Exit nearend-state early at strong echo.
|
// Exit nearend-state early at strong echo.
|
||||||
if (ne_sum < enr_exit_threshold_ * echo_sum &&
|
if (echo_sum > enr_exit_threshold_ * ne_sum &&
|
||||||
echo_sum > snr_threshold_ * noise_sum) {
|
echo_sum > snr_threshold_ * noise_sum) {
|
||||||
hold_counter_ = 0;
|
hold_counter_ = 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user