AEC3: Slower adaptation of main filter
The main filter is adapted at a lower rate which reduces the risk of diverging during double talk. The change yields notable transparency improvements. Bug: webrtc:9497 Change-Id: Ib23b7a4055d313dede535d2b65dc7e023a2db042 Reviewed-on: https://webrtc-review.googlesource.com/87300 Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23858}
This commit is contained in:

committed by
Commit Bot

parent
0f5dc8b5f3
commit
51f4014acd
@ -46,10 +46,10 @@ struct EchoCanceller3Config {
|
|||||||
float noise_gate;
|
float noise_gate;
|
||||||
};
|
};
|
||||||
|
|
||||||
MainConfiguration main = {13, 0.005f, 0.1f, 0.001f, 20075344.f};
|
MainConfiguration main = {13, 0.0005f, 0.01f, 0.001f, 20075344.f};
|
||||||
ShadowConfiguration shadow = {13, 0.7f, 20075344.f};
|
ShadowConfiguration shadow = {13, 0.7f, 20075344.f};
|
||||||
|
|
||||||
MainConfiguration main_initial = {12, 0.05f, 5.f, 0.001f, 20075344.f};
|
MainConfiguration main_initial = {12, 0.005f, 0.5f, 0.001f, 20075344.f};
|
||||||
ShadowConfiguration shadow_initial = {12, 0.9f, 20075344.f};
|
ShadowConfiguration shadow_initial = {12, 0.9f, 20075344.f};
|
||||||
|
|
||||||
size_t config_change_duration_blocks = 250;
|
size_t config_change_duration_blocks = 250;
|
||||||
|
@ -46,6 +46,10 @@ bool EnableSuppressorNearendAveraging() {
|
|||||||
"WebRTC-Aec3SuppressorNearendAveragingKillSwitch");
|
"WebRTC-Aec3SuppressorNearendAveragingKillSwitch");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool EnableSlowFilterAdaptation() {
|
||||||
|
return !field_trial::IsEnabled("WebRTC-Aec3SlowFilterAdaptationKillSwitch");
|
||||||
|
}
|
||||||
|
|
||||||
// Method for adjusting config parameter dependencies..
|
// Method for adjusting config parameter dependencies..
|
||||||
EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) {
|
EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) {
|
||||||
EchoCanceller3Config adjusted_cfg = config;
|
EchoCanceller3Config adjusted_cfg = config;
|
||||||
@ -98,6 +102,13 @@ EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) {
|
|||||||
adjusted_cfg.suppressor.nearend_average_blocks = 1;
|
adjusted_cfg.suppressor.nearend_average_blocks = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!EnableSlowFilterAdaptation()) {
|
||||||
|
adjusted_cfg.filter.main.leakage_converged = 0.005f;
|
||||||
|
adjusted_cfg.filter.main.leakage_diverged = 0.1f;
|
||||||
|
adjusted_cfg.filter.main_initial.leakage_converged = 0.05f;
|
||||||
|
adjusted_cfg.filter.main_initial.leakage_diverged = 5.f;
|
||||||
|
}
|
||||||
|
|
||||||
return adjusted_cfg;
|
return adjusted_cfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ TEST(MainFilterUpdateGain, GainCausesFilterToConverge) {
|
|||||||
std::array<float, kBlockSize> y;
|
std::array<float, kBlockSize> y;
|
||||||
FftData G;
|
FftData G;
|
||||||
|
|
||||||
RunFilterUpdateTest(500, delay_samples, filter_length_blocks,
|
RunFilterUpdateTest(600, delay_samples, filter_length_blocks,
|
||||||
blocks_with_echo_path_changes, blocks_with_saturation,
|
blocks_with_echo_path_changes, blocks_with_saturation,
|
||||||
false, &e, &y, &G);
|
false, &e, &y, &G);
|
||||||
|
|
||||||
@ -253,11 +253,11 @@ TEST(MainFilterUpdateGain, DecreasingGain) {
|
|||||||
std::array<float, kFftLengthBy2Plus1> G_b_power;
|
std::array<float, kFftLengthBy2Plus1> G_b_power;
|
||||||
std::array<float, kFftLengthBy2Plus1> G_c_power;
|
std::array<float, kFftLengthBy2Plus1> G_c_power;
|
||||||
|
|
||||||
RunFilterUpdateTest(100, 65, 12, blocks_with_echo_path_changes,
|
RunFilterUpdateTest(250, 65, 12, blocks_with_echo_path_changes,
|
||||||
blocks_with_saturation, false, &e, &y, &G_a);
|
blocks_with_saturation, false, &e, &y, &G_a);
|
||||||
RunFilterUpdateTest(300, 65, 12, blocks_with_echo_path_changes,
|
RunFilterUpdateTest(500, 65, 12, blocks_with_echo_path_changes,
|
||||||
blocks_with_saturation, false, &e, &y, &G_b);
|
blocks_with_saturation, false, &e, &y, &G_b);
|
||||||
RunFilterUpdateTest(600, 65, 12, blocks_with_echo_path_changes,
|
RunFilterUpdateTest(750, 65, 12, blocks_with_echo_path_changes,
|
||||||
blocks_with_saturation, false, &e, &y, &G_c);
|
blocks_with_saturation, false, &e, &y, &G_c);
|
||||||
|
|
||||||
G_a.Spectrum(Aec3Optimization::kNone, G_a_power);
|
G_a.Spectrum(Aec3Optimization::kNone, G_a_power);
|
||||||
|
Reference in New Issue
Block a user