This CL enables extracting the linear AEC output,
allowing for more straightforward
testing/development.
Bug: b/140823178
Change-Id: I14f7934008d87066b35500466cb6e6d96f811688
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153672
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29789}
Type mismatches will silently fail and skip reading a parameter
in the JSON parsing, except when parsing a size_t from a negative int.
This CL updates the parsing to silently ignore negative values provided
for size_t config parameters, instead of explicitly DCHECKing.
Tested: Ran the fuzzer on the crash test case with + without this fix.
Bug: chromium:1016139
Change-Id: I3899e81e1183aa54b708030efeb6e0006b8cd881
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157894
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29568}
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}
Multichannel signals are downmixed to mono before decimation and
delay estimation. This is useful when not all channels play
audio content. The feature can be toggled in the AEC3 configuration.
Bug: webrtc:10913
Change-Id: I7d40edf7732bb51fec69e7f3ca063d821c5069c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151762
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29126}
This CL removes a long unused fallback behavior for the reverb
computation.
Bug: webrtc:8671
Change-Id: I4b57795a9bb33769237858f40392881ee235653e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148520
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28802}
The configuration parameter filter.use_linear_filter can be used to
disable the linear filtering. Disabling the linear filter is equivalent
to runing in non-linear mode.
Bug: b/130016532
Change-Id: I8ffdf474822888b9915444bba6cc1c25ec1efe5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132552
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27566}
This change removes the following unused parameters from the AEC3
configuration:
- render_pre_window_size_init
- render_post_window_size_init
- nonlinear_hold
- nonlinear_release
Bug: webrtc:8671
Change-Id: I8f7a3d350387cd8ada4d507c3a9fab43b7813f5c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131321
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27450}
This CL removes parameters for AEC3 which are no longer used. To reflect
that change, one of the parameters also is renamed
Bug: chromium:941949,webrtc:8671
Change-Id: I26609b396fa14ecb7523eebfe531a1338718103b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127780
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27128}
This change reduces the risk of echo due to noise in the headroom
of the linear filter.
Changes:
- Use shorter delay headroom
- Delay headroom is specified in samples (not blocks)
- No hysteresis limit when delay is reduced
Bug: chromium:119942,webrtc:10341
Change-Id: I708e80e26d541dff8ca04b6da2d346a1d59cbfcb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126420
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27126}
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 is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.
Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
In this CL a more precise estimation of the Erle is introduced. This is done by creating different estimators that are specialized in different regions of the linear filter. An estimation of which regions were used for generating the current echo estimate is performed and used for selecting the right Erle estimator.
Bug: webrtc:9961
Change-Id: Iba6eb24596c067c3c66d40df590be379d3e1bb7b
Reviewed-on: https://webrtc-review.googlesource.com/c/109400
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25707}
This CL creates a new API for the parser of APM json config that
that provides an explicit way for the user to know when there has
been an issue in the parsing of the json config data.
Bug: webrtc:9921
Change-Id: Idd8f40529f40ab6871efb5b356c0fd2cea21b7d9
Reviewed-on: https://webrtc-review.googlesource.com/c/107841
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25355}
Some issues were surfaced during testing:
- Config validation clamping silently passed NaNs
- Config validation only fixed the first out-of-bounds parameter, and
not any subsequent ones
- Config validation did not check all values in the config
- use_stationarity_properties_at_init is misspelled in JSON parsing
These changes are identical to those in this CL:
https://webrtc-review.googlesource.com/c/src/+/107120
Bug: webrtc:9535
Change-Id: I36c5e7c69ffdc2c0c24a9be86ccb1df59683c0fe
Reviewed-on: https://webrtc-review.googlesource.com/c/107640
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25318}
This reverts commit 8ee06a7b0c.
Reason for revert: ubsan triggers on config randomization
Original change's description:
> Increase coverage of AEC3 JSON config unit tests, fix bugs
>
> The new test checks that json strings are unchanged when parsing to a
> config and back to a string. This ensures that everything in the json
> representations is parsed when created a config from the json.
>
> This CL also adds the render_levels config substruct to the JSON parser.
>
> Some issues were surfaced by the new test:
> - Config validation clamping silently passed NaNs
> - Config validation only fixed the first out-of-bounds parameter, and
> not any subsequent ones
> - Config validation did not check all values in the config
>
> Bug: webrtc:9535
> Change-Id: Ie7b588731dc1fe26ba71d1eb2f177f3b3b8139e3
> Reviewed-on: https://webrtc-review.googlesource.com/c/107120
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25310}
TBR=saza@webrtc.org,peah@webrtc.org
Change-Id: I12d4a6e35110241c51c13eff547ee5a640d141bc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9535
Reviewed-on: https://webrtc-review.googlesource.com/c/107624
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25313}
The new test checks that json strings are unchanged when parsing to a
config and back to a string. This ensures that everything in the json
representations is parsed when created a config from the json.
This CL also adds the render_levels config substruct to the JSON parser.
Some issues were surfaced by the new test:
- Config validation clamping silently passed NaNs
- Config validation only fixed the first out-of-bounds parameter, and
not any subsequent ones
- Config validation did not check all values in the config
Bug: webrtc:9535
Change-Id: Ie7b588731dc1fe26ba71d1eb2f177f3b3b8139e3
Reviewed-on: https://webrtc-review.googlesource.com/c/107120
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25310}
This change makes the dominant nearend detection more accurate.
- The hangover is increased not leave nearend state between words.
- The SNR requirement is increased to not enter nearend state without
speech activity.
- An early exit mechanism has been added to leave nearend state quickly
when the echo is strong.
Bug: chromium:897701,webrtc:9897
Change-Id: I9e0f3e6ecb80eee1c0c917d4835f110555f74acf
Reviewed-on: https://webrtc-review.googlesource.com/c/107347
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25299}
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}
"Perfection is achieved, not when there is nothing more to add,
but when there is nothing left to take away."
This CL removes the following kill-switches from AEC3
- WebRTC-Aec3DownSamplingFactor8KillSwitch
- WebRTC-Aec3NewSuppressionKillSwitch
- WebRTC-Aec3ShadowFilterJumpstartKillSwitch
- WebRTC-Aec3SlowFilterAdaptationKillSwitch
- WebRTC-Aec3SuppressorNearendAveragingKillSwitch
It also removes code paths and configuration parameters that are no
longer in use. The list of kill-switches in the audio processing
fuzzer test is updated.
The change has been tested for bit-exactness.
Bug: webrtc:8671
Change-Id: Ie0af86a14baf853548bf9c00b2b9b3bbc32c1aaa
Reviewed-on: https://webrtc-review.googlesource.com/c/105324
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25120}
This CL replaces CHECKs and crashes with DCHECKs and default values.
Bug: webrtc:9535
Change-Id: Ib4b16421699c633d0e9ef140189861c8179450f4
Reviewed-on: https://webrtc-review.googlesource.com/c/105003
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25111}