Commit graph

160 commits

Author SHA1 Message Date
Tommi
1f3679884c Start using ArrayView in AudioFrame, update PushResampler
Start introducing ArrayView to AudioFrame and code that flows down
from there.  In this first step:
* Add `data_view()` that returns a read-only ArrayView for the
  audio buffer. When AudioFrame is not initialized however, data_view()
  will return a nullptr whereas the current data() method never returns
  nullptr.
* Add `mutable_data()` that requires two arguments for properly setting
  the samples per channel and number of channels that's required for
  accurately reserving the returned mutable ArrayView.
  A notable behavior change is that if the requested number of channels
  is larger than supported or the calculated buffer size is too large,
  the function will trigger a check.
* Add TODOs for following work.

Bug: chromium:335805780
Change-Id: I2937de800422589ebe6a3840b3caadf3d9ff8b00
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347982
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42202}
2024-04-30 15:33:08 +00:00
Florent Castelli
0afde7614d Move webrtc::AudioProcessing include to api/ folder
Bug: webrtc:15874
Change-Id: Ie8a6e031c0f0505cfe238f7d252c47e9c34408d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347983
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42128}
2024-04-20 07:02:50 +00:00
Danil Chapovalov
b64eef1234 In AecDump take raw pointer to TaskQueueBase instead of legacy rtc::TaskQueue
Bug: webrtc:14169
Change-Id: I1e50a945a7637da07bec00ccd7b6b1847a7481cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333480
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41477}
2024-01-08 12:17:06 +00:00
Björn Terelius
efeeba0864 Try removing RTC_PUSH_IGNORING_WUNDEF() around proto includes
Bug: webrtc:15623
Change-Id: Ia184993769f74d51e68a5a536d5fdde26890bcfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325481
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41058}
2023-11-01 08:21:05 +00:00
Alessio Bazzica
dfba28e30e AGC2 adaptive digital controller config clean-up
- Remove dry-run option
- Hard-code `adjacent_speech_frames_threshold` and
  `vad_reset_period_ms`
- Expose `initial_gain_db` via field trial

Tested: adaptive digital controller bit-exactness verified

Bug: webrtc:7494
Change-Id: I6166611f91320b6c37de3f8e553c06c2ed95b772
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287222
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Hanna Silen <silen@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38862}
2022-12-09 13:07:34 +00:00
Sam Zackrisson
06cba44d7a WebRTC APM: Add missing channel format check
The check was lost  in CL https://webrtc-review.googlesource.com/c/src/+/276920

Bug: webrtc:5298
Change-Id: Ic5f072ebef4ad0bdef5446cad0536728b4ad610e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284560
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38746}
2022-11-28 18:19:06 +00:00
Sam Zackrisson
5dd548261f APM: Signal error on unsupported sample rates
This CL adds more explicit tests for unsupported sample rates in the WebRTC audio processing module (APM). Rates are restricted to the range [8000, 384000] Hz. Rates outside this range are handled as best as possible, depending on the format.

Tested: bitexact on a large number of aecdumps
Bug: chromium:1332484, chromium:1334991
Change-Id: I9639d03dc837e1fdff64d1f9d1fff0edc0fb299f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276920
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38663}
2022-11-17 12:12:04 +00:00
Alessio Bazzica
fcf1af3049 APM: add AudioProcessingImpl::capture_::applied_input_volume(_changed)
The `recommended_stream_analog_level()` getter is used to retrieve
both the applied and the recommended input volume. This behavior is
error-prone since the caller must know what is returned based on
the point in the code (namely, before/after the AGC has changed
the last applied input volume into a recommended level).

This CL is a first step to make clarity on which input volume is
handled in different parts of APM. Next in the pipeline: make
`recommended_stream_analog_level()` a trivial getter that always
returns the recommended level.

Main changes:
- When `recommended_stream_analog_level()` is called but
  `set_stream_analog_level()` is not called, APM logs an error
  and returns a fall-back volume (which should not be applied
  since, when `set_stream_analog_level()` is not called, no
  external input volume is expected to be present
- When APM is used without calling the `*_stream_analog_level()`
  methods (e.g., when the caller does not provide any input volume),
  the recorded AEC dumps won't store `Stream::applied_input_level`

Other changes:
- Removed `AudioProcessingImpl::capture_::prev_analog_mic_level`
- Removed redundant code in `GainController2` around detecting
  input volume changes (already done by APM)
- Adapted the `audioproc_f` and `unpack_aecdump` tools
- Data dumps clean-up: the applied and the recommended input
  volumes are now recorded in an AGC implementation agnostic way

Bug: webrtc:7494, b/241923537
Change-Id: I3cb4a731fd9f3dc19bf6ac679b7ed8c969ea283b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271544
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Hanna Silen <silen@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38054}
2022-09-09 17:36:05 +00:00
Alessio Bazzica
3153b363cd AEC dump Stream::level renamed
Making it clear that the field is used to store the applied input
volume and not the recommended input volume.

Bug: webrtc:7494, b/241923537
Change-Id: Ib91bc1a12348f63e3a4ba6e068ed02e40786a87b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271342
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38051}
2022-09-09 14:39:35 +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
Alessio Bazzica
85a126ec5d ApmTest.VerifyDebugDump(Int|Float) more insightful with failures
Instead of showing individual byte differences, this CL detects
differences in the expected and actual byte streams of the evaluated
AEC dump and, if detected, parses the `audioproc::Event` proto lite
messages and calls EXPECT_EQ() for a subset of individual (sub-)fields.

Note that messages are parsed only if the byte streams of each message
pair do not match, so with no failures the test runs at no extra cost.
Plus, the the added funcionality can only be enabled for local
debugging by flipping the `kDumpWhenExpectMessageEqFails` flag - a
code change cannot land if the flag is set to true.

Note that `MessageDifferencer` (see [1]) could not be used because
it is not implemented for `MessageLite` protos.

[1] https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.util.message_differencer

Bug: b/241923537
Change-Id: I8e0eda3b1ecfe06945b6dad5ee8871f8200d76d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270922
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37765}
2022-08-12 12:42:43 +00:00
Sam Zackrisson
3bd444ffdb Clarify and extend test support for certain sample rates in audio processing
Sample rates not divisible by 100, in particular 11025 Hz and 22050 Hz, have long been used with APM in Chrome, but the support has never been stated explicitly.

This CL makes minor modifications to the APM API to clarify how rates are handled when 10 ms is not an integer number of samples. Unit tests are also extended to cover this case better.

This does not update all references to 10 ms and implicit floor(sample_rate/100) computations, but it does at least take us closer to a correct API.

Note that not all code needs to support these sample rates. For example, audio processing submodules only need to operate on the native APM rates 16000, 32000, 48000.

Bug: chromium:1332484
Change-Id: I1dad15468f6ccb9c0d4d09c5819fe87f8388d5b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268769
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37682}
2022-08-03 14:26:36 +00:00
Niels Möller
105711e9ad Move rtc::make_ref_counted to api/
Bug: webrtc:12701
Change-Id: If49095b101c1a1763c2a44a0284c0d670cce953f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265390
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37219}
2022-06-15 09:47:38 +00:00
Ali Tofigh
2ab914c6ab Adopt absl::string_view in rtc_base/ (straightforward cases)
Bug: webrtc:13579
Change-Id: I240db6285abb22652242bc0b2ebe9844ec4a45f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258723
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36561}
2022-04-17 12:11:56 +00:00
Alessio Bazzica
1db0a261ca Reland "Reland "Remove unused APM voice activity detection sub-module""
This reverts commit 09aaf6f7bc.

Reason for revert: downstream fixed (see https://chromium-review.googlesource.com/c/chromium/src/+/3461371)

Original change's description:
> Revert "Reland "Remove unused APM voice activity detection sub-module""
>
> This reverts commit 54d1344d98.
>
> Reason for revert: Breaks chromium roll, see 
> https://ci.chromium.org/ui/p/chromium/builders/try/linux_chromium_tsan_rel_ng/1080583/overview
>
> https://chromium-review.googlesource.com/c/chromium/src/+/3461512
>
> Original change's description:
> > Reland "Remove unused APM voice activity detection sub-module"
> >
> > This reverts commit a751f167c6.
> >
> > Reason for revert: dependency in a downstream project removed
> >
> > Original change's description:
> > > Revert "Remove unused APM voice activity detection sub-module"
> > >
> > > This reverts commit b4e06d032e.
> > >
> > > Reason for revert: breaking downstream projects
> > >
> > > Original change's description:
> > > > Remove unused APM voice activity detection sub-module
> > > >
> > > > API changes:
> > > > - webrtc::AudioProcessing::Config::VoiceDetection removed
> > > > - webrtc::AudioProcessingStats::voice_detected deprecated
> > > > - cricket::AudioOptions::typing_detection deprecated
> > > > - webrtc::StatsReport::StatsValueName::
> > > >   kStatsValueNameTypingNoiseState deprecated
> > > >
> > > > PSA: https://groups.google.com/g/discuss-webrtc/c/7X6uwmJarE0
> > > >
> > > > Bug: webrtc:11226,webrtc:11292
> > > > Change-Id: I8d008b56708cf62961b9857ec052b59fda3b41bf
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250666
> > > > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > > > Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> > > > Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> > > > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > > > Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/main@{#35975}
> > >
> > > TBR=gustaf@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,terelius@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
> > >
> > > Change-Id: Iee01fdb874b4e0331277f3ffe60dacaabc3859a2
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:11226,webrtc:11292
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251600
> > > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > > Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/main@{#35977}
> >
> > # Not skipping CQ checks because this is a reland.
> >
> > Bug: webrtc:11226,webrtc:11292
> > Change-Id: I2fcbc5fdade16bfe6a0f0a02841a33a598d4f2ad
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251660
> > Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#35984}
>
> TBR=mbonadei@webrtc.org,gustaf@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,terelius@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: Ib308a3af2dcce85a0074ef5a4680ccec3f82712f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:11226,webrtc:11292
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251688
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35990}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:11226,webrtc:11292
Change-Id: Idfda6a517027ad323caf44c526a88468e5b52b65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251762
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36012}
2022-02-16 08:41:30 +00:00
Henrik Boström
09aaf6f7bc Revert "Reland "Remove unused APM voice activity detection sub-module""
This reverts commit 54d1344d98.

Reason for revert: Breaks chromium roll, see 
https://ci.chromium.org/ui/p/chromium/builders/try/linux_chromium_tsan_rel_ng/1080583/overview

https://chromium-review.googlesource.com/c/chromium/src/+/3461512

Original change's description:
> Reland "Remove unused APM voice activity detection sub-module"
>
> This reverts commit a751f167c6.
>
> Reason for revert: dependency in a downstream project removed
>
> Original change's description:
> > Revert "Remove unused APM voice activity detection sub-module"
> >
> > This reverts commit b4e06d032e.
> >
> > Reason for revert: breaking downstream projects
> >
> > Original change's description:
> > > Remove unused APM voice activity detection sub-module
> > >
> > > API changes:
> > > - webrtc::AudioProcessing::Config::VoiceDetection removed
> > > - webrtc::AudioProcessingStats::voice_detected deprecated
> > > - cricket::AudioOptions::typing_detection deprecated
> > > - webrtc::StatsReport::StatsValueName::
> > >   kStatsValueNameTypingNoiseState deprecated
> > >
> > > PSA: https://groups.google.com/g/discuss-webrtc/c/7X6uwmJarE0
> > >
> > > Bug: webrtc:11226,webrtc:11292
> > > Change-Id: I8d008b56708cf62961b9857ec052b59fda3b41bf
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250666
> > > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > > Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> > > Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> > > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > > Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> > > Cr-Commit-Position: refs/heads/main@{#35975}
> >
> > TBR=gustaf@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,terelius@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
> >
> > Change-Id: Iee01fdb874b4e0331277f3ffe60dacaabc3859a2
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:11226,webrtc:11292
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251600
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#35977}
>
> # Not skipping CQ checks because this is a reland.
>
> Bug: webrtc:11226,webrtc:11292
> Change-Id: I2fcbc5fdade16bfe6a0f0a02841a33a598d4f2ad
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251660
> Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35984}

TBR=mbonadei@webrtc.org,gustaf@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,terelius@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Ib308a3af2dcce85a0074ef5a4680ccec3f82712f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11226,webrtc:11292
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251688
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35990}
2022-02-14 12:25:51 +00:00
Alessio Bazzica
54d1344d98 Reland "Remove unused APM voice activity detection sub-module"
This reverts commit a751f167c6.

Reason for revert: dependency in a downstream project removed

Original change's description:
> Revert "Remove unused APM voice activity detection sub-module"
>
> This reverts commit b4e06d032e.
>
> Reason for revert: breaking downstream projects
>
> Original change's description:
> > Remove unused APM voice activity detection sub-module
> >
> > API changes:
> > - webrtc::AudioProcessing::Config::VoiceDetection removed
> > - webrtc::AudioProcessingStats::voice_detected deprecated
> > - cricket::AudioOptions::typing_detection deprecated
> > - webrtc::StatsReport::StatsValueName::
> >   kStatsValueNameTypingNoiseState deprecated
> >
> > PSA: https://groups.google.com/g/discuss-webrtc/c/7X6uwmJarE0
> >
> > Bug: webrtc:11226,webrtc:11292
> > Change-Id: I8d008b56708cf62961b9857ec052b59fda3b41bf
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250666
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> > Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#35975}
>
> TBR=gustaf@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,terelius@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: Iee01fdb874b4e0331277f3ffe60dacaabc3859a2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:11226,webrtc:11292
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251600
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35977}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:11226,webrtc:11292
Change-Id: I2fcbc5fdade16bfe6a0f0a02841a33a598d4f2ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251660
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35984}
2022-02-13 14:02:08 +00:00
Alessio Bazzica
a751f167c6 Revert "Remove unused APM voice activity detection sub-module"
This reverts commit b4e06d032e.

Reason for revert: breaking downstream projects

Original change's description:
> Remove unused APM voice activity detection sub-module
>
> API changes:
> - webrtc::AudioProcessing::Config::VoiceDetection removed
> - webrtc::AudioProcessingStats::voice_detected deprecated
> - cricket::AudioOptions::typing_detection deprecated
> - webrtc::StatsReport::StatsValueName::
>   kStatsValueNameTypingNoiseState deprecated
>
> PSA: https://groups.google.com/g/discuss-webrtc/c/7X6uwmJarE0
>
> Bug: webrtc:11226,webrtc:11292
> Change-Id: I8d008b56708cf62961b9857ec052b59fda3b41bf
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250666
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35975}

TBR=gustaf@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,terelius@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Iee01fdb874b4e0331277f3ffe60dacaabc3859a2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11226,webrtc:11292
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251600
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35977}
2022-02-11 12:15:44 +00:00
Alessio Bazzica
b4e06d032e Remove unused APM voice activity detection sub-module
API changes:
- webrtc::AudioProcessing::Config::VoiceDetection removed
- webrtc::AudioProcessingStats::voice_detected deprecated
- cricket::AudioOptions::typing_detection deprecated
- webrtc::StatsReport::StatsValueName::
  kStatsValueNameTypingNoiseState deprecated

PSA: https://groups.google.com/g/discuss-webrtc/c/7X6uwmJarE0

Bug: webrtc:11226,webrtc:11292
Change-Id: I8d008b56708cf62961b9857ec052b59fda3b41bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250666
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35975}
2022-02-11 10:47:39 +00:00
Henrik Lundin
8a9aa55561 Remove AudioProcessing::ChannelLayout
This enum is no longer needed. Also moving the last piece of code from
common.h to audio_processing_impl.h, allowing to delete common.h.

Bug: chromium:1271981, b/217349489
Change-Id: If115336c36d6d7b5845a903e421c18aebfe434ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251242
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35946}
2022-02-08 10:07:36 +00:00
Henrik Lundin
64253a93dc Remove more traces of keyboard mic support from APM
The 6-parameter Initialize method is removed. The has_keyboard parameter
in the StreamConfig constructor is removed together with the underlying
member and helper functions.

Bug: chromium:1271981, b/217349489
Change-Id: I7259a114a395f74f735a9c06510c0fc0f0f008e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250221
Reviewed-by: Sam Zackrisson <saza@google.com>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35908}
2022-02-04 14:27:51 +00:00
Sam Zackrisson
03cb7e5a61 APM: Make echo detector an optionally compilable and injectable component
Important: This change does not in any way affect echo cancellation or standardized stats. The user audio experience is unchanged. Only non-standard stats are affected. Echo return loss metrics are unchanged. Residual echo likelihood {recent max} will no longer be computed by default.

Important: The echo detector is no longer enabled by default.

API change, PSA: https://groups.google.com/g/discuss-webrtc/c/mJV5cDysBDI/m/7PTPBjVHCgAJ

This CL removes the default usage of the residual echo detector in APM.
It can now only be used via injection and the helper function webrtc::CreateEchoDetector. See how the function audio_processing_unittest.cc:CreateApm() changed, for an example.

The echo detector implementation is marked poisonous, to avoid accidental dependencies.

Some cleanup is done:
- EchoDetector::PackRenderAudioBuffer is declared in one target but is defined in another target. It is not necessary to keep in the API. It is made an implementation detail, and the echo detector input is documented in the API.
- The internal state of APM is large and difficult to track. Submodule pointers that are set permanently on construction are now appropriately marked const.

Tested:
- existing + new unit tests
- audioproc_f is bitexact on a large number of aecdumps

Bug: webrtc:11539
Change-Id: I00cc2ee112fedb06451a533409311605220064d0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239652
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35550}
2021-12-16 17:39:11 +00:00
Artem Titov
d3251968d1 Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.

Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
2021-11-15 21:44:59 +00:00
Hanna Silen
cd59704f8d AudioProcessing: Make minimum and maximum analog levels non-configurable
Remove analog_level_minimum and analog_level_maximum from
AudioProcessing GainController1 and replace their use with fixed
values 0 and 255, respectively.

Bug: webrtc:12774
Change-Id: Ia4bfe5ed43a65f1587ed67f36bfbb2966b6fdf26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235822
Commit-Queue: Hanna Silen <silen@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35297}
2021-11-02 12:49:50 +00:00
Alessio Bazzica
183c64ce19 APM: remove LevelEstimator
Only used in unit tests and a duplication of what `capture_output_rms_`
already does.

This CL also removes `AudioProcessingStats::output_rms_dbfs`, which is
now unused.

Bug: webrtc:5298
Fix: chromium:1261339
Change-Id: I6e583c11d4abb58444c440509a8495a7f5ebc589
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235664
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35246}
2021-10-20 10:52:17 +00:00
Alessio Bazzica
7b80d4480e AGC2: SIMD allowed config flags to field trials
Bug: webrtc:7494
Change-Id: I41fa05d2ef6d969750f3d4c1e40ecbcd30293b5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233741
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35144}
2021-10-05 12:01:38 +00:00
Alessio Bazzica
a850e6c8b6 AGC2 config: allow tuning of headroom, max gain and initial gain
This CL does *not* change the behavior of the AGC2 adaptive digital
controller - bitexactness verified with audioproc_f on a collection of
AEC dumps and Wav files (42 recordings in total).

Tested: compiled Chrome with this patch and made an appr.tc test call

Bug: webrtc:7494
Change-Id: Ia8a9f6fbc3a3459b888a2eed87e108f0d39cfe99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233520
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35140}
2021-10-04 16:11:00 +00:00
Mirko Bonadei
54c90f2330 [-Wshadow] - Fix some warnings.
First CL to try to understand the extent of the cleanup needed in
order to remove -Wno-shadow and follow Chromium on enabling this
diagnostic.

Bug: webrtc:13219
Change-Id: Ie699762da50fe3dbc08b1fd92220962d4b7da86b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233641
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35134}
2021-10-03 11:53:16 +00:00
Alessio Bazzica
be1b8989d1 ExperimentalNs removed + APM not depending anymore on webrtc::Config
Thanks to the elimination of `ExperimentalNs`, there is no need anymore
to pass `webrtc::Config` to build APM.
Hence, `AudioProcessingBuilder::Create(const webrtc::Config&)` is also
removed.

Bug: webrtc:5298
Change-Id: I0a3482376a7753434486fe564681f7b9f83939c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232128
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35025}
2021-09-17 10:53:43 +00:00
Alessio Bazzica
b8a19df71c AGC2: removed unused noise estimator implementation
This CL also includes the following changes:
- `AudioProcessing::Config::GainController2::noise_estimator`
  deprecated
- `EnergyToDbfs()` optimized by removing unnecessary `sqrt`
- Unit test minor fix, incorrect type was used

Bug: webrtc:7494
Change-Id: I88a6672d6f7cd03fcf6a3031883522d256880140
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230940
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34893}
2021-09-01 12:45:20 +00:00
Niels Möller
4f776ac7de Use make_ref_counted in AudioProcessingBuilder
Bug: webrtc:12701
Change-Id: I51ca5a54f812a1620ee2e6605c9ff67b92e2a5f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224547
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34725}
2021-08-11 15:40:28 +00:00
Artem Titov
0b489303d2 Use backticks not vertical bars to denote variables in comments for /modules/audio_processing
Bug: webrtc:12338
Change-Id: I85bff694dd2ead83c939c4d1945eff82e1296001
No-Presubmit: True
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227161
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34690}
2021-08-09 21:49:02 +00:00
Alessio Bazzica
a2efd15627 AGC2 config operator= and unit tests update
Bug: webrtc:7494
Change-Id: I7957602d60658b84175a617f9c283ea44eafe57d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216260
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@google.com>
Cr-Commit-Position: refs/heads/master@{#33876}
2021-04-29 16:37:17 +00:00
Per Åhgren
db5d728878 Add refined handling of the internal scaling of the audio in APM
This CL adds functionality that allows adjusting the audio levels
internally in APM. The main purpose of the functionality is to allow
APM to optionally be moved to an integration that does not provide an
analog gain to control, and the implementation of this has been
tailored specifically to meet the requirements for that.

More specifically, this CL does
-Add a new variant of the pre-amplifier gain that is intended to replace
 the pre-amplifier gain (but at the moment can coexist with that). The
 main differences with the pre-amplifier gain is that an attenuating
 gain is allowed, the gain is applied jointly with any emulated analog
 gain, and that its packaging fits better with the post gain.
-Add an emulation of an analog microphone gain. The emulation is
 designed to match the analog mic gain functionality in Chrome OS (which
 is digital) but should be usable also on other platforms.
-Add a post-gain which is applied after all processing has been applied.
 The purpose of this gain is for it to work well with the integration
 in ChromeOS, and be used to compensate for the offset that there is
 applied on some USB audio devices.


Bug: b/177830918
Change-Id: I0f312996e4088c9bd242a713a703eaaeb17f188a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209707
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33466}
2021-03-15 19:12:02 +00:00
Gustaf Ullberg
09226fc832 Disable high-pass filtering of the AEC reference
Currently the echo canceller reference signal is high-pass filtered to
avoid the need of modeling the capture-side high-pass filter as part of
the echo path.

This can lead to the lowest frequency bins of the linear filter
diverging as there is little low-frequency content available for
training. Over time the filter can output an increasing amount of
low-frequency power, which in turn affects the filter's ability to
adapt properly.

Disabling the high-pass filtering of the echo canceller reference solves
this issue, resulting in improved filter convergence.

Bug: webrtc:12265
Change-Id: Ic526a4b1b73e1808cfcd96a8cdee801b96a27671
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208288
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33322}
2021-02-23 07:06:11 +00:00
Alessio Bazzica
42eef86c4f Remove unused code in APM
- The injection of the AGC2 level estimator into `AgcManagerDirect`
  is not used anymore
- `ExperimentalAgc::enabled_agc2_level_estimator` can also be removed
- 3 ctors of `ExperimentalAgc` are unused
- `AgcManagerDirectStandaloneTest::AgcMinMicLevelExperiment` can be
  split into separate unit tests (better code clarity)

Bug: webrtc:7494
Change-Id: I5843147c38cf7cb5ee484b0a72fe13dcf363efaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202025
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33027}
2021-01-18 13:40:27 +00:00
Alessio Bazzica
3438a9383c AGC2 config change detection fixed
AGC2 is correctly (re)initialized when its config changes.
This CL also improves the `AudioProcessingImpl::ApplyConfig`
readability by defining operator!= also for the AGC1 config.

Bug: webrtc:7494
Change-Id: I62068de32c941e6b18d4618c656f569647042345
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187120
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32402}
2020-10-14 12:18:57 +00:00
Per Åhgren
a43178c871 Reland "Activating AVX2 support by default"
This is a reland of ad148272b8

Original change's description:
> Activating AVX2 support by default
>
> This CL activates the newly added AVX2 support by default.
> The activation is done beneath a kill-switch.
>
> Beyond the above, the CL also changes an incorrect DCHECK_GT
> to a DCHECK_GE.
>
> Bug: webrtc:11663
> Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32193}

Bug: webrtc:11663, chromium:1134234
Change-Id: I0cb34cf08d4d14bc3aee055254493c9c9ee8faa0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186401
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32303}
2020-10-03 22:37:13 +00:00
Andrey Logvin
082fac73be Revert "Reland "Activating AVX2 support by default""
This reverts commit a0ad0bbf8f.

Reason for revert: Speculative revert. I suspect it breaks downstream project

Original change's description:
> Reland "Activating AVX2 support by default"
>
> This is a reland of ad148272b8
>
> Original change's description:
> > Activating AVX2 support by default
> >
> > This CL activates the newly added AVX2 support by default.
> > The activation is done beneath a kill-switch.
> >
> > Beyond the above, the CL also changes an incorrect DCHECK_GT
> > to a DCHECK_GE.
> >
> > Bug: webrtc:11663
> > Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> > Commit-Queue: Per Åhgren <peah@webrtc.org>
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#32193}
>
> Bug: webrtc:11663
> Change-Id: Ib41dc1d1c5865f2828699c462939d15d5562df47
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186262
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32270}

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

Change-Id: I1305fad8d19ba0bd69a38b9e2959af54f900535d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11663
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186304
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32273}
2020-10-01 13:39:07 +00:00
Per Åhgren
a0ad0bbf8f Reland "Activating AVX2 support by default"
This is a reland of ad148272b8

Original change's description:
> Activating AVX2 support by default
>
> This CL activates the newly added AVX2 support by default.
> The activation is done beneath a kill-switch.
>
> Beyond the above, the CL also changes an incorrect DCHECK_GT
> to a DCHECK_GE.
>
> Bug: webrtc:11663
> Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32193}

Bug: webrtc:11663
Change-Id: Ib41dc1d1c5865f2828699c462939d15d5562df47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186262
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32270}
2020-10-01 12:19:19 +00:00
Per Åhgren
80907be915 Revert "Activating AVX2 support by default"
This reverts commit ad148272b8.

Reason for revert: Speculative revert to investigate test failures

Original change's description:
> Activating AVX2 support by default
>
> This CL activates the newly added AVX2 support by default.
> The activation is done beneath a kill-switch.
>
> Beyond the above, the CL also changes an incorrect DCHECK_GT
> to a DCHECK_GE.
>
> Bug: webrtc:11663
> Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32193}

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:11663
Change-Id: Ibb019e8c702dce45ebf47f1c1e8db19069b4964d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186081
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32259}
2020-09-30 15:30:04 +00:00
Per Åhgren
e5d669ed28 Reland "Activating AVX2 support by default"
This is a reland of ad148272b8

Original change's description:
> Activating AVX2 support by default
>
> This CL activates the newly added AVX2 support by default.
> The activation is done beneath a kill-switch.
>
> Beyond the above, the CL also changes an incorrect DCHECK_GT
> to a DCHECK_GE.
>
> Bug: webrtc:11663
> Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32193}

Bug: webrtc:11663
Change-Id: I669435c2f4e451ee0766d809443484f2dde09d8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185482
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32200}
2020-09-25 14:46:20 +00:00
Per Åhgren
9ccbe17abb Revert "Activating AVX2 support by default"
This reverts commit ad148272b8.

Reason for revert: Causing test failures downstream.

Original change's description:
> Activating AVX2 support by default
>
> This CL activates the newly added AVX2 support by default.
> The activation is done beneath a kill-switch.
>
> Beyond the above, the CL also changes an incorrect DCHECK_GT
> to a DCHECK_GE.
>
> Bug: webrtc:11663
> Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32193}

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

Change-Id: If2287a0a4b37931ce5f85baae093a66b19d0a78b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11663
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185481
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32196}
2020-09-25 12:13:46 +00:00
Per Åhgren
ad148272b8 Activating AVX2 support by default
This CL activates the newly added AVX2 support by default.
The activation is done beneath a kill-switch.

Beyond the above, the CL also changes an incorrect DCHECK_GT
to a DCHECK_GE.

Bug: webrtc:11663
Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32193}
2020-09-25 11:30:22 +00:00
Tommi
a5e07cc3db Rename more death test to *DeathTest
Bug: webrtc:11577
Change-Id: If45e322fed3f2935e64c9e4d7e8c096eccc53ac4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176140
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31362}
2020-05-26 20:27:34 +00:00
Per Åhgren
cc73ed3e70 APM: Add build flag to allow building WebRTC without APM
This CL adds a build flag to allow building the non-test parts
of WebRTC without the audio processing module.
The CL also ensures that the WebRTC code correctly handles
the case when no APM is available.

Bug: webrtc:5298
Change-Id: I5c8b5d1f7115e5cce2af4c2b5ff701fa1c54e49e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171509
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31133}
2020-04-26 23:06:44 +00:00
Per Åhgren
dc5522b4bf APM: Removing the redundant VAD output from the integer API
This CL removes the redundant VAD output from the newly introduced
integer API in AudioProcessing.

Bug: webrtc:5298
Change-Id: Iad2b1b97ada7f4863139655526c110e326c6788a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170824
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30832}
2020-03-19 13:59:00 +00:00
Per Åhgren
2507f8cdc9 APM: Replace all remaining usage of AudioFrame outside interfaces
This CL replaces all remaining usage of AudioFrame within APM,
with the exception of the AudioProcessing interface.

The main changes are within the unittests.

Bug: webrtc:5298
Change-Id: I219cdd08f81a8679b28d9dd1359a56837945f3d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170362
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30831}
2020-03-19 12:40:18 +00:00
Jonas Olsson
6c9bc396e9 Cleanup log formatting in modules/audio_processing
Bug: None
Change-Id: I47177530d8a85d7b2f143081de71f5a3bf8ec354
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166041
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30379}
2020-01-27 09:42:56 +00:00
Sam Zackrisson
2d31aea481 Remove unused AEC delay offset API
Bug: webrtc:5298
Change-Id: If490dba3c95b1d6aeaa7b110dd1ffc23ee7a96c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166440
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30297}
2020-01-17 11:09:51 +00:00