AEC3: Removing unused parameters
This CL removes parameters for AEC3 which are no longer used. To reflect that change, one of the parameters also is renamed Bug: chromium:941949,webrtc:8671 Change-Id: I26609b396fa14ecb7523eebfe531a1338718103b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127780 Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org> Commit-Queue: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27128}
This commit is contained in:
parent
ab03638eb6
commit
e8efbbd61b
@ -142,9 +142,7 @@ bool EchoCanceller3Config::Validate(EchoCanceller3Config* config) {
|
||||
}
|
||||
res = res & Limit(&c->erle.num_sections, 1, c->filter.main.length_blocks);
|
||||
|
||||
res = res & Limit(&c->ep_strength.lf, 0.f, 1000000.f);
|
||||
res = res & Limit(&c->ep_strength.mf, 0.f, 1000000.f);
|
||||
res = res & Limit(&c->ep_strength.hf, 0.f, 1000000.f);
|
||||
res = res & Limit(&c->ep_strength.default_gain, 0.f, 1000000.f);
|
||||
res = res & Limit(&c->ep_strength.default_len, -1.f, 1.f);
|
||||
|
||||
res =
|
||||
@ -166,13 +164,6 @@ bool EchoCanceller3Config::Validate(EchoCanceller3Config* config) {
|
||||
res = res & Limit(&c->render_levels.poor_excitation_render_limit_ds8, 0.f,
|
||||
32768.f * 32768.f);
|
||||
|
||||
res =
|
||||
res & Limit(&c->echo_removal_control.gain_rampup.initial_gain, 0.f, 1.f);
|
||||
res = res & Limit(&c->echo_removal_control.gain_rampup.non_zero_gain_blocks,
|
||||
0, 100000);
|
||||
res = res &
|
||||
Limit(&c->echo_removal_control.gain_rampup.full_gain_blocks, 0, 100000);
|
||||
|
||||
res = res & Limit(&c->echo_model.noise_floor_hold, 0, 1000);
|
||||
res = res & Limit(&c->echo_model.min_noise_floor_power, 0, 2000000.f);
|
||||
res = res & Limit(&c->echo_model.stationary_gate_slope, 0, 1000000.f);
|
||||
|
||||
@ -86,9 +86,7 @@ struct RTC_EXPORT EchoCanceller3Config {
|
||||
} erle;
|
||||
|
||||
struct EpStrength {
|
||||
float lf = 1.f;
|
||||
float mf = 1.f;
|
||||
float hf = 1.f;
|
||||
float default_gain = 1.f;
|
||||
float default_len = 0.83f;
|
||||
bool reverb_based_on_render = true;
|
||||
bool echo_can_saturate = true;
|
||||
@ -113,11 +111,6 @@ struct RTC_EXPORT EchoCanceller3Config {
|
||||
} render_levels;
|
||||
|
||||
struct EchoRemovalControl {
|
||||
struct GainRampup {
|
||||
float initial_gain = 0.0f;
|
||||
int non_zero_gain_blocks = 187;
|
||||
int full_gain_blocks = 312;
|
||||
} gain_rampup;
|
||||
bool has_clock_drift = false;
|
||||
bool linear_and_stable_echo_path = false;
|
||||
} echo_removal_control;
|
||||
|
||||
@ -193,9 +193,7 @@ void Aec3ConfigFromJsonString(absl::string_view json_string,
|
||||
}
|
||||
|
||||
if (rtc::GetValueFromJsonObject(aec3_root, "ep_strength", §ion)) {
|
||||
ReadParam(section, "lf", &cfg.ep_strength.lf);
|
||||
ReadParam(section, "mf", &cfg.ep_strength.mf);
|
||||
ReadParam(section, "hf", &cfg.ep_strength.hf);
|
||||
ReadParam(section, "default_gain", &cfg.ep_strength.default_gain);
|
||||
ReadParam(section, "default_len", &cfg.ep_strength.default_len);
|
||||
ReadParam(section, "reverb_based_on_render",
|
||||
&cfg.ep_strength.reverb_based_on_render);
|
||||
@ -233,15 +231,6 @@ void Aec3ConfigFromJsonString(absl::string_view json_string,
|
||||
|
||||
if (rtc::GetValueFromJsonObject(aec3_root, "echo_removal_control",
|
||||
§ion)) {
|
||||
Json::Value subsection;
|
||||
if (rtc::GetValueFromJsonObject(section, "gain_rampup", &subsection)) {
|
||||
ReadParam(subsection, "initial_gain",
|
||||
&cfg.echo_removal_control.gain_rampup.initial_gain);
|
||||
ReadParam(subsection, "non_zero_gain_blocks",
|
||||
&cfg.echo_removal_control.gain_rampup.non_zero_gain_blocks);
|
||||
ReadParam(subsection, "full_gain_blocks",
|
||||
&cfg.echo_removal_control.gain_rampup.full_gain_blocks);
|
||||
}
|
||||
ReadParam(section, "has_clock_drift",
|
||||
&cfg.echo_removal_control.has_clock_drift);
|
||||
ReadParam(section, "linear_and_stable_echo_path",
|
||||
@ -413,9 +402,7 @@ std::string Aec3ConfigToJsonString(const EchoCanceller3Config& config) {
|
||||
ost << "},";
|
||||
|
||||
ost << "\"ep_strength\": {";
|
||||
ost << "\"lf\": " << config.ep_strength.lf << ",";
|
||||
ost << "\"mf\": " << config.ep_strength.mf << ",";
|
||||
ost << "\"hf\": " << config.ep_strength.hf << ",";
|
||||
ost << "\"default_gain\": " << config.ep_strength.default_gain << ",";
|
||||
ost << "\"default_len\": " << config.ep_strength.default_len << ",";
|
||||
ost << "\"reverb_based_on_render\": "
|
||||
<< (config.ep_strength.reverb_based_on_render ? "true" : "false") << ",";
|
||||
@ -456,14 +443,6 @@ std::string Aec3ConfigToJsonString(const EchoCanceller3Config& config) {
|
||||
ost << "},";
|
||||
|
||||
ost << "\"echo_removal_control\": {";
|
||||
ost << "\"gain_rampup\": {";
|
||||
ost << "\"initial_gain\": "
|
||||
<< config.echo_removal_control.gain_rampup.initial_gain << ",";
|
||||
ost << "\"non_zero_gain_blocks\": "
|
||||
<< config.echo_removal_control.gain_rampup.non_zero_gain_blocks << ",";
|
||||
ost << "\"full_gain_blocks\": "
|
||||
<< config.echo_removal_control.gain_rampup.full_gain_blocks;
|
||||
ost << "},";
|
||||
ost << "\"has_clock_drift\": "
|
||||
<< (config.echo_removal_control.has_clock_drift ? "true" : "false")
|
||||
<< ",";
|
||||
|
||||
@ -50,7 +50,7 @@ FilterAnalyzer::FilterAnalyzer(const EchoCanceller3Config& config)
|
||||
: data_dumper_(
|
||||
new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))),
|
||||
bounded_erl_(config.ep_strength.bounded_erl),
|
||||
default_gain_(config.ep_strength.lf),
|
||||
default_gain_(config.ep_strength.default_gain),
|
||||
h_highpass_(GetTimeDomainLength(config.filter.main.length_blocks), 0.f),
|
||||
filter_length_blocks_(config.filter.main_initial.length_blocks),
|
||||
consistent_filter_detector_(config) {
|
||||
|
||||
@ -113,7 +113,7 @@ void ResidualEchoEstimator::Estimate(
|
||||
|
||||
float echo_path_gain;
|
||||
echo_path_gain =
|
||||
aec_state.TransparentMode() ? 0.01f : config_.ep_strength.lf;
|
||||
aec_state.TransparentMode() ? 0.01f : config_.ep_strength.default_gain;
|
||||
NonLinearEstimate(echo_path_gain, X2, Y2, R2);
|
||||
|
||||
// When there is saturated echo, assume the same spectral content as is
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user