This CL adds support for multiple channels in the reverb
modelling. As a side effect, it also partly adds multi-channel
supports for the sections of the code.
Beyond adding the multi-channel support, a bug is fixed as part of
this CL. Since the bug fix affects the bitexactness, as a safety
precaution the CL includes the ability to override the bugfix.
Apart from the contributions from the bugfix, the changes have
been verified to be bitexact for a large set of mono recordings.
Bug: webrtc:10913
Change-Id: I1f307b532be85ef4182f8db41384f44d40a25219
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156382
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29456}
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}
This reverts commit e90879097c.
Reason for revert: breaking downstream projects
Original change's description:
> IWYU: Add <cmath> for fabsf() and powf(), switch to C++ versions
>
> Fix the build with libstdc++ after 496cedfe5 ("AEC3: Reverberation model:
> Changes on the decay estimation") by including the missing header:
>
> ../../modules/audio_processing/aec3/reverb_model_estimator.cc: In constructor ‘webrtc::ReverbModelEstimator::ReverbModelEstimator(const webrtc::EchoCanceller3Config&)’:
> ../../modules/audio_processing/aec3/reverb_model_estimator.cc:61:21: error: ‘fabsf’ was not declared in this scope
> reverb_decay_(fabsf(config.ep_strength.default_len)),
> ^~~~~
> ../../modules/audio_processing/aec3/reverb_model_estimator.cc:61:21: note: suggested alternative: ‘labs’
> reverb_decay_(fabsf(config.ep_strength.default_len)),
> ^~~~~
> labs
> ../../modules/audio_processing/aec3/reverb_model_estimator.cc: In member function ‘void webrtc::ReverbModelEstimator::UpdateReverbDecay(const std::vector<float>&)’:
> ../../modules/audio_processing/aec3/reverb_model_estimator.cc:206:15: error: ‘powf’ was not declared in this scope
> decay = powf(2.0f, -exp_candidate * kFftLengthBy2);
> ^~~~
>
> While here, also switch to the C++ versions of those functions: std::fabs()
> and std::pow() respectively.
>
> Spotted by Jose Dapena Paz <jose.dapena@lge.com>.
>
> Bug: chromium:819294
> Change-Id: Id803243be8dd17eac95c70a88a37ee2fe1505a5a
> Reviewed-on: https://webrtc-review.googlesource.com/87421
> Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23870}
TBR=gustaf@webrtc.org,alessiob@webrtc.org,raphael.kubo.da.costa@intel.com,devicentepena@webrtc.org
Change-Id: I22423a2d4201183f70ae084e0e21930367824f1c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:819294
Reviewed-on: https://webrtc-review.googlesource.com/87401
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23871}
Fix the build with libstdc++ after 496cedfe5 ("AEC3: Reverberation model:
Changes on the decay estimation") by including the missing header:
../../modules/audio_processing/aec3/reverb_model_estimator.cc: In constructor ‘webrtc::ReverbModelEstimator::ReverbModelEstimator(const webrtc::EchoCanceller3Config&)’:
../../modules/audio_processing/aec3/reverb_model_estimator.cc:61:21: error: ‘fabsf’ was not declared in this scope
reverb_decay_(fabsf(config.ep_strength.default_len)),
^~~~~
../../modules/audio_processing/aec3/reverb_model_estimator.cc:61:21: note: suggested alternative: ‘labs’
reverb_decay_(fabsf(config.ep_strength.default_len)),
^~~~~
labs
../../modules/audio_processing/aec3/reverb_model_estimator.cc: In member function ‘void webrtc::ReverbModelEstimator::UpdateReverbDecay(const std::vector<float>&)’:
../../modules/audio_processing/aec3/reverb_model_estimator.cc:206:15: error: ‘powf’ was not declared in this scope
decay = powf(2.0f, -exp_candidate * kFftLengthBy2);
^~~~
While here, also switch to the C++ versions of those functions: std::fabs()
and std::pow() respectively.
Spotted by Jose Dapena Paz <jose.dapena@lge.com>.
Bug: chromium:819294
Change-Id: Id803243be8dd17eac95c70a88a37ee2fe1505a5a
Reviewed-on: https://webrtc-review.googlesource.com/87421
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23870}
Fix the build with libstdc++ after 496cedfe5 ("AEC3: Reverberation model:
Changes on the decay estimation") by including the missing header:
../../modules/audio_processing/aec3/reverb_model_estimator.cc: In constructor ‘webrtc::ReverbModelEstimator::ReverbModelEstimator(const webrtc::EchoCanceller3Config&)’:
../../modules/audio_processing/aec3/reverb_model_estimator.cc:61:21: error: ‘fabsf’ was not declared in this scope
reverb_decay_(fabsf(config.ep_strength.default_len)),
^~~~~
../../modules/audio_processing/aec3/reverb_model_estimator.cc:61:21: note: suggested alternative: ‘labs’
reverb_decay_(fabsf(config.ep_strength.default_len)),
^~~~~
labs
../../modules/audio_processing/aec3/reverb_model_estimator.cc: In member function ‘void webrtc::ReverbModelEstimator::UpdateReverbDecay(const std::vector<float>&)’:
../../modules/audio_processing/aec3/reverb_model_estimator.cc:206:15: error: ‘powf’ was not declared in this scope
decay = powf(2.0f, -exp_candidate * kFftLengthBy2);
^~~~
Spotted by Jose Dapena Paz <jose.dapena@lge.com>.
Bug: chromium:819294
Change-Id: If992e5e473b9d4d0c1b3c1006c3816b7c4eee296
Reviewed-on: https://webrtc-review.googlesource.com/87241
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#23863}
In this CL we have introduced changes on the estimation of the decay involved in the exponential modeling of the reverberation. Specifically, the instantaneous ERLE has been tracked and used for adapting faster in the regions when the linear filter is performing well. Furthermore, the adaptation is just perform during render activity.
Change-Id: I974fd60e4e1a40a879660efaa24457ed940f77b4
Bug: webrtc:9479
Reviewed-on: https://webrtc-review.googlesource.com/86680
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23836}