ArrayView is an alias to std::span. This change switch to use
std::span directly instead of through the alias.
Search&Replace MakeArrayView and ArrayView with std::span
Search&Replace include "api/array_view.h" with include <span>
Remove <span> include where std::span is not mentioned in the file
Remove build dependencies on array_view target
Replace ExpectArrayViewEquality helper with ElementsAreArray matcher
in pffft_wrapper_unittest.cc
Bug: webrtc:439801349
Change-Id: I9503bc9003ee6a7e349459989b03f59a7de37ea6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/460320
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47270}
This reverts commit db6adf2e9f.
Reason for revert: Breaks webrtc=>chrome roll https://crrev.com/c/7672366
Original change's description:
> Removed the configuration options for multi_channel processing
>
> This CL removes the explicit configuration options for whether
> the audio processing should be performed in a multi- or
> single-channel manner.
> This change means that the choice of whether to do multi- or
> single-channel audio processing will be made based on the
> content of the audio sent to APM for processing, and the
> audio output requested by APM.
>
> Bug: chromium:464314991
> Change-Id: I55a53f2565c81a7d7ad2e378f944ffcf07c71f4f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/453000
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#47175}
Bug: chromium:464314991
Change-Id: If2888c379fe3a5bfdac6c12225a12705a1377c30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/457640
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47182}
This CL removes the explicit configuration options for whether
the audio processing should be performed in a multi- or
single-channel manner.
This change means that the choice of whether to do multi- or
single-channel audio processing will be made based on the
content of the audio sent to APM for processing, and the
audio output requested by APM.
Bug: chromium:464314991
Change-Id: I55a53f2565c81a7d7ad2e378f944ffcf07c71f4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/453000
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47175}
This reverts commit 8c9f8a0fc0.
Reason for revert: The issues in code that this CL relies on have now been addressed and the CL should now work as intended.
Original change's description:
> Revert "Activate adaptive channel mixing when the echo canceller runs in stereo"
>
> This reverts commit 82a3659e11.
>
> Reason for revert: Seems to be breaking in chromium:
> https://chromium-review.googlesource.com/c/chromium/src/+/7490942?tab=checks
>
> #
> # Fatal error in: third_party/webrtc/modules/audio_processing/audio_buffer.cc, line 152
> # last system error: 2
> # Check failed: !use_adaptive_downmixing || buffer_internal_num_channels_ == 2
> #
>
> Original change's description:
> > Activate adaptive channel mixing when the echo canceller runs in stereo
> >
> > This CL activates adaptive channel mixing when the echo canceller runs in stereo mode.
> > The mixing is provided by the CaptureRemixer class.
> > The adaptive mixing is activated behind a finch-based kill-switch that allows it to be
> > activated.
> >
> > Bug: webrtc:42221468
> > Change-Id: I5c4e79edb69752bbbb4c1cfe9271d1224fb695aa
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/433640
> > Commit-Queue: Per Åhgren <peah@webrtc.org>
> > Reviewed-by: Tomas Lundqvist <tomasl@google.com>
> > Cr-Commit-Position: refs/heads/main@{#46678}
>
> Bug: webrtc:42221468
> Change-Id: Ifc3f489e0fe8b4da1b891fd0dd425280a8698fdf
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/442441
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#46685}
Bug: webrtc:42221468
Change-Id: I720df6d70de705a1027907d3cd2758d6b569cd75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/444140
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46800}
The aecdump config message requires a lot of duplication and boilerplate
in exchange for being able to read the config back at offline simulation
time. The message tends to slip out of sync with APM configuration,
missing many important parameters which hampers reproducibility.
This CL adds many recently added parameters to the dump message, and
makes the message more likely to contain future parameters as well.
This creates some redundancy with older params. They are kept in, to
maintain the ability to parse old aecdumps and to keep our existing
(limited) reproducibility with audioproc_f.
Bug: webrtc:42224259, webrtc:442444736, b:428638881
Change-Id: Ib6e57435a58b0ed417c83ecc627678adb0d0164f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/444260
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46771}
This change cleans up echo control mobile aka AECm code.
AEC3 is a suitable and better alternative.
Bug: webrtc:379762006
Change-Id: Icedf2ccd1817d1710dca624ffbcd65ba4b7fd4c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/442840
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46716}
This change removes the possibility to run AEC mobile version. AEC3 is a
suitable and better alternative.
Follow up changes will remove the actual code.
Bug: webrtc:379762006
Change-Id: I370081af9222093a09ef77076e12195392bf97cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/442200
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46691}
This reverts commit 82a3659e11.
Reason for revert: Seems to be breaking in chromium:
https://chromium-review.googlesource.com/c/chromium/src/+/7490942?tab=checks
#
# Fatal error in: third_party/webrtc/modules/audio_processing/audio_buffer.cc, line 152
# last system error: 2
# Check failed: !use_adaptive_downmixing || buffer_internal_num_channels_ == 2
#
Original change's description:
> Activate adaptive channel mixing when the echo canceller runs in stereo
>
> This CL activates adaptive channel mixing when the echo canceller runs in stereo mode.
> The mixing is provided by the CaptureRemixer class.
> The adaptive mixing is activated behind a finch-based kill-switch that allows it to be
> activated.
>
> Bug: webrtc:42221468
> Change-Id: I5c4e79edb69752bbbb4c1cfe9271d1224fb695aa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/433640
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Tomas Lundqvist <tomasl@google.com>
> Cr-Commit-Position: refs/heads/main@{#46678}
Bug: webrtc:42221468
Change-Id: Ifc3f489e0fe8b4da1b891fd0dd425280a8698fdf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/442441
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46685}
This CL activates adaptive channel mixing when the echo canceller runs in stereo mode.
The mixing is provided by the CaptureRemixer class.
The adaptive mixing is activated behind a finch-based kill-switch that allows it to be
activated.
Bug: webrtc:42221468
Change-Id: I5c4e79edb69752bbbb4c1cfe9271d1224fb695aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/433640
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Cr-Commit-Position: refs/heads/main@{#46678}
This CL integrates the CaptureMixer functionality into the AudioBuffer.
The added feature is default off but can be activated in offline
simulations using audioproc_f.
Change-Id: I5301750d275701ca4c39268715efca15a7a28879
Bug: webrtc:42221468
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/432820
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46657}
Since the VAD module has been removed from audio processing module (APM)
some time ago, there is no need to pass the speech probability as an
input parameter. The speech probability is now computed inside AGC2.
Bug: webrtc:42232605
Change-Id: If4b25bdfb5c8961d4acc81a8440d4be9c8570973
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/421160
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46065}
This reverts commit ddb627e555.
Reason for revert: The downstream tests causing the breaking of the Chromium roll are now addressed.
Original change's description:
> Revert "Switch to use 32 kHz processing inside APM"
>
> This reverts commit 179be29133.
>
> Reason for revert: Broke Chromium roll.
>
> Error: https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/2423056/overview
>
> Original change's description:
> > Switch to use 32 kHz processing inside APM
> >
> > This CL switches to using 32 kHz processing internally inside WebRTC APM
> > to avoid using the current 3-band split filter which has been shown to
> > have issues with aliasing impacting the speech quality.
> >
> > The intention is to revert this change once the issues in the 3-band
> > split filter have been addressed.
> >
> > Bug: webrtc:454695115
> > Change-Id: Id87e7f8d2ba37a915b3640f7eeb5c996037c59aa
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/419860
> > Commit-Queue: Per Åhgren <peah@webrtc.org>
> > Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#46026}
>
> Bug: webrtc:454695115
> Change-Id: I599adf846217f0cb81588e84f541277465ef856a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/420580
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#46037}
Bug: webrtc:454695115
Change-Id: Ic0bb60b8c7103c7eac9563bae2d06935c152764e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/420463
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46046}
This reverts commit 179be29133.
Reason for revert: Broke Chromium roll.
Error: https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/2423056/overview
Original change's description:
> Switch to use 32 kHz processing inside APM
>
> This CL switches to using 32 kHz processing internally inside WebRTC APM
> to avoid using the current 3-band split filter which has been shown to
> have issues with aliasing impacting the speech quality.
>
> The intention is to revert this change once the issues in the 3-band
> split filter have been addressed.
>
> Bug: webrtc:454695115
> Change-Id: Id87e7f8d2ba37a915b3640f7eeb5c996037c59aa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/419860
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#46026}
Bug: webrtc:454695115
Change-Id: I599adf846217f0cb81588e84f541277465ef856a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/420580
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46037}
This CL switches to using 32 kHz processing internally inside WebRTC APM
to avoid using the current 3-band split filter which has been shown to
have issues with aliasing impacting the speech quality.
The intention is to revert this change once the issues in the 3-band
split filter have been addressed.
Bug: webrtc:454695115
Change-Id: Id87e7f8d2ba37a915b3640f7eeb5c996037c59aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/419860
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46026}
This is a no-op refactor: The code is a leftover from when APM supported
8 kHz processing.
Bug: b/452621275
Change-Id: Ib42176fd8568addfcbb982b1ab2e61a9cf9188de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/418021
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45973}
APM initialization has a cyclic dependency:
* the state of submodule_states_ depends on submodules_
* the state of formats_ depends on submodule_states_
* the state of submodules_ depends on submodule_states_ and formats_
This usually works out because:
* submodule_states_ starts in a valid state
* submodule_states_ is updated frequently, and
* capture_nonlocked_.echo_controller_enabled "covers up" when submodule_states_ is out of sync.
However, ApplyConfig and ProcessReverseStream don't update submodule_states_, so some API call orderings put APM in an invalid state.
This CL fixes it by deleting capture_nonlocked_.echo_controller_enabled and properly updating submodule_states_ from ApplyConfig().
Tested: New unit test, old unit tests, and audioproc_f is bitexact on my test set of aecdumps.
Bug: b/452621275
Change-Id: I735aa9a842edfa2a54ae271e121fd809bc59e6c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/417782
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45972}
Tested: Bitexact on a large set of aecdumps, except when aecdump settings are respected and AECM is used (then processing becomes more faithful to the stored aecdump settings). Also verified that --aec_settings still takes effect.
Bug: webrtc:442444736, b:428638881
Change-Id: If1a0671c8faf994ceeda5d9ec5d99218981c87d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/411800
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45748}
As we need to provide a default implementation for the added API, the
old ones have not been yet marked as [[deprecated]].
Bug: webrtc:442444736
Change-Id: I86ab70b4ac2ce91ff435e02d76e613d29be5498c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/411461
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45746}
The flag was added in 2019 and hasn't to my knowledge been needed. It's safe to delete.
Bug: webrtc:442444736, b:428638881
Change-Id: Iace278f99779d6980e9e689a5aac2d73f388489b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/411743
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45738}
This adds support for experimenting with more sophisticated residual
echo estimation.
Tested: `audioproc_f --aec=1` is bitexact on a set of 50 aecdumps.
Credit for original version: devicentepena@webrtc.org
Bug: webrtc:442444736, b:428638881
Change-Id: I3df0097ca8673d7f73ab1c68e83b170ecc01de3f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/407446
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45599}
https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-smartptr-get.html
and
https://clang.llvm.org/extra/clang-tidy/checks/readability/named-parameter.html (which resulted only in a single change)
Done using
tools/clang/scripts/build_clang_tools_extra.py \
--fetch out/Default clang-tidy clang-apply-replacements
ninja -C out/Default
gn gen out/Default --export-compile-commands
cd out/Default
tools/clang/third_party/llvm/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -p . \
-clang-tidy-binary tools/clang/third_party/llvm/build/bin/clang-tidy \
-clang-apply-replacements-binary \
tools/clang/third_party/llvm/build/bin/clang-apply-replacements \
-checks='-*,readability-redundant-smartptr-get,readability-named-parameter' \
-fix
followed by
git cl format
Bug: webrtc:424706384
Change-Id: Ie5a4077286d34c1363a1d341aca50a7047f6543b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/402584
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#45247}
In AudioProcessingImpl we receive externally provided channel data
that may not be byte aligned (e.g AudioBus in chromium is aligned on
a 16 byte boundary).
Bug: chromium:409777951
Change-Id: I7ad9afda6f4bbfa67cfaf2ea89a40bebf4624e8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/392322
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44717}
We also move the creation of the default multichannel config to
EchoCanceller3Config, to expose it to API users.
This CL also changes some imports, generated by using the
`tools_webrtc/iwyu/apply-include-cleaner` tool. However, this does not
work on
* audio_processing_impl.cc because it says it doesn't compile
* echo_canceller3.h because it adds an illegal import
BUG=None
No-Iwyu: It wants invalid changes to some files
Change-Id: If461326967acdc57539a0c87f6db53be0e217522
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/386900
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Fredrik Hernqvist <fhernqvist@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44413}
WebRTC has unified all namespaces to webrtc, and the rtc:: and cricket::
name specifiers need to be replaced with webrtc::. This was generated using
a combination of clang AST rewriting tools and sed.
This CL was uploaded by git cl split.
Bug: webrtc:42232595
Change-Id: Icbbd42ead3f100bbd85ae66084bdbe1a0b13fa95
No-Iwyu: LSC
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/386646
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44407}
absl::Nonnull -> absl_nonnull, absl::Nullable -> absl_nullable,
and absl::NullabilityUnknown -> absl_nullability_unknown.
The new macros are positioned as a qualifier on the affected type,
similar to const, rather than as a templated type wrapping the affected
type.
Bug: webrtc:407433459
No-Iwyu: No regressions introduced by this CL
Change-Id: Id6b1a58296d52c86db3ae44e90849affc904d335
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/384220
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44301}
When echo controller factories are updated, it would be possible to pass Environment into EchoCanceller3 and thus rely on propagated field trials.
Bug: webrtc:369904700
Change-Id: Iba9c04edbaab23277874234bd289e2c37625b1c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372040
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43614}
Increased the number of errors the automation is fixing to 150 from
75 in this commit.
Bug: webrtc:370878648
Change-Id: If6e6a5f40db7eb54c27c1a85fb7031838e478c70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366205
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#43337}