Commit Graph

345 Commits

Author SHA1 Message Date
Miriam Zimmerman
31a3397e96 Merge remote-tracking branch 'upstream/branch-heads/7778' into mutexlox/webrtc-148
Merge conflicts resolved in:
* api/neteq/neteq.h
* audio/channel_receive.cc
* audio/channel_receive.h
* media/engine/simulcast_encoder_adapter.cc
* modules/audio_coding/BUILD.gn
* modules/audio_coding/acm2/acm_resampler.cc
* modules/audio_coding/acm2/acm_resampler_unittest.cc
* modules/audio_processing/audio_processing_impl.h
* modules/video_coding/BUILD.gn
* p2p/base/p2p_transport_channel_unittest.cc
* pc/jsep_transport_controller.cc
* pc/rtp_transport.h
* pc/rtp_transport_internal.h
* unsafe_buffers_paths.txt
2026-05-08 13:42:18 -04:00
Adel Lahlou
d46d62e9eb Merge remote branch 'upstream/branch-heads/7680' 2026-04-06 00:16:11 -07:00
Danil Chapovalov
1f9fdd2bc2 Replace ArrayView with std::span in modules/audio_processing
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}
2026-03-26 10:42:00 -07:00
Evan Shrubsole
210a0991ff Revert "Removed the configuration options for multi_channel processing"
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}
2026-03-17 07:42:18 -07:00
Per Åhgren
db6adf2e9f 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}
2026-03-16 14:55:44 -07:00
Tomas Gunnarsson
c6283a2cfc Revert "Reland "Activate adaptive channel mixing when the echo canceller runs in stereo""
This reverts commit 5ad42502a8.

Reason for revert: broke the chromium roll.

Original change's description:
> Reland "Activate adaptive channel mixing when the echo canceller runs in stereo"
>
> 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}

Bug: webrtc:42221468
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: If52e241869547996452f62aff9baba943f459723
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/446340
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46809}
2026-02-04 12:00:21 -08:00
Per Åhgren
5ad42502a8 Reland "Activate adaptive channel mixing when the echo canceller runs in stereo"
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}
2026-02-03 23:14:39 -08:00
Sam Zackrisson
2836729ee0 Add APM config string to aecdump config message
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}
2026-01-29 05:38:33 -08:00
Lionel Koenig Gélas
c8096273be Cleanup AECm code
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}
2026-01-22 04:05:54 -08:00
Ram Shitrit
fb6652b1a6 Fixing AGCManager Typo
fix for `AgcManagerDirect::GetDigitalComressionGain` to `AgcManagerDirect::GetDigitalCompressionGain` (typo Comression --> Compression)

Bug: webrtc:477059326
Change-Id: I567c9f4fcb7de84038bc9a7f9517fe1fbc5b930d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/442641
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46701}
2026-01-20 06:58:02 -08:00
Lionel Koenig Gélas
8cd8620980 Remove the possibility to run AECm
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}
2026-01-19 05:31:23 -08:00
Tomas Gunnarsson
8c9f8a0fc0 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}
2026-01-18 16:23:29 -08:00
Per Åhgren
82a3659e11 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}
2026-01-16 11:22:51 -08:00
Per Åhgren
7a98f9d363 Integrating CaptureMixer into AudioBuffer
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}
2026-01-13 11:00:59 -08:00
Per Åhgren
e5fa3b7591 Changed AudioBuffer to signal remixing variant in c-tor
Change-Id: I6d6bb4909e585f2aa8a610e7e8def42777101704
Bug: webrtc:42221468
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/432720
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Cr-Commit-Position: refs/heads/main@{#46649}
2026-01-13 03:15:30 -08:00
Miriam Zimmerman
a2eba8223d Merge remote-tracking branch 'upstream/branch-heads/7444' into mutexlox/m142-merge 2025-12-04 14:36:56 -05:00
Lionel Koenig Gélas
a80152e938 Remove speech_probability as input parameter to AGC2
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}
2025-10-29 10:52:30 -07:00
Per Åhgren
1dfd30cf31 Reland "Switch to use 32 kHz processing inside APM"
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}
2025-10-27 09:02:42 -07:00
Harald Alvestrand
ddb627e555 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}
2025-10-26 02:39:02 -07:00
Per Åhgren
179be29133 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}
2025-10-24 03:05:28 -07:00
Sam Zackrisson
c2a69dbc2d Refactor to clarify band split rate is always 16k
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}
2025-10-17 07:13:04 -07:00
Sam Zackrisson
76578e7720 [Bug fix] Update all state in AudioProcessing::ApplyConfig
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}
2025-10-17 07:03:02 -07:00
Sam Zackrisson
bc7362fb04 Allow setting AEC3 config on the audio processing builder
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}
2025-09-26 02:44:58 -07:00
Jesús de Vicente Peña
20e71a25d4 Passing a neural echo residual estimator pointer to the echo control factory.
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}
2025-09-26 02:03:43 -07:00
Sam Zackrisson
181c224ec0 Delete unused killswitch for AEC3 multichannel config
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}
2025-09-25 01:56:34 -07:00
Jim Gustafson
b07b4549f2 Merge remote-tracking branch 'upstream/branch-heads/7339' 2025-09-16 15:28:07 -07:00
Sam Zackrisson
c223e2036e AEC3: Add interface + plumbing for neural residual echo estimation
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}
2025-09-09 06:26:29 -07:00
Philipp Hancke
213119e51e Apply clang-tidy readability-redundant-smartptr-get
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}
2025-07-31 01:37:54 -07:00
Jim Gustafson
a7ebbabdfe Merge remote-tracking branch 'upstream/branch-heads/7204' 2025-07-11 15:20:30 -07:00
Philipp Hancke
2eca95977f clang-tidy: llvm-namespace-comment,readability-static-definition-in-anonymous-namespace
https://clang.llvm.org/extra/clang-tidy/checks/llvm/namespace-comment.html
https://clang.llvm.org/extra/clang-tidy/checks/readability/static-definition-in-anonymous-namespace.html

Done using clang-tidy with
  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 out/Default/tools/clang/third_party/llvm/build/bin/clang-tidy \
    -clang-apply-replacements-binary \
        out/Default/tools/clang/third_party/llvm/build/bin/clang-apply-replacements \
    -checks='-*,llvm-namespace-comment,readability-static-definition-in-anonymous-namespace' \
    -fix

with some manual changes affecting webrtc_sdp.cc in PS2.

Bug: webrtc:424706384
Change-Id: I23f204d65787edc74ae02ef7bf129d8e3ade90f6
No-Iwyu: orthogonal LSC
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/396460
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44947}
2025-06-16 14:29:31 -07:00
Lionel Koenig Gélas
6ffc178f12 Add a PostFilter to compensate processing shortcomings
Bug: webrtc:417439718
Change-Id: Iaea63c6cbd7d5ae556fa0371e68ed7b4ea32b16f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/391864
Reviewed-by: Per Åhgren <peah@webrtc.org>
Auto-Submit: Lionel Koenig <lionelk@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44726}
2025-05-21 23:58:40 -07:00
Tommi
7d7dcb9650 [AudioProcessingImpl] Don't use AudioFrameView with aec dump
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}
2025-05-21 06:51:33 -07:00
Fredrik Solenberg
0c5a27bf2f Move denormal_disabler to rtc_base/
Bug: webrtc:42228262
Change-Id: Iae81e9eb4499c7527293c6f23090cb86f8050c49
No-Iwyu: Avoid unrelated changes
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/391461
Auto-Submit: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44667}
2025-05-16 09:49:46 -07:00
Jim Gustafson
c2c19f7142 Merge remote-tracking branch 'upstream/branch-heads/7103' 2025-04-30 12:39:48 -07:00
Fredrik Hernqvist
c3a953a173 Support adding multichannel config to EchoCanceller3Factory
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}
2025-04-17 03:04:44 -07:00
Evan Shrubsole
fdd9b8b2d5 Use webrtc name specifier instead of rtc/cricket in modules/audio_processing
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}
2025-04-17 00:50:57 -07:00
Mirko Bonadei
3672d60543 Migrate template alias nullability annotations to macros.
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}
2025-04-04 15:23:56 -07:00
Evan Shrubsole
652c771f05 Move time_utils.h and crypto_random.h to webrtc namespace
Bug: webrtc:42232595
Change-Id: I06d836b6ee37d94b1b79279d886bf841f228b778
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/382201
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44182}
2025-03-21 04:02:28 -07:00
Jim Gustafson
04b41481d4 Merge remote-tracking branch 'upstream/branch-heads/6998' 2025-03-19 19:25:31 -07:00
Danil Chapovalov
c329350008 Propagate field trials into EchoCanceller3
Bug: webrtc:369904700
Change-Id: I698dd126f1627f84abe2633bde215c06aeef6299
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372400
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43733}
2025-01-14 07:41:22 -08:00
Danil Chapovalov
bf4c1bcd94 Propagate field trials into AgcManagerDirect
Bug: webrtc:369904700
Change-Id: I8389627f46494f825bcdcb59022ddfa992f74639
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372381
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43722}
2025-01-13 05:43:56 -08:00
Miriam Zimmerman
8604cca7c6 Merge remote-tracking branch 'upstream/branch-heads/6834' into mutexlox/m132-merge 2025-01-07 12:25:28 -05:00
Danil Chapovalov
a5d2906206 Pass Environment to echo controller factory
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}
2024-12-19 07:12:35 -08:00
Danil Chapovalov
8da0652263 Switch to injected field trials in GainController2
Bug: webrtc:369904700
Change-Id: I28dc43ffe4f1edaf55a5be05371618cbb76d0709
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371660
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43596}
2024-12-18 02:39:19 -08:00
Danil Chapovalov
4c73d1a326 Starting using propagated field trials in the AudioProcessingImpl
Bug: webrtc:369904700
Change-Id: Ibc9a2e5349f0d1ba7a7a7ebdd57dfddaf092a1af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368520
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43564}
2024-12-13 11:05:17 -08:00
Dor Hen
3fa21c89c0 Comment unused variables in implemented functions 13\n
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}
2024-10-31 07:44:25 +00:00
Jim Gustafson
9280d4e8f0 Merge remote-tracking branch 'upstream/branch-heads/6723' 2024-10-17 09:03:43 -07:00
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
Adel Lahlou
2888424bfd Merge remote-tracking branch 'upstream/branch-heads/6613' into 6613-testing 2024-08-31 02:18:43 -07:00
Hanna Silen
cc5c549fac Deprecate TransientSuppression
APM transient suppression config has no impact after
https://webrtc-review.googlesource.com/c/src/+/355880.

Bug: webrtc:7494, webrtc:13663, webrtc:357281131
Change-Id: I5017995aad4f89108b7de46e58df1cd391f61734
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358865
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Hanna Silen <silen@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42752}
2024-08-09 14:03:24 +00:00