AEC3: Add signal dependent mixing before alignment
This CL adds code for doing signal-dependent downmixing before the delay estimation in the multichannel case. As part of the CL, the unittests of the render delay controller are corrected. However, as that caused some of them to fail, the CL (for now) as well disables the failing test. Bug: webrtc:11153,chromium:1029740, webrtc:11161 Change-Id: I0b765c28fa5e547aabd6dfbd24b626ff9a16346f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161045 Commit-Queue: Per Åhgren <peah@webrtc.org> Reviewed-by: Sam Zackrisson <saza@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29980}
This commit is contained in:
@ -34,7 +34,8 @@ namespace {
|
||||
class RenderDelayControllerImpl final : public RenderDelayController {
|
||||
public:
|
||||
RenderDelayControllerImpl(const EchoCanceller3Config& config,
|
||||
int sample_rate_hz);
|
||||
int sample_rate_hz,
|
||||
size_t num_capture_channels);
|
||||
~RenderDelayControllerImpl() override;
|
||||
void Reset(bool reset_delay_confidence) override;
|
||||
void LogRenderCall() override;
|
||||
@ -89,13 +90,14 @@ int RenderDelayControllerImpl::instance_count_ = 0;
|
||||
|
||||
RenderDelayControllerImpl::RenderDelayControllerImpl(
|
||||
const EchoCanceller3Config& config,
|
||||
int sample_rate_hz)
|
||||
int sample_rate_hz,
|
||||
size_t num_capture_channels)
|
||||
: data_dumper_(
|
||||
new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))),
|
||||
hysteresis_limit_blocks_(
|
||||
static_cast<int>(config.delay.hysteresis_limit_blocks)),
|
||||
delay_headroom_samples_(config.delay.delay_headroom_samples),
|
||||
delay_estimator_(data_dumper_.get(), config),
|
||||
delay_estimator_(data_dumper_.get(), config, num_capture_channels),
|
||||
last_delay_estimate_quality_(DelayEstimate::Quality::kCoarse) {
|
||||
RTC_DCHECK(ValidFullBandRate(sample_rate_hz));
|
||||
delay_estimator_.LogDelayEstimationProperties(sample_rate_hz, 0);
|
||||
@ -181,8 +183,10 @@ bool RenderDelayControllerImpl::HasClockdrift() const {
|
||||
|
||||
RenderDelayController* RenderDelayController::Create(
|
||||
const EchoCanceller3Config& config,
|
||||
int sample_rate_hz) {
|
||||
return new RenderDelayControllerImpl(config, sample_rate_hz);
|
||||
int sample_rate_hz,
|
||||
size_t num_capture_channels) {
|
||||
return new RenderDelayControllerImpl(config, sample_rate_hz,
|
||||
num_capture_channels);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user