Delete AecState::EchoPathGain()

Follow-up CL to https://webrtc-review.googlesource.com/c/src/+/155363
The value is computed, and only used, within AecState::Update().

Bug: webrtc:10913
Change-Id: I4e4248452a463f654c0310657b49c74ffa4c55b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156161
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29412}
This commit is contained in:
Sam Zackrisson 2019-10-09 08:00:29 +02:00 committed by Commit Bot
parent e1092c0bc8
commit 0169a3e5cc
2 changed files with 4 additions and 10 deletions

View File

@ -66,7 +66,6 @@ AecState::AecState(const EchoCanceller3Config& config,
filter_quality_state_(config_),
erl_estimator_(2 * kNumBlocksPerSecond),
erle_estimator_(2 * kNumBlocksPerSecond, config_, num_capture_channels),
max_echo_path_gain_(config_.ep_strength.default_gain),
filter_analyzers_(num_capture_channels),
echo_audibility_(
config_.echo_audibility.use_stationarity_properties_at_init),
@ -85,7 +84,6 @@ void AecState::HandleEchoPathChange(
for (auto& filter_analyzer : filter_analyzers_) {
filter_analyzer->Reset();
}
max_echo_path_gain_ = config_.ep_strength.default_gain;
capture_signal_saturation_ = false;
strong_not_saturated_render_blocks_ = 0;
blocks_with_active_render_ = 0;
@ -130,7 +128,7 @@ void AecState::Update(
bool any_filter_converged = false;
bool all_filters_diverged = true;
bool any_filter_consistent = false;
max_echo_path_gain_ = 0.f;
float max_echo_path_gain = 0.f;
for (size_t ch = 0; ch < subtractor_output.size(); ++ch) {
subtractor_output_analyzers_[ch].Update(subtractor_output[ch]);
any_filter_converged = any_filter_converged ||
@ -142,8 +140,8 @@ void AecState::Update(
render_buffer);
any_filter_consistent =
any_filter_consistent || filter_analyzers_[ch]->Consistent();
max_echo_path_gain_ =
std::max(max_echo_path_gain_, filter_analyzers_[ch]->Gain());
max_echo_path_gain =
std::max(max_echo_path_gain, filter_analyzers_[ch]->Gain());
}
// Estimate the direct path delay of the filter.
@ -206,7 +204,7 @@ void AecState::Update(
// Detect and flag echo saturation.
saturation_detector_.Update(aligned_render_block, SaturatedCapture(),
UsableLinearEstimate(), subtractor_output,
EchoPathGain());
max_echo_path_gain);
// Update the decision on whether to use the initial state parameter set.
initial_state_.Update(active_render, SaturatedCapture());

View File

@ -56,9 +56,6 @@ class AecState {
config_.filter.use_linear_filter;
}
// Returns the estimated echo path gain.
float EchoPathGain() const { return max_echo_path_gain_; }
// Returns whether the render signal is currently active.
bool ActiveRender() const { return blocks_with_active_render_ > 200; }
@ -292,7 +289,6 @@ class AecState {
ErleEstimator erle_estimator_;
size_t strong_not_saturated_render_blocks_ = 0;
size_t blocks_with_active_render_ = 0;
float max_echo_path_gain_;
bool capture_signal_saturation_ = false;
std::vector<std::unique_ptr<FilterAnalyzer>> filter_analyzers_;
absl::optional<DelayEstimate> external_delay_;