Files
platform-external-webrtc/modules/audio_processing/aec3/reverb_model_estimator.cc
Per Åhgren ef5d5af3a0 AEC3: Increasing the accuracy of the detection for early reverb
This CL introduces an adaptive estimation of the early reverb
in the estimation for the room reverberation. The benefits of
this is that for room with long early reflections there is
a lower risk of underestimating the reverberation.

This CL is for a landing the code in
https://webrtc-review.googlesource.com/c/src/+/87420,
and the review of the code was done in that CL. The author of
code is devicentepena@webrtc.org

Bug: webrtc:9479, chromium:865397
Change-Id: Id6f57e2a684664aef96e8c502e66775f37da59da
Reviewed-on: https://webrtc-review.googlesource.com/91162
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24146}
2018-07-30 22:34:19 +00:00

38 lines
1.4 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.
*/
#include "modules/audio_processing/aec3/reverb_model_estimator.h"
namespace webrtc {
ReverbModelEstimator::ReverbModelEstimator(const EchoCanceller3Config& config)
: reverb_decay_estimator_(config) {}
ReverbModelEstimator::~ReverbModelEstimator() = default;
void ReverbModelEstimator::Update(
rtc::ArrayView<const float> impulse_response,
const std::vector<std::array<float, kFftLengthBy2Plus1>>&
frequency_response,
const absl::optional<float>& linear_filter_quality,
int filter_delay_blocks,
bool usable_linear_estimate,
bool stationary_block) {
// Estimate the frequency response for the reverb.
reverb_frequency_response_.Update(frequency_response, filter_delay_blocks,
linear_filter_quality, stationary_block);
// Estimate the reverb decay,
reverb_decay_estimator_.Update(impulse_response, linear_filter_quality,
filter_delay_blocks, usable_linear_estimate,
stationary_block);
}
} // namespace webrtc