This change adds a Block class to reduce the need for std::vector<std::vector<std::vector<float>>>. This make the code
easier to read and less error prone.
It also enables future changes to the underlying data structure of a
block. For instance, the data of all bands and channels could be stored
in a single vector.
The change has been verified to be bit-exact.
Bug: webrtc:14089
Change-Id: Ied9a78124c0bbafe0e912017aef91f7c311de2ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262252
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36968}
The dominant nearend detector uses the residual echo spectrum for
determining whether in nearend state. The residual echo spectrum in
computed using the ERLE. To reduce the risk of echo leaks in the
suppressor, the ERLE is capped. While minimizing echo leaks, the
capping of the ERLE can affect the dominant nearend classification
negatively as the residual echo spectrum is often over estimated.
This change enables the dominant nearend detector to use a residual
echo spectrum computed with a virtually non-capped ERLE. This ERLE
is only used for dominant nearend detection and leads to increased
transparency.
The feature is currently disabled by default and can be enabled
with the field trial "WebRTC-Aec3UseUnboundedEchoSpectrum".
Bug: webrtc:12870
Change-Id: Icb675c6f5d42ab9286e623b5fb38424d5c9cbee4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221920
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34270}
The ERLE is used to estimate residual echo for echo suppression. The
ERLE is reduced during far-end offset to avoid echo leakage. When there
is a strong near-end present this can cause unnecessary transparency loss.
This change adds an ERLE estimation that does not compensate for onsets and
uses it for residual echo estimation when the suppressor considers the near-end to be dominant.
Bug: webrtc:12686
Change-Id: Ida78eeacf1f95c6e62403f86ba3f2ff055898a84
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215323
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33786}
This CL renames the main filter in AEC3 to have the more accurate name
refined filter.
The CL consists of 3 main initial patch sets, designed to simplify
the review:
1) Replaces "main" with "refined" and adds a fall-back functionality
to support the old filter naming.
2) Renames the files according to the new naming.
3) Performs a "git cl format"
Bug: webrtc:8671
Change-Id: Ifd0aab34e291736a2250e0986348404618630b1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170825
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30843}
This CL passes the spectral power estimates for all channels into
the AecState.
Bug: webrtc:10913
Change-Id: Ie3b5c443be0c63f205e23ed2bfea06d9c447eb39
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156165
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29417}
Multi-channel behaviors introduced in this CL:
- All filters are analyzed independently. The filtering is considered
consistent if any filter is consistent.
- The filter echo path gain used to detect saturation is maxed across
capture channels.
- The filter delay is taken to be the minimum of all filters:
Any module that looks in the render data starting from the filter
delay will iterate over all render audio present in any channel.
- The FilterAnalyzer will consider a render block to be active if any
render channel has activity.
The changes in the CL has been shown to be bitexact on a
large set of mono recordings.
Bug: webrtc:10913
Change-Id: I1e360cd7136ee82d1f6e0f8a1459806e83f4426d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155363
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29408}
This CL adds support for multichannel in the residual echo
estimator code. It also adds placeholder functionality in
the surrounding code to ensure that the residual echo
estimator receives the require inputs.
The changes in the CL has been shown to be bitexact on a
large set of mono recordings.
Bug: webrtc:10913
Change-Id: I726128ca928648b1dcf36c5f479eb243f3ff3f96
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155361
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29400}
This is a reland of a66395e72f
Original change's description:
> Reland "Add core multi-channel pipeline in AEC3 This CL adds basic the basic pipeline to support multi-channel processing in AEC3."
>
> This is a reland of f3a197e553
>
> Original change's description:
> > Add core multi-channel pipeline in AEC3
> > This CL adds basic the basic pipeline to support multi-channel
> > processing in AEC3.
> >
> > Apart from that, it removes the 8 kHz processing support in several
> > places of the AEC3 code.
> >
> > Bug: webrtc:10913
> > Change-Id: If5b75fa325ed0071deea94a7546cb4a7adf22137
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150332
> > Commit-Queue: Per Åhgren <peah@webrtc.org>
> > Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#29017}
>
> Bug: webrtc:10913
> Change-Id: Ifc4b13bd994cfd22dca8f8755fa5700617cc379d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151124
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29034}
Bug: webrtc:10913
Change-Id: Id8da5666df8c86f290c73ad5dc9958199f1a7ebe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151127
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29042}
This is a reland of f3a197e553
Original change's description:
> Add core multi-channel pipeline in AEC3
> This CL adds basic the basic pipeline to support multi-channel
> processing in AEC3.
>
> Apart from that, it removes the 8 kHz processing support in several
> places of the AEC3 code.
>
> Bug: webrtc:10913
> Change-Id: If5b75fa325ed0071deea94a7546cb4a7adf22137
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150332
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29017}
Bug: webrtc:10913
Change-Id: Ifc4b13bd994cfd22dca8f8755fa5700617cc379d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151124
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29034}
This reverts commit f3a197e553.
Reason for revert: Speculative revert, as this may'be broken some build bots
Original change's description:
> Add core multi-channel pipeline in AEC3
> This CL adds basic the basic pipeline to support multi-channel
> processing in AEC3.
>
> Apart from that, it removes the 8 kHz processing support in several
> places of the AEC3 code.
>
> Bug: webrtc:10913
> Change-Id: If5b75fa325ed0071deea94a7546cb4a7adf22137
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150332
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29017}
TBR=saza@webrtc.org,peah@webrtc.org
Change-Id: I877d2993b9ccf024bd1d57bca1513c3e24d0bed3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10913
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150940
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29022}
This CL adds basic the basic pipeline to support multi-channel
processing in AEC3.
Apart from that, it removes the 8 kHz processing support in several
places of the AEC3 code.
Bug: webrtc:10913
Change-Id: If5b75fa325ed0071deea94a7546cb4a7adf22137
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150332
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29017}
This change fixes a bug where the initial delay could be set incorrectly.
Bug: webrtc:10896
Change-Id: I66b2234b69c46639488f4561e973384001230861
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149820
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28894}
This CL removes the legacy, no longer used, render buffering code. It
also removes four unused parameters from the AEC3 config. The change
is tested for bit-exactness.
Bug: webrtc:8671
Change-Id: I2bb6cb7a1097863f228767d757d551c00593bb00
Reviewed-on: https://webrtc-review.googlesource.com/c/119701
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26399}
This CL simplifies the buffering of render data. Instead of making assumptions
about the worst possible platform, it leverages recent improvements in
the delay estimator to quickly adapt when the conditions change.
Pros:
- No capture delay, delay is found ~200 ms faster.
- Cleaner code that makes the concept of delay more clear.
- Allows for removal of one matched filter because of the jitter headroom
removal.
Cons:
- Delay estimator needs to re-adapt when the call jitter increases.
The code can be deactivated by a kill switch. When the kill switch is
pulled the CL is bit exact.
Bug: webrtc:9726,chromium:895338
Change-Id: Ie2f9c8c5ce5b5a4510b4bdb95db2b970b57cd5d0
Reviewed-on: https://webrtc-review.googlesource.com/c/96920
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25169}
This CL refactors the code in AEC3 that analyzes how
well the adaptive filter performs. The purpose of this
is both to simplify code that is more complex than needed
and also to pave the wave for the upcoming CLs that
softens the echo suppression during doubletalk.
The main changes are that:
-The shadow adaptive filter is now never analyzed. This
turned out to never affect the output in the recordings
it was tested on.
-The convergence analysis was moved to the aec state
code.
The changes are bitexact on all testcases where they
have been tested on.
Bug: webrtc:8671
Change-Id: If76b669565325c8eb4d11d1178a7e20306da9a26
Reviewed-on: https://webrtc-review.googlesource.com/87430
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23958}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script with parameter 'modules/audio_processing'
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: Id29f8de59dba704787c2c38a3d05c60827c181b0
Reviewed-on: https://webrtc-review.googlesource.com/83982
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23653}
This CL robustifies the echo removal behavior when headsets are used.
In particular it:
-Introduces a secondary, more refined alignment when no alignment can
be found using the delay estimator.
-Changes decision logic for when to use the linear filter output.
-Changes the decision logic for when to be transparent.
-Changes the way that the transparent mode works.
-Makes the nonlinear mode less aggressive.
-Removes the detector for non-audible echoes.
-Makes the attenuation when there are signals with strong narrowband
characteristics more mild in scenarios with low render.
Furthermore the CL:
-Removes the input of external echo leakage information.
Bug: webrtc:9047,chromium:824111,webrtc:8314,webrtc:8671,webrtc:5201,webrtc:5919
Change-Id: Ied1fe0c0a35d3c31b47606ed2db319a73644d406
Reviewed-on: https://webrtc-review.googlesource.com/60866
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22548}
This CL adds functionality for passing the information about the
estimated delay to the echo remover in AEC3.
The CL also adds information about how long ago the delay changed,
and how long ago the delay estimate was updated.
Bug: webrtc:8671
Change-Id: If274ffe0465eb550f3e186d0599c6dc6fef7f5e8
Reviewed-on: https://webrtc-review.googlesource.com/55261
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22137}
Avoid including audio_processing.h from within AEC3.
Bug: webrtc:8844
Change-Id: I02c475c2fb84e2c24eac86baac3c7edaa08bebc0
Reviewed-on: https://webrtc-review.googlesource.com/53065
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22029}
This CL corrects the way that the estimated filter delay is used in
AEC3. In particular
-It uses the filter delay to choose the correct render block in AecState
-It changes the code to reflect that the filter delay is always computed
-It removes part of the code that formerly relied on the filter delay
being an Optional.
Bug: webrtc:8671
Change-Id: I58135a5c174b404707e19a41c3617c09831e871d
Reviewed-on: https://webrtc-review.googlesource.com/35221
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21557}
This CL modifies the refactored render buffering scheme in AEC3
so that:
-A non-causal state can never occur which means that situations with
nonrecoverable echo should not occur.
-For a stable audio pipeline with a predefined API call jitter,
render overruns and underruns can never occur.
Bug: webrtc:8629,chromium:793305
Change-Id: I06ba1c368f92db95274090b08475dd02dbb85145
Reviewed-on: https://webrtc-review.googlesource.com/29861
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21215}
This CL centralizes the render buffering in AEC3 so that all render
buffers are updated and synchronized/aligned with the render alignment
buffer.
Bug: webrtc:8597, chromium:790905
Change-Id: I8a94e5c1f27316b6100b420eec9652ea31c1a91d
Reviewed-on: https://webrtc-review.googlesource.com/25680
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20989}
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.
This CL was uploaded by git cl split.
R=henrik.lundin@webrtc.org
Bug: None
Change-Id: I733a83f702fe11884d229a1713cfac952727bde8
Reviewed-on: https://webrtc-review.googlesource.com/23601
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20786}
The struct containing the config for AEC3 is removed from
AudioProcessing::Config and is put in a new struct called
EchoCanceller3Config.
AEC3 should no longer be activated through
AudioProcessing::ApplyConfig. Instead an EchoCanceller3Factory
can be injected at AudioProcessing creation.
Bug: webrtc:8346
Change-Id: I27e3592e675eec3632a60c45d9e0d12514c2c567
Reviewed-on: https://webrtc-review.googlesource.com/11420
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20342}
This CL changes the AEC3 behavior to be more transparent when there
is uncertainty about the amount of echo in the microphone signal.
Bug: webrtc:8398, chromium:774868
Change-Id: I88e681f8decd892f44397b753df371a1c4b90af0
Reviewed-on: https://webrtc-review.googlesource.com/10801
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20319}
This CL separates the NLP gain computation for the different variants
of echo estimation. This simplifies the setting of tuning
parameters, with resulting transparency improvements and increased
echo removal performance.
Bug: webrtc:8359
Change-Id: I9b97064396fb6f6e2f418ce534573f68694390a1
Reviewed-on: https://webrtc-review.googlesource.com/7613
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20209}
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
In order to eliminate the WebRTC Subtree mirror in Chromium,
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/audio_processing/aec3/residual_echo_estimator_unittest.cc (Browse further)