Commit graph

36 commits

Author SHA1 Message Date
Florent Castelli
8037fc6ffa Migrate absl::optional to std::optional
Bug: webrtc:342905193
No-Try: True
Change-Id: Icc968be43b8830038ea9a1f5f604307220457807
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361021
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42911}
2024-09-02 12:16:47 +00:00
Gustaf Ullberg
d3ead1a942 AEC3: 'Block' class
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}
2022-05-23 09:53:46 +00:00
Jesús de Vicente Peña
7d0203c723 AEC3: adding a milder exponential decay parameter that is used for dominant nearend regions when enabled.
Bug: webrtc:13143
Change-Id: Iedc6ff39ed5c7cd372b54a82c86354957c8852de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231131
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34947}
2021-09-08 11:36:50 +00:00
Gustaf Ullberg
a63d152423 AEC3: Unbounded echo spectrum for dominant nearend detection.
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}
2021-06-11 13:30:00 +00:00
Gustaf Ullberg
437d129ef5 AEC3: Avoid overcompensating for render onsets during dominant nearend
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}
2021-04-20 12:33:02 +00:00
Per Åhgren
ff0451117e AEC3: Rename main filter
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}
2020-03-20 13:25:01 +00:00
Sam Zackrisson
b18c4eb0a9 Add parameterization for three multi channel AEC3 unit tests
Bug: webrtc:11295
Change-Id: I478aa02908c494cf9609db00021438a59a132b66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167202
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30370}
2020-01-24 12:26:46 +00:00
Per Åhgren
f9807259a6 AEC3: Send the spectral power estimates for all channels to AecState
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}
2019-10-09 12:51:21 +00:00
Sam Zackrisson
46b0140172 Update filter analyzer for multi channel
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}
2019-10-08 15:44:43 +00:00
Per Åhgren
b4161d3c0d AEC3: Add multichannel support to the residual echo estimator
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}
2019-10-08 11:18:35 +00:00
Sam Zackrisson
8f736c0aeb AEC3: Analyze multi-channel SubtractorOutput in AecState
Updates SubtractorOutputAnalyzer and AecState::SaturationDetector
to multi-channel.

Bug: webrtc:10913
Change-Id: I39edafdc5d5a4db5cc853cf116d60af0f506b3bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154342
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29355}
2019-10-01 11:36:58 +00:00
Per Åhgren
ce202a0f98 Reland "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 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}
2019-09-03 06:12:32 +00:00
Per Åhgren
d112c75801 Revert "Reland "Add core multi-channel pipeline in AEC3 This CL adds basic the basic pipeline to support multi-channel processing in AEC3.""
This reverts commit a66395e72f.

Reason for revert: Breaking downstream tests

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}

TBR=saza@webrtc.org,peah@webrtc.org

Change-Id: I0e9fd154da5910d73b7a4c82e4e588f3220fd39d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10913
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151126
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29038}
2019-09-02 13:57:07 +00:00
Per Åhgren
a66395e72f 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}
2019-09-02 12:08:27 +00:00
Ilya Nikolaevskiy
e3e30ae5c5 Revert "Add core multi-channel pipeline in AEC3"
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}
2019-08-30 10:19:29 +00:00
Per Åhgren
f3a197e553 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}
2019-08-30 08:07:27 +00:00
Gustaf Ullberg
cd277b84da AEC3: Fix computation of audio buffer delay
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}
2019-08-19 11:05:21 +00:00
Gustaf Ullberg
e47433f017 AEC3: Remove legacy render buffering
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}
2019-01-25 08:31:12 +00:00
Gustaf Ullberg
11539f0b29 AEC3: Simplify render buffering
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}
2018-10-15 13:31:50 +00:00
Per Åhgren
b20b93796f AEC3: Refactor the code for analyzing filter convergence
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}
2018-07-12 23:13:08 +00:00
Danil Chapovalov
db9f7ab9f9 Replace rtc::Optional with absl::optional in modules/audio processing
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}
2018-06-19 10:38:56 +00:00
Per Åhgren
5c532d3774 Robustification of the echo suppression behavior during headset usage.
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}
2018-03-22 00:23:23 +00:00
Per Åhgren
3ab308f869 Inform the AEC3 echo remover about the status of the estimated delay
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}
2018-02-21 17:08:36 +00:00
Gustaf Ullberg
3646f973c2 AEC3 includes echo_canceller3_config.h directly
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}
2018-02-15 08:30:14 +00:00
Per Åhgren
08ea5898ff Separated the AEC3 adaptive filter parameters into sub-structs
Bug: webrtc:8671
Change-Id: I02bceceb85da6db65f65c1a2366a2d5021f148ef
Reviewed-on: https://webrtc-review.googlesource.com/39502
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21617}
2018-01-15 16:48:49 +00:00
Per Åhgren
0e6d2f5118 Use the filter delay to use the proper render block in the AEC3 AecState
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}
2018-01-10 15:53:02 +00:00
Per Åhgren
de22a17b43 Removed usage of the the redundant the render alignment headroom in AEC3
Bug: webrtc:8671
Change-Id: I1b7b1bc2f4677bbd375fc206c166b4b9fed3efce
Reviewed-on: https://webrtc-review.googlesource.com/35220
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21392}
2017-12-20 17:27:26 +00:00
Per Åhgren
09a718accd Added the ability to more easily adjust the filter length in AEC3
Bug: webrtc:8609
Change-Id: If060b332993c2c98d7a12608ab31f4da858b8016
Reviewed-on: https://webrtc-review.googlesource.com/28620
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21216}
2017-12-11 22:02:46 +00:00
Per Åhgren
c59a576c86 Corrections of the render buffering scheme in AEC3 to ensure causality
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}
2017-12-11 21:09:56 +00:00
Per Åhgren
8ba5861f7e Redesign of the render buffering in AEC3
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}
2017-12-01 23:14:32 +00:00
Oskar Sundbom
aa8b67da9d Optional: Use nullopt and implicit construction in /modules/audio_processing
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}
2017-11-20 10:19:30 +00:00
Gustaf Ullberg
bd83b914c3 Separate AEC3 config from AudioProcessing::Config.
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}
2017-10-19 08:19:52 +00:00
Per Åhgren
1b4059e84f Transparency improvements for AEC3 during call start and after resets
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}
2017-10-17 06:00:50 +00:00
Per Åhgren
c65ce78027 Separated the NLP behavior in AEC3 for different echo estimates.
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}
2017-10-09 13:16:37 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
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}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
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)