delay estimator: Look for early reverberation

Look for first echo (and not only the strongest one) on the same matched
filter.

This change is bit exact with previous version when `pre_echo` is false.

Author: Jesús de Vicente Peña <devicentepena@webrtc.org>

Bug: webrtc:14205
Change-Id: I6782eaa1d690b0df78d00f6d425a85c951b2ca9d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266321
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37360}
This commit is contained in:
Lionel Koenig
2022-06-28 15:37:13 +02:00
committed by WebRTC LUCI CQ
parent 7534ebd2bf
commit 8783c678a5
14 changed files with 957 additions and 395 deletions

View File

@ -59,6 +59,7 @@ struct RTC_EXPORT EchoCanceller3Config {
};
AlignmentMixing render_alignment_mixing = {false, true, 10000.f, true};
AlignmentMixing capture_alignment_mixing = {false, true, 10000.f, false};
bool detect_pre_echo = false;
} delay;
struct Filter {

View File

@ -220,6 +220,7 @@ void Aec3ConfigFromJsonString(absl::string_view json_string,
&cfg.delay.render_alignment_mixing);
ReadParam(section, "capture_alignment_mixing",
&cfg.delay.capture_alignment_mixing);
ReadParam(section, "detect_pre_echo", &cfg.delay.detect_pre_echo);
}
if (rtc::GetValueFromJsonObject(aec3_root, "filter", &section)) {
@ -505,7 +506,9 @@ std::string Aec3ConfigToJsonString(const EchoCanceller3Config& config) {
<< (config.delay.capture_alignment_mixing.prefer_first_two_channels
? "true"
: "false");
ost << "}";
ost << "},";
ost << "\"detect_pre_echo\": "
<< (config.delay.detect_pre_echo ? "true" : "false");
ost << "},";
ost << "\"filter\": {";