webrtc_m130/api/audio/echo_canceller3_config.h
Per Åhgren 85eef49fa2 Further decrease the AEC3 look window in the nonlinear mode
This CL further decreases the look window size, as well
as the effect of the look window used by AEC3 when is is
in the nonlinear mode.

Bug: chromium:826720,webrtc:9083
Change-Id: I193539c0af74eea18d2821a3b7e1fae2f783d38a
Reviewed-on: https://webrtc-review.googlesource.com/65161
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22659}
2018-03-28 18:15:57 +00:00

139 lines
3.7 KiB
C++

/*
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef API_AUDIO_ECHO_CANCELLER3_CONFIG_H_
#define API_AUDIO_ECHO_CANCELLER3_CONFIG_H_
#include <stddef.h> // size_t
namespace webrtc {
// Configuration struct for EchoCanceller3
struct EchoCanceller3Config {
EchoCanceller3Config();
EchoCanceller3Config(const EchoCanceller3Config& e);
struct Delay {
size_t default_delay = 5;
size_t down_sampling_factor = 4;
size_t num_filters = 5;
size_t api_call_jitter_blocks = 26;
size_t min_echo_path_delay_blocks = 0;
size_t delay_headroom_blocks = 2;
size_t hysteresis_limit_1_blocks = 1;
size_t hysteresis_limit_2_blocks = 1;
size_t skew_hysteresis_blocks = 1;
} delay;
struct Filter {
struct MainConfiguration {
size_t length_blocks;
float leakage_converged;
float leakage_diverged;
float error_floor;
float noise_gate;
};
struct ShadowConfiguration {
size_t length_blocks;
float rate;
float noise_gate;
};
MainConfiguration main = {13, 0.005f, 0.1f, 0.001f, 20075344.f};
ShadowConfiguration shadow = {13, 0.7f, 20075344.f};
MainConfiguration main_initial = {12, 0.05f, 5.f, 0.001f, 20075344.f};
ShadowConfiguration shadow_initial = {12, 0.9f, 20075344.f};
size_t config_change_duration_blocks = 250;
} filter;
struct Erle {
float min = 1.f;
float max_l = 4.f;
float max_h = 1.5f;
} erle;
struct EpStrength {
float lf = 2.f;
float mf = 2.f;
float hf = 2.f;
float default_len = 0.f;
bool echo_can_saturate = true;
bool bounded_erl = false;
} ep_strength;
struct Mask {
float m1 = 0.01f;
float m2 = 0.0001f;
float m3 = 0.01f;
float m4 = 0.1f;
float m5 = 0.1f;
float m6 = 0.0001f;
float m7 = 0.01f;
float m8 = 0.0001f;
float m9 = 0.1f;
} gain_mask;
struct EchoAudibility {
float low_render_limit = 4 * 64.f;
float normal_render_limit = 64.f;
} echo_audibility;
struct RenderLevels {
float active_render_limit = 100.f;
float poor_excitation_render_limit = 150.f;
} render_levels;
struct GainUpdates {
struct GainChanges {
float max_inc;
float max_dec;
float rate_inc;
float rate_dec;
float min_inc;
float min_dec;
};
GainChanges low_noise = {2.f, 2.f, 1.4f, 1.4f, 1.1f, 1.1f};
GainChanges initial = {2.f, 2.f, 1.5f, 1.5f, 1.2f, 1.2f};
GainChanges normal = {2.f, 2.f, 1.5f, 1.5f, 1.2f, 1.2f};
GainChanges saturation = {1.2f, 1.2f, 1.5f, 1.5f, 1.f, 1.f};
GainChanges nonlinear = {1.5f, 1.5f, 1.2f, 1.2f, 1.1f, 1.1f};
float floor_first_increase = 0.00001f;
} gain_updates;
struct EchoRemovalControl {
struct GainRampup {
float first_non_zero_gain = 0.001f;
int non_zero_gain_blocks = 187;
int full_gain_blocks = 312;
} gain_rampup;
bool has_clock_drift = false;
} echo_removal_control;
struct EchoModel {
size_t noise_floor_hold = 50;
float min_noise_floor_power = 1638400.f;
float stationary_gate_slope = 10.f;
float noise_gate_power = 27509.42f;
float noise_gate_slope = 0.3f;
size_t render_pre_window_size = 1;
size_t render_post_window_size = 1;
float nonlinear_hold = 1;
float nonlinear_release = 0.001f;
} echo_model;
};
} // namespace webrtc
#endif // API_AUDIO_ECHO_CANCELLER3_CONFIG_H_