Commit graph

469 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
Florent Castelli
99c519b3fd Mass removal of absl_deps in all BUILD.gn files
Bug: webrtc:341803749
Change-Id: Id73844ba8d63b9f2f2c9391d8d8116ad0864c36d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351540
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42372}
2024-05-23 15:09:46 +00:00
Gustaf Ullberg
b4dcac3e1a Retuning of the HMM transparent mode classifier
- Assume a non-zero probability of starting in transparent state
  (transparent mode can be reached sooner).
- Relax the requirements for when the filter is considered converged
  (reduces the risk of incorrectly entering transparent mode in the
  presence of near-end noise).

Bug: b/340578713
Change-Id: I6be9b5b74457066f9900c8020c0ebf19623a70df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350602
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42318}
2024-05-16 08:50:17 +00:00
Jesús de Vicente Peña
eeff850106 Adding the option to experiment with the max_allowed_excess_render_blocks parameter.
Bug: webrtc:337900458
Change-Id: I2108c7c67eb9aa460932efe881760924109b1915
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349460
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42207}
2024-05-02 12:20:23 +00:00
Emil Lundmark
f591f2dcf1 Remove expired WebRTC-Aec3DelayEstimatorDetectPreEcho
Bug: webrtc:14205
Change-Id: Ib817b043d9368ba003b2b40a7315da845910c2f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345481
Reviewed-by: Lionel Koenig Gélas <lionelk@google.com>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Lionel Koenig <lionelk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42039}
2024-04-11 09:57:16 +00:00
Emil Lundmark
e92be7f42f Remove expired WebRTC-Aec3PenalyzeHighDelaysInitialPhase
Bug: webrtc:14919
Change-Id: I06214b7ff10847c55937cea70c6a09db1914efc8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345482
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42016}
2024-04-08 14:34:33 +00:00
Emil Lundmark
3fc8422993 Remove expired WebRTC-Aec3PreEchoConfiguration
This hard-codes the behavior to mode 3 with a threshold of 0.5 like was
already done by FetchPreEchoConfiguration.

Bug: webrtc:14205
Change-Id: I48d47a77c9df0001460788b504524203417f9647
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345483
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42015}
2024-04-08 13:03:56 +00:00
Jesús de Vicente Peña
1a4cf30047 Avoiding to increase an iterator when the result can be larger than their container end.
Bug: webrtc:15438
Change-Id: I0d75436bc845590c76466bde7007e921f842a9d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317320
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40605}
2023-08-23 08:11:33 +00:00
Jesús de Vicente Peña
f80cf81435 Changing the pre echo configuration default.
Bug: webrtc:14205
Change-Id: I17add3bf19c599f170ffe98d0da0a561794591c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309481
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40319}
2023-06-20 14:46:44 +00:00
Jesús de Vicente Peña
766f703fe3 Making WebRTC-Aec3PenalyzeHighDelaysInitialPhase default to true.
Bug: webrtc:14919
Change-Id: Id7509b9ef4730b4d09259bdd7ed13411238eabd3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304164
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39986}
2023-05-04 17:25:33 +00:00
Jared Siskin
c018bae807 Format /modules
git ls-files | grep -e  "\(\.h\|\.cc\)$" | grep -e  "^modules/" | xargs clang-format -i ; git cl format
after landing: add to .git-blame-ignore-revs

Bug: webrtc:15082
Change-Id: I2c3cd28740062794f8c10e39d8406aadb9e9a35a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301620
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Jared Siskin <jtsiskin@meta.com>
Cr-Commit-Position: refs/heads/main@{#39901}
2023-04-20 02:02:45 +00:00
Jesús de Vicente Peña
e7478182ac Penalization of large delays on the initial phase.
Bug: webrtc:14919
Change-Id: Iba00b2782b7e7c3dbd345a94aba541fad8c979ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294289
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39364}
2023-02-22 07:11:58 +00:00
Sam Zackrisson
56c67555f1 AEC3: Delete render delay buffer alignment killswitch
The code has been running in Chrome since 2020 and ChromeOS since 2022 (https://crrev.com/c/3452884) without issues.

Bug: webrtc:11803
Change-Id: I0c572d362b1f52b4591c7790e11a87c1a1ad1a79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293342
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39316}
2023-02-15 12:57:04 +00:00
Jesús de Vicente Peña
5b55b2750a Version 3: Various changes on the pre-echo delay estimator:
- Lowering the energy threshold for updating the accumulated error.
- Not using the pre-echo estimate in the initial frames when the matched filters have been recently initialized.
- Slight speed up for the increases in the accumulated error.
- Not periodically resetting the accumulated error.

Bug: webrtc:14205
Change-Id: Ic337332e263b27d7a3aba0ab4b371517780f9c90
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291320
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39175}
2023-01-23 15:10:48 +00:00
Jesús de Vicente Peña
b24ebc535b pre echo delay: adding different options for detecting pre echoes.
Bug: webrtc:14205
Change-Id: I9de13c8525914278a2961bd1193b1ce2472c8c02
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280900
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Lionel Koenig <lionelk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38511}
2022-10-31 15:55:29 +00:00
Jesús de Vicente Peña
bb4ccf8495 Pre echo delay estimator: Explicitly considering the initial region when updating the pre echo delay histogram.
Bug: webrtc:14205
Change-Id: Iaa075a52c07ab87fe21da7c40be806c7f80f0e32
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280540
Reviewed-by: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Lionel Koenig <lionelk@google.com>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38489}
2022-10-28 07:02:58 +00:00
Lionel Koenig
9707f579ae delay estrimator: Enable looking for early reverberation
Enable by default the look for the first echo.

Bug: webrtc:14205
Change-Id: Iae904679c1432f3a0766263907cf376903685b97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278043
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38452}
2022-10-24 08:35:52 +00:00
Lionel Koenig
dff98498a5 Remove duplicated dump data
Bug: None
Change-Id: I289810a3deb40b3f2ce1941e385f91fbdb13e288
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279000
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38377}
2022-10-13 06:47:50 +00:00
Sam Zackrisson
129f40718c Reland: AEC3: clarify render delay controller metrics
This CL:
- makes it easier to understand the (nontrivial) metric interpretation
- corrects the computation of BufferDelay to use 0 for absent delay
- deletes metric MaxSkewShiftCount, unused since https://webrtc-review.googlesource.com/c/src/+/119701
- updates the unit test to directly test metric reporting

Corresponding update to histograms.xml:
https://crrev.com/c/3944909

Previous revert:
https://webrtc-review.googlesource.com/c/src/+/279040
This CL is identical to the original, except:
- the test is updated to spam fewer EXPECT_EQ failures on failure (EXPECT_EQs moved out of inner loop)
- the test not resets metrics (metrics::Reset()) at the beginning, like other histogram tests

Bug: webrtc:8671, chromium:1349051
Change-Id: Ie802e1f9d03a22ff7018f522a63b19e0b6eec2e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279046
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38376}
2022-10-13 06:46:29 +00:00
Mirko Bonadei
b2b627701c Revert "AEC3: clarify render delay controller metrics"
This reverts commit fd745d3e3c.

Reason for revert: Breaks downstream projects.

Original change's description:
> AEC3: clarify render delay controller metrics
>
> This CL:
> - makes it easier to understand the (nontrivial) metric interpretation
> - corrects the computation of BufferDelay to use 0 for absent delay
> - deletes metric MaxSkewShiftCount, unused since https://webrtc-review.googlesource.com/c/src/+/119701
> - updates the unit test to directly test metric reporting
>
> Corresponding update to histograms.xml:
> https://crrev.com/c/3944909
>
> Bug: webrtc:8671, chromium:1349051
> Change-Id: If73b6fca4de7343bff2c53f72cedda458d36c599
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278782
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38362}

Bug: webrtc:8671, chromium:1349051
Change-Id: I1e2bd0f91acb67532e21f5d2f8526a398711a413
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279040
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38367}
2022-10-12 13:42:31 +00:00
Sam Zackrisson
fd745d3e3c AEC3: clarify render delay controller metrics
This CL:
- makes it easier to understand the (nontrivial) metric interpretation
- corrects the computation of BufferDelay to use 0 for absent delay
- deletes metric MaxSkewShiftCount, unused since https://webrtc-review.googlesource.com/c/src/+/119701
- updates the unit test to directly test metric reporting

Corresponding update to histograms.xml:
https://crrev.com/c/3944909

Bug: webrtc:8671, chromium:1349051
Change-Id: If73b6fca4de7343bff2c53f72cedda458d36c599
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278782
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38362}
2022-10-12 09:30:32 +00:00
Mirko Bonadei
9d9c2d5795 Make header files self contained.
This CL adds #includes to header files in order to make them
self contained after the preprocessor pass.

Bug: b/251890128
Change-Id: I81c3ba38fb8ab8a2bbd151ba99aa871fae9f1b1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278422
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38327}
2022-10-08 08:38:36 +00:00
Ali Tofigh
f3592cb2a2 Adopt absl::string_view in modules/audio_processing/
Bug: webrtc:13579
Change-Id: Idb05a64cfd16aed68d40cd427a6b516caa5e2077
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269387
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37800}
2022-08-16 13:49:14 +00:00
Bruno Pitrus
99465b1395 Add missing header to fix build error when using linux system libraries
Change-Id: I4fc04563c2cfe36fa2352f72f2ae61d47972f025
Bug: webrtc:11226
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268194
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Auto-Submit: Bruno Pitrus <brunopitrus@hotmail.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37555}
2022-07-19 12:25:42 +00:00
Stephan Hartmann
cb56277a17 libstdc++: add missing atomic include for std::atomic
Bug: chromium:957519
Change-Id: I93242198ef8277d5f4d6044fb565d3126768b514
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268187
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37504}
2022-07-12 09:23:26 +00:00
Lionel Koenig
8783c678a5 delay estimator: Look for early reverberation
Look for first echo (and not only the strongest one) on the same matched
filter.

This change is bit exact with previous version when `pre_echo` is false.

Author: Jesús de Vicente Peña <devicentepena@webrtc.org>

Bug: webrtc:14205
Change-Id: I6782eaa1d690b0df78d00f6d425a85c951b2ca9d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266321
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37360}
2022-06-28 15:16:03 +00:00
Niels Möller
7a66900683 Delete rtc_base/atomic_ops.h
Bug: webrtc:9305
Change-Id: I3e8b0db03b84b5361d63db31ee23e6db3deabfe4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266497
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37348}
2022-06-28 08:32:13 +00:00
Gustaf Ullberg
8e87a248de Use a one-dimensional vector for Block data
Puts the whole block in contiguous memory and reduce pointer look-up.

The change has been verified to be bit-exact.

Bug: webrtc:14089
Change-Id: I264aaf764bf53a29f23249105f704b2fdbd7e51c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263203
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36983}
2022-05-24 11:12:46 +00:00
Ivan Murashov
1e8bb67295 GCC: Avoid symbol clash in RenderBuffer
GCC fails to resolve getter for RenderBuffer::Block() because
its return type has the same name with the getter method.
Rename getter method with the prefix "Get" as guided in the
https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/blink-c++.md#Precede-setters-with-the-word-Set_use-bare-words-for-getters
"If a getter’s name collides with a type name, prefix it with “Get”."

Bug: chromium:819294, webrtc:14089
Change-Id: Ieaa3af27415eb8c39806aa8480897b47fd07baa8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263420
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36982}
2022-05-24 10:47:56 +00:00
Gustaf Ullberg
fbfe6f08a4 AEC3: Correct high-band gain for multi-channel
The high-band gain is corrected by fixing the computation of the
low-band energy

Bug: webrtc:14108
Change-Id: I5033287de57aedcd91bb71623ca2862519ffb35b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263201
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36972}
2022-05-23 13:09:49 +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
Florent Castelli
c3e6e3a3e8 Remove dependency on rtc_base_approved from most targets
Bug: webrtc:9838
Change-Id: Ibd0199803597eff48ca139a5cecdc3209c62c5d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259873
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36643}
2022-04-25 12:15:30 +00:00
Florent Castelli
f4db351625 Move race_checker out of rtc_base_approved
Bug: webrtc:9838
Change-Id: If180abcca1ef598314de3aed70e4a6eb04f062d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258770
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36607}
2022-04-21 14:40:06 +00:00
Florent Castelli
1cb5383d16 Move swap_queue out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I7add82b13bf7411e5b1531a26ef2b87a4bdb9ab4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258768
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36601}
2022-04-21 09:50:24 +00:00
Florent Castelli
71337f387e Move random out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I64a5ef18c19d446139354d04aa6cb2a76d18aad0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258762
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36572}
2022-04-19 14:00:47 +00:00
Sam Zackrisson
4d12174ca5 AEC3: Add metrics for stereo detection code
Adds two metrics for stereo detection:
- An enum indicating whether the last 10 seconds contained persistent stereo content or not, logged every 10 seconds.
- An enum indicating whether any persistent stereo content at all has been detected, logged at the end of the AEC lifetime.

These metrics allow us to assess:
- What proportion of all audio is treated as stereo.
- What proportion of sessions encounter any significant stereo content. If this is unexpectedly high, the stereo detection code may need fine tuning.

Metrics are only logged for component lifetimes exceeding 5 seconds: This is to avoid brief AEC lifetimes due to internal resets etc within APM.

Corresponding Chrome CL for XML histogram declarations:
https://crrev.com/c/3579317

Bug: chromium:1295710
Change-Id: I93e2bf74588cf4bb2a8922dbfad079bccab01456
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258760
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36537}
2022-04-13 10:16:48 +00:00
Sam Zackrisson
1397c4bfd9 AEC3: Handle temporary stereo content more robustly
During temporary stereo content when the AEC3 uses a mono reference signal, the signal is downmixed by averaging instead of using only the left channel.

Additionally, temporary stereo content is flagged as an echo path change.

Tested: Modified local build: Verified stereo mode entered / left in accordance with hysteresis and timeout thresholds. Verified temporary stereo detected during temporary stereo playout. Made an aecdump and inspected content.
Bug: chromium:1295710
Change-Id: I6bd53e615dfb3ec39bc1c73275b7d6d599ac7c57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258481
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36504}
2022-04-08 17:03:34 +00:00
Sam Zackrisson
cf7f7f9fa0 AEC3: Add hysteresis period before entering stereo processing
Even if playout audio is only very briefly stereo, the AEC will enter stereo processing mode. To save CPU and improve AEC performance, this CL adds a hysteresis period before treating playout as stereo.

The feature is enabled by default in the AEC3 config.

Bug: chromium:1295710
Change-Id: I29116ab2e7823e25a02aa3b66a1c619f1d966d9e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258479
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36503}
2022-04-08 17:01:08 +00:00
Sam Zackrisson
fa07b43074 AEC3: Add fallback to mono processing if no stereo is detected for some time
If playout audio is temporarily stereo, the AEC will currently enter stereo processing mode indefinitely. To save CPU and improve AEC performance, this CL adds support for falling back to mono after a period of no stereo.

The feature is enabled by default in the AEC3 config.

Bug: chromium:1295710
Change-Id: I690b5b22f8407f950bf41f3bcaa9ca0138452157
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258421
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36502}
2022-04-08 16:43:14 +00:00
Sam Zackrisson
64cdcc0792 AEC3: Add multichannel configuration and multichannel detection
The features have two safety fallbacks:
- multichannel config has a killswitch WebRTC-Aec3SetupSpecificDefaultConfigDefaultsKillSwitch
- stereo detection has a killswitch WebRTC-Aec3StereoContentDetectionKillSwitch

Both features are enabled by default in the AEC3 config.

Tested: Bitexact on a large number of aecdumps.
Bug: chromium:1295710
Change-Id: I340cdc9140dacd4ca22d0911eb9f732b6cf8b226
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258129
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36482}
2022-04-07 14:58:02 +00:00
Sam Zackrisson
04c6053f46 AEC3: Simplify the EchoCanceller3 construction
Apart from making the construction more straightforward, this change allows recreating the BlockProcessor at runtime. This is used to change parameterization at runtime in an upcoming CL [1].

[1] https://webrtc-review.googlesource.com/c/src/+/258129

Tested: Bitexact on a large number of aecdumps.
Bug: chromium:1295710
Change-Id: I2e0275c5c97044cb4370042633266b193c06b960
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258100
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36473}
2022-04-07 07:31:13 +00:00
Florent Castelli
57aa81bce7 Remove //rtc_base:stringutils from public deps
Bug: webrtc:8603
Change-Id: Ic2dfbe28d310cb4b35983b73e895fc95e8439669
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257913
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36453}
2022-04-05 22:42:19 +00:00
Florent Castelli
4467ad7835 Remove //rtc_base:macromagic from public deps
Bug: webrtc:8603
Change-Id: I9708df48c9bde9f86ba2d1a92a278bb0d09f3865
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257909
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36444}
2022-04-05 12:36:12 +00:00
Florent Castelli
0af55ba60d Remove //rtc_base:logging from public deps
Bug: webrtc:8603
Change-Id: I2704da8618f88032adac7ae9eb2a0f47fce4a836
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257908
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36443}
2022-04-05 10:31:19 +00:00
Florent Castelli
bddfe0215c Remove //rtc_base:atomicops from public deps
Bug: webrtc:8603
Change-Id: If1fb37e44d5ab277e16895ca50325b3a86bd135f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257907
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36432}
2022-04-04 18:25:48 +00:00
Ali Tofigh
1e157a9596 Remove more top-level const from parameters in function declarations
This CL removes even more top-level const from parameters in function
declarations. This change is safe because top-level const in function
declarations (not function definitions) are ignored by the compiler
and so change is just a no-op cleanup.

Bug: webrtc:13610
Change-Id: Icf6868c27b1fdb9d9915b3a7020eb34bdcf07a09
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249989
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35866}
2022-02-01 09:15:50 +00:00
Artem Titov
6cae2d5513 Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
This reverts commit 3f87250a4f.

Reason for revert: Downstream is fixed

Original change's description:
> Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
>
> This reverts commit 5f0eb93d2a.
>
> Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after.
>
> Original change's description:
> > Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
> >
> > Bug: webrtc:13555, webrtc:13082
> > Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Artem Titov <titovartem@webrtc.org>
> > Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
> > Cr-Commit-Position: refs/heads/main@{#35805}
>
> TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:13555, webrtc:13082
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Owners-Override: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Andrey Logvin <landrey@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35807}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:13555, webrtc:13082
Change-Id: I7ef1ef3b6e3c41b1a96014aa75f003c0fcf33949
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249365
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35814}
2022-01-27 12:55:44 +00:00
Artem Titov
3f87250a4f Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
This reverts commit 5f0eb93d2a.

Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after.

Original change's description:
> Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
>
> Bug: webrtc:13555, webrtc:13082
> Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
> Cr-Commit-Position: refs/heads/main@{#35805}

TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:13555, webrtc:13082
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35807}
2022-01-26 14:56:14 +00:00
Byoungchan Lee
5f0eb93d2a Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
Bug: webrtc:13555, webrtc:13082
Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35805}
2022-01-26 14:22:16 +00:00
Ali Tofigh
62238097c9 Remove top-level const from parameters in function declarations.
This is a safe cleanup change since top-level const applied to
parameters in function declarations (that are not also
definitions) are ignored by the compiler. Hence, such changes do
not change the type of the declared functions and are simply
no-ops.

Bug: webrtc:13610
Change-Id: Ibafb92c45119a6d8bdb6f9109aa8dad6385163a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249086
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35802}
2022-01-26 11:05:25 +00:00