Commit graph

239 commits

Author SHA1 Message Date
Sam Zackrisson
4db667be74 Add private voice detection instance to replace public voice detector
This adds a second (!) VoiceDetection instance in APM, activated via webrtc::AudioProcessing::Config and which reports its values in the webrtc::AudioProcessingStats struct.

The alternative is to reuse the existing instance, but that would require adding a proxy interface returned by AudioProcessing::voice_detection() to update the internal config of AudioProcessingImpl when calling voice_detection()->Enable().

Complexity-wise, no reasonable client will enable both interfaces simultaneously, so the footprint is negligible.

Bug: webrtc:9947
Change-Id: I7d8e28b9bf06abab8f9c6822424bdb9d803b987d
Reviewed-on: https://webrtc-review.googlesource.com/c/115243
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26101}
2018-12-27 12:00:06 +00:00
Sam Zackrisson
b24c00f02d Add AudioProcessingCaptureStats and a level estimator replacement
This adds an interface for accessing stats on the capture stream, and
adds a level estimator to report one of the stats.

Bug: webrtc:9947
Change-Id: Id472534fa2e04d46c9ab700671f620584a246afb
Reviewed-on: https://webrtc-review.googlesource.com/c/109587
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25786}
2018-11-26 15:52:14 +00:00
Sam Zackrisson
c22f551842 Remove locks from AECM and move it into private_submodules_
This drops the locks and annotations in EchoControlMobileImpl,
now that the interface is no longer externally accessible.

Additionally, SetEchoPath and GetEchoPath (with surrounding code) is
removed. They are unused.

Bug: webrtc:9929
Change-Id: Ibc6751754614ed39836f6ee6835d7b53dedd828c
Reviewed-on: https://webrtc-review.googlesource.com/c/109025
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25504}
2018-11-05 16:25:09 +00:00
Sam Zackrisson
281276301c Remove deprecated AudioProcessing::GetStatistics function
Additionally, AudioProcessing::GetStatistics(bool) is made pure
virtual and the default implementation in AudioProcessing is removed.

Deprecation PSA:
https://groups.google.com/forum/#!msg/discuss-webrtc/NgqEPvkNuDE/7HtwnMmADgAJ

Bug: webrtc:9947, webrtc:8572
Change-Id: I123402bf7d6c49f3613154c469b818109d8fad43
Reviewed-on: https://webrtc-review.googlesource.com/c/108783
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25463}
2018-11-01 11:21:15 +00:00
Sam Zackrisson
7f4dfa4106 Remove locks from AEC2 and move it into private_submodules_
This drops the locks and annotations in EchoCancellationImpl,
now that the interface is no longer externally accessible.


Bug: webrtc:9929
Change-Id: I401256f523340cbabce23a5914ab28ce44179935
Reviewed-on: https://webrtc-review.googlesource.com/c/108602
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25460}
2018-11-01 08:40:16 +00:00
Yves Gerey
988cc0870b [Cleanup] Add missing #include. Remove useless ones.
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.

bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
2018-10-23 11:32:56 +00:00
Sam Zackrisson
b0ab2ce256 Reland "Remove the HighPassFilter interface"
Downstream Chromium dependencies fixed here:
https://chromium-review.googlesource.com/c/chromium/src/+/1286449

This is a reland of e2405c1a82

Original change's description:
> Remove the HighPassFilter interface
>
> The functionality remains unaffected.
> Filter toggling is still available via webrtc::AudioProcessing::Config.
> Example:
> webrtc::AudioProcessing::Config config = apm.GetConfig();
> // Read settings
> if (config.high_pass_filter.enabled) { ... }
> // Apply setting
> config.high_pass_filter.enabled = true;
> apm.ApplyConfig();
>
> Bug: webrtc:9535
> Change-Id: Ib4c4b04078bbb490ebdab9721b8c7811d73777a8
> Reviewed-on: https://webrtc-review.googlesource.com/c/102541
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25198}

Bug: webrtc:9535
Change-Id: I0017193ad3ca1762e186f3ad79f29d33ef468202
Reviewed-on: https://webrtc-review.googlesource.com/c/106681
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25300}
2018-10-23 07:44:09 +00:00
Niklas Enbom
d895f42bfb Revert "Remove the HighPassFilter interface"
This reverts commit e2405c1a82.

Reason for revert: Breaks Chrome compile: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8932502586827763408/+/steps/compile__with_patch_/0/stdout 
Original change's description:
> Remove the HighPassFilter interface
> 
> The functionality remains unaffected.
> Filter toggling is still available via webrtc::AudioProcessing::Config.
> Example:
> webrtc::AudioProcessing::Config config = apm.GetConfig();
> // Read settings
> if (config.high_pass_filter.enabled) { ... }
> // Apply setting
> config.high_pass_filter.enabled = true;
> apm.ApplyConfig();
> 
> Bug: webrtc:9535
> Change-Id: Ib4c4b04078bbb490ebdab9721b8c7811d73777a8
> Reviewed-on: https://webrtc-review.googlesource.com/c/102541
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25198}

TBR=solenberg@webrtc.org,saza@webrtc.org,peah@webrtc.org

Change-Id: Ieb34d5c573c4ab22eefbb54aeaa2f72844740b89
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9535
Reviewed-on: https://webrtc-review.googlesource.com/c/106421
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Commit-Queue: Niklas Enbom <niklas.enbom@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25215}
2018-10-16 15:51:45 +00:00
Sam Zackrisson
e2405c1a82 Remove the HighPassFilter interface
The functionality remains unaffected.
Filter toggling is still available via webrtc::AudioProcessing::Config.
Example:
webrtc::AudioProcessing::Config config = apm.GetConfig();
// Read settings
if (config.high_pass_filter.enabled) { ... }
// Apply setting
config.high_pass_filter.enabled = true;
apm.ApplyConfig();

Bug: webrtc:9535
Change-Id: Ib4c4b04078bbb490ebdab9721b8c7811d73777a8
Reviewed-on: https://webrtc-review.googlesource.com/c/102541
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25198}
2018-10-16 09:27:44 +00:00
Yves Gerey
499bc6c5d0 Fix race conditions for ReofferDoesNotCallOnTrack test.
This CL extend critical sections to incorporate:
 * private_submodules_->echo_controller
 * config_

As a side benefit, it prevents weird interleaving where configuration
could have been changed in the middle of GetStatistics methods.

Bug: webrtc:9841
Change-Id: I0de5e756a684c2ff1be4effccf8c0f3d3175e3b9
Reviewed-on: https://webrtc-review.googlesource.com/c/105142
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25121}
2018-10-11 16:12:12 +00:00
saza
be490b2abe Delete deprecated AEC interfaces
They've been officially deprecated since September 4, 2018.
PSA: https://groups.google.com/forum/#!topic/discuss-webrtc/r_9n-PRUIX4

Bug: webrtc:9535
Change-Id: I294e22ae874b1edd81a0a0347755d82c5ebc61e0
Reviewed-on: https://webrtc-review.googlesource.com/c/103444
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24971}
2018-10-04 09:20:10 +00:00
Sam Zackrisson
8c147b68e6 Reland "Remove APM-internal usage of EchoControlMobile"
This is a reland of 2fbb83b16b

Original change's description:
> Remove APM-internal usage of EchoControlMobile
> 
> This is a sibling CL to a similar one for EchoCancellation:
> https://webrtc-review.googlesource.com/c/src/+/97603
> 
>  - EchoControlMobileImpl will no longer inherit EchoControlMobile.
>  - Removes usage of AudioProcessing::echo_control_mobile() inside most of
>    the audio processing module and unit tests.
> 
> The CL breaks audioproc_f backwards compatibility: It can no longer
> use all recorded settings (comfort noise, routing mode), but prints an
> error message when unsupported settings are encountered.
> 
> Tested: audioproc_f with .wav and aecdump inputs.
> Bug: webrtc:9535
> Change-Id: I63c3c81bcaf44021315978e1a0f3e42173b988ce
> Reviewed-on: https://webrtc-review.googlesource.com/101621
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24888}

Bug: webrtc:9535
Change-Id: I172706c6729cac4eb6afde1ebd6fc8f3a289d6c7
Reviewed-on: https://webrtc-review.googlesource.com/c/102881
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24943}
2018-10-03 07:45:33 +00:00
Per Åhgren
e8a55693c2 AEC3: Correct the check for not reacting on initial pre-amp gain changes
This CL corrects the incorrectly implemented check to avoid that AEC3
reacts on the initial pre-amp gain setting.

TBR: devicentepena@webrtc.org
Bug: webrtc:9805
Change-Id: I5decbf00a80457f24b8cd499c35720805ff9ccbc
Reviewed-on: https://webrtc-review.googlesource.com/c/103360
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24938}
2018-10-02 22:09:24 +00:00
Per Åhgren
d2650d1a28 AEC3: Reseting the ERLE at pre-amplifier gain changes
In this CL the ERLE estimator is reset after a pre-amplifier gain change is communicated to APM.

Bug: webrtc:9805
Change-Id: I040f344e4607e862240250f9478d06de0d58a096
Reviewed-on: https://webrtc-review.googlesource.com/103222
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24933}
2018-10-02 15:53:58 +00:00
Sam Zackrisson
05a7004442 Revert "Remove APM-internal usage of EchoControlMobile"
This reverts commit 2fbb83b16b.

Reason for revert: Speculative revert over failing Chromium bot:
https://ci.chromium.org/p/chromium/builders/luci.chromium.webrtc.fyi/WebRTC%20Chromium%20FYI%20Android%20Tests%20%28dbg%29%20%28M%20Nexus5X%29/117

Original change's description:
> Remove APM-internal usage of EchoControlMobile
> 
> This is a sibling CL to a similar one for EchoCancellation:
> https://webrtc-review.googlesource.com/c/src/+/97603
> 
>  - EchoControlMobileImpl will no longer inherit EchoControlMobile.
>  - Removes usage of AudioProcessing::echo_control_mobile() inside most of
>    the audio processing module and unit tests.
> 
> The CL breaks audioproc_f backwards compatibility: It can no longer
> use all recorded settings (comfort noise, routing mode), but prints an
> error message when unsupported settings are encountered.
> 
> Tested: audioproc_f with .wav and aecdump inputs.
> Bug: webrtc:9535
> Change-Id: I63c3c81bcaf44021315978e1a0f3e42173b988ce
> Reviewed-on: https://webrtc-review.googlesource.com/101621
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24888}

TBR=saza@webrtc.org,aleloi@webrtc.org

Change-Id: I1f8a27ac291f2cdc16c8daa32e399b74d489dbb9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9535
Reviewed-on: https://webrtc-review.googlesource.com/102642
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24895}
2018-09-28 13:39:19 +00:00
Sam Zackrisson
cb1b55612c Use low cut filtering whenever NS or AEC are enabled
These submodules implicitly rely on low cut filtering being enabled.

This CL clarifies a distinction:
High pass filtering is a feature that users can enable, according to the WebRTC standard.
Low cut filtering is a processing effect that is applied when any of the following is active:
- high pass filter
- noise suppression
- builtin echo cancellation

Bug: webrtc:9535
Change-Id: I9474276fb11354ea3b01e65a0699f6c29263770b
Reviewed-on: https://webrtc-review.googlesource.com/102600
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24892}
2018-09-28 13:00:19 +00:00
Sam Zackrisson
2fbb83b16b Remove APM-internal usage of EchoControlMobile
This is a sibling CL to a similar one for EchoCancellation:
https://webrtc-review.googlesource.com/c/src/+/97603

 - EchoControlMobileImpl will no longer inherit EchoControlMobile.
 - Removes usage of AudioProcessing::echo_control_mobile() inside most of
   the audio processing module and unit tests.

The CL breaks audioproc_f backwards compatibility: It can no longer
use all recorded settings (comfort noise, routing mode), but prints an
error message when unsupported settings are encountered.

Tested: audioproc_f with .wav and aecdump inputs.
Bug: webrtc:9535
Change-Id: I63c3c81bcaf44021315978e1a0f3e42173b988ce
Reviewed-on: https://webrtc-review.googlesource.com/101621
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24888}
2018-09-28 11:11:44 +00:00
Sam Zackrisson
cdf0e6d4c5 Reland "Remove APM internal usage of EchoCancellation"
Original CL:
https://webrtc-review.googlesource.com/c/src/+/97603
 - Changes EchoCancellationImpl to inherit privately from
   EchoCancellation.
 - Removes usage of AudioProcessing::echo_cancellation() inside most of
   the audio processing module and unit tests.
 - Default-enables metrics collection in AEC2.

The CL breaks audioproc_f backwards compatibility: It can no longer
use all recorded settings (drift compensation, suppression level), but
prints an error message when such settings are encountered.

Revert CL:
https://webrtc-review.googlesource.com/c/src/+/100305

Bug: webrtc:9535
TBR: gustaf@webrtc.org
Change-Id: I9248046b3a6a82df6221e502481836948643a991
Reviewed-on: https://webrtc-review.googlesource.com/100461
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24749}
2018-09-17 09:51:08 +00:00
Sergey Silkin
271812a893 Revert "Remove APM internal usage of EchoCancellation"
This reverts commit 1a03960e63.

Reason for revert: breaks downstream projects.

Original change's description:
> Remove APM internal usage of EchoCancellation
> 
> This CL:
>  - Changes EchoCancellationImpl to inherit privately from
>    EchoCancellation.
>  - Removes usage of AudioProcessing::echo_cancellation() inside most of
>    the audio processing module and unit tests.
>  - Default-enables metrics collection in AEC2.
> 
> This CL breaks audioproc_f backwards compatibility: It can no longer
> use all recorded settings (drift compensation, suppression level), but
> prints an error message when such settings are encountered.
> 
> Some code in audio_processing_unittest.cc still uses the old interface.
> I'll handle that in a separate change, as it is not as straightforward
> to preserve coverage.
> 
> Bug: webrtc:9535
> Change-Id: Ia4d4b8d117ccbe516e5345c15d37298418590686
> Reviewed-on: https://webrtc-review.googlesource.com/97603
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24724}

TBR=gustaf@webrtc.org,saza@webrtc.org

Change-Id: Ifdc4235f9c5ee8a8a5d32cc8e1dda0853b941693
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9535
Reviewed-on: https://webrtc-review.googlesource.com/100305
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24729}
2018-09-13 14:55:30 +00:00
Sam Zackrisson
1a03960e63 Remove APM internal usage of EchoCancellation
This CL:
 - Changes EchoCancellationImpl to inherit privately from
   EchoCancellation.
 - Removes usage of AudioProcessing::echo_cancellation() inside most of
   the audio processing module and unit tests.
 - Default-enables metrics collection in AEC2.

This CL breaks audioproc_f backwards compatibility: It can no longer
use all recorded settings (drift compensation, suppression level), but
prints an error message when such settings are encountered.

Some code in audio_processing_unittest.cc still uses the old interface.
I'll handle that in a separate change, as it is not as straightforward
to preserve coverage.

Bug: webrtc:9535
Change-Id: Ia4d4b8d117ccbe516e5345c15d37298418590686
Reviewed-on: https://webrtc-review.googlesource.com/97603
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24724}
2018-09-13 12:05:20 +00:00
Alex Loiko
d934244feb Added flags for the adaptive analog AGC in audioproc_f.
Added back the 'agc2 level estimation' flag. Also added a flag for
moving the level measurement before AEC and NS. This is to run offline
experiments with audioproc_f.


Bug: webrtc:7494
Change-Id: I3e3ffceede7166b754130be2b707b620ba527e9f
Reviewed-on: https://webrtc-review.googlesource.com/97442
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24657}
2018-09-10 14:16:46 +00:00
Alex Loiko
623472219f Store RuntimeSetting in Aec Dumps.
Also read and apply settings when parsing and replaying dumps.

The implementation contains
* an extra field in debug.proto for the runtime settings
* code in AudioProcessingImpl to initiate the logging of the RS to the
  AecDump
* code in aec_dump/ to log the RS in the AecDump
* code in test/ for re-playing the RS. E.g. for APM simulation with
  audioproc_f.

Bug: webrtc:9138
Change-Id: Ia2a00537c2eb19484ff442fbffd0b95f8495516f
Reviewed-on: https://webrtc-review.googlesource.com/70502
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24647}
2018-09-10 11:40:28 +00:00
Alessio Bazzica
cc22f51988 Removing the intelligibility enhancer.
The intelligibility enhancer is always disabled and it is the only non-test
target using the lapped transform in common_audio (which we planned to remove).

Bug: webrtc:9689, webrtc:5298
Change-Id: Ida65d3aa11ac366471e7e5cbc053108b376c67d8
Reviewed-on: https://webrtc-review.googlesource.com/96460
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24504}
2018-08-30 21:29:57 +00:00
Valeriia Nemychnikova
f06eb57a2f Adding CustomAudioAnalyzer interface in APM.
CustomAudioAnalyzer is an interface of a component into APM that
reads AudioBuffer without changing it.
The APM sub-module is optional. It operates in full band.
As described in the comments, it is an experimental interface which
may be changed in the nearest future.

Change-Id: I21edf729d97947529256407b10fa4b5219bb2bf5
Bug: webrtc:9678
Reviewed-on: https://webrtc-review.googlesource.com/96560
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Valeriia Nemychnikova <valeriian@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24481}
2018-08-29 10:12:26 +00:00
Sam Zackrisson
b3b47ad7e6 Toggle AECs via AudioProcessing::Config
This allows clients to stop using the old pointer-to-submodule interfaces
for enabling/disabling AEC2 and AECM.

The legacy suppression level flag for AEC2 is not yet activated.

NoTry=TRUE

Bug: webrtc:9535
Change-Id: Ie2c3378d832a6b393aec656d96597f85e299f500
Reviewed-on: https://webrtc-review.googlesource.com/94771
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24328}
2018-08-17 14:56:57 +00:00
Sam Zackrisson
74ed734d71 Add AEC proxies for simple deprecation of AEC configurability.
Some changes need access to both the APM interface and the AECs,
hence we can't make the changes inside the AECs themselves.

The proxies also make it easy to drop support for individual parts of the
interfaces one at a time.


Bug: webrtc:9535
Change-Id: I3398e1182157f7d8b1e4c455060b830b61c20dd9
Reviewed-on: https://webrtc-review.googlesource.com/94500
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24317}
2018-08-16 15:16:44 +00:00
Minyue Li
656d609a95 Add UTC time to init event in AEC debug dump.
Bug: webrtc:9616
Change-Id: I1350212f0b8835fb64427483269da96d51670c01
Reviewed-on: https://webrtc-review.googlesource.com/92620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24267}
2018-08-11 20:29:07 +00:00
Alessio Bazzica
d2b9740f48 APM: render pre-processor moved before echo detector queuing.
Any modification of the render stream now happens *before* the
echo detector enqueues render stream frames. In this way, there
is no impact of the render pre-processor on the echo likelihood
metric.

Bug: webrtc:9591
Change-Id: I9b5e339e892796a0d0cd072fdd45d35ec89d8802
Reviewed-on: https://webrtc-review.googlesource.com/93031
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24251}
2018-08-09 14:40:31 +00:00
Alex Loiko
9489c3a2ea Optionally disable digital gain control in ExperimentalAgc.
This CL adds a flag to optionally disable the digital gain control in
ExperimentalAgc. With the flag, Experimental Agc (henceforth AGC1)
only controls the adaptive analog gain. This flag can be combined to
that which activates AGC2. That way, one can enable the hybrid AGC
configuration AGC1 analog only + AGC2 fixed+adaptive digital.

Previously, there was a flag "use_agc2_digital_adaptive" in
AgcManagerDirect. Our ambition was that to activate the hybrid mode
described above with this flag. The behavior of the flag was not
implemented.

To activate the hybrid mode after this CL, set
ExperimentalAgc::digital_adaptive_disabled=true and
AudioProcessing::Config::GainController2::enabled=true.

We also add flags for these settings in audioproc_f.
Then the required settings are currently

  audioproc_f --agc2 1 --agc 1 --experimental_agc 1 \
      --experimental_agc_disable_digital_adaptive 1 \
      -i [INPUT]

Bug: webrtc:7494
Change-Id: Iea798dc3899cec83d30ba71caba787262fcaef41
Reviewed-on: https://webrtc-review.googlesource.com/89740
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24249}
2018-08-09 13:37:30 +00:00
Alex Loiko
a837dd790d Reset Agc2 on analog gain changes.
Agc2 applies a digital gain to the nearend signal.
When the analog level changes, the digital gain calculation is no
longer valid. Therefore Agc2 should be notified to analog gain
changes.

This CL also allow audioproc_f to chain AGC1 and AGC2. In a dependent
CL we will allow using AGC1 for analog gain and AGC2 for digital
gain.

Bug: webrtc:7494
Change-Id: Id75b3728fbf2de1d84b7fba005e4670c7a2985d9
Reviewed-on: https://webrtc-review.googlesource.com/89387
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24231}
2018-08-08 14:36:37 +00:00
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00
Sam Zackrisson
2a959d96c9 Revert "Add one-stop-shop for built-in AEC toggling in APM"
This reverts commit 771b50ca0b.

Reason for revert: Introduces error-prone config.

Original change's description:
> Add one-stop-shop for built-in AEC toggling in APM
> 
> This does not change what AEC functionality is available.
> However, a client that only uses this interface - and not the submodule
> pointer accessors - gets simpler code, and is guaranteed not to run any
> two AECs in tandem.
> 
> The submodule interface EchoControlMobile is being deprecated in
> https://webrtc-review.googlesource.com/c/src/+/89392
> 
> Bug: webrtc:9535
> Change-Id: Id9326074e566be6d8768010fc421c457beff402c
> Reviewed-on: https://webrtc-review.googlesource.com/89386
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24066}

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

Change-Id: I43283a1b22538a4caa77313499989146b2ce67f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9535
Reviewed-on: https://webrtc-review.googlesource.com/90060
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24067}
2018-07-23 14:48:17 +00:00
Sam Zackrisson
771b50ca0b Add one-stop-shop for built-in AEC toggling in APM
This does not change what AEC functionality is available.
However, a client that only uses this interface - and not the submodule
pointer accessors - gets simpler code, and is guaranteed not to run any
two AECs in tandem.

The submodule interface EchoControlMobile is being deprecated in
https://webrtc-review.googlesource.com/c/src/+/89392

Bug: webrtc:9535
Change-Id: Id9326074e566be6d8768010fc421c457beff402c
Reviewed-on: https://webrtc-review.googlesource.com/89386
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24066}
2018-07-23 14:12:26 +00:00
Per Åhgren
88cf0501f3 AEC3: Adding explicit handling of microphone gain changes
This CL re-activates the explicit handling of microphone
gain changes in the AEC3 code. The implementation is done
beneath a kill-switch so that when that switch is active
the changes in this CL are bitexact.


Bug: webrtc:9526,chromium:863826
Change-Id: I58e93d8bc0bce7bec91e102de9891ad48ebc55d8
Reviewed-on: https://webrtc-review.googlesource.com/88620
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23986}
2018-07-16 16:02:07 +00:00
Alex Loiko
64cb83bbd9 Flags and settings for AGC2 in AgcManagerDirect.
This CL adds two flags to audioproc_f. The flags control
AgcManagerDirect. The flags are
'--experimental_agc_agc2_level_estimator' and
'--experimental_agc_agc2_digital_adaptive'.

After this CL, the flags are be applied to AgcManagerDirect. The flags
have no effect in release-mode. They cause a crash in debug-mode.

In an upcoming CL, '--experimental_agc_agc2_level_estimator 1' will
replace the speech level estimation in ExperimentalAgc with that of
AGC2.

'--experimental_agc_agc2_digital_adaptive 1' will replace the digital
gain selection and application with that of AGC2.

These audioproc_f will activate both new settings:

./out/Target/audioproc_f --agc 1 --experimental_agc 1
--experimental_agc_agc2_digital_adaptive 1
--experimental_agc_agc2_level_estimator 1 --simulate_mic_gain 1
--simulated_mic_kind 2

See also https://webrtc-review.googlesource.com/c/src/+/79360

Bug: webrtc:7494
Change-Id: If0e65893dffdddb312e553787b8cedaf9a334323
Reviewed-on: https://webrtc-review.googlesource.com/86548
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23802}
2018-07-02 13:20:39 +00:00
Sam Zackrisson
db38972eda Remove nonlinear beamformer API from APM
This CL removes the remaining beamformer parts from the APM.

Bug: webrtc:9402
Change-Id: I9ab2795bd2813d17166ed0925125257b82d98a74
Reviewed-on: https://webrtc-review.googlesource.com/83340
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23694}
2018-06-21 08:49:52 +00:00
Alex Loiko
80c0f06d63 Init GainControlImpl with correct lock.
GainControlImpl was inited with two refs to the APM capture lock. As a
result, it could modify member vars without holding the render
lock. The Process and Analyze calls are not affected, because they are
made from audio_processing_impl when APM holds both locks.

Bug: webrtc:9354
Change-Id: I814b69602280921dda9dc45ffcbddb38de4a3394
Reviewed-on: https://webrtc-review.googlesource.com/84182
Reviewed-by: Max Morin <maxmorin@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23677}
2018-06-20 07:51:19 +00:00
Danil Chapovalov
db9f7ab9f9 Replace rtc::Optional with absl::optional in modules/audio processing
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script with parameter 'modules/audio_processing'

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: Id29f8de59dba704787c2c38a3d05c60827c181b0
Reviewed-on: https://webrtc-review.googlesource.com/83982
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23653}
2018-06-19 10:38:56 +00:00
Sam Zackrisson
9394f6fda1 Stop using the beamformer inside APM
Removes the usage of an injected/enabled beamformer in APM, and marks
the API parts as deprecated.
Initialization and process calls are removed, and all enabled/disabled
flags are replaced by assuming no beamforming. Additionally, an AGC test
relying on the beamformer as a VAD is removed.

Bug: webrtc:9402
Change-Id: I0d3d0b9773da083ce43c28045db9a77278f59f95
Reviewed-on: https://webrtc-review.googlesource.com/83341
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23643}
2018-06-18 13:18:13 +00:00
Ivo Creusen
d1f970dc43 Change echo detector to scoped_refptr
The echo detector is currently stored as a unique_ptr, but when injecting an echo detector, a scoped_refptr makes more sense since the ownership will be shared.

Bug: webrtc:8732
Change-Id: I2180014acb84f1cd5c361864a444b7b6574520f5
Reviewed-on: https://webrtc-review.googlesource.com/83325
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23610}
2018-06-14 09:51:41 +00:00
Alex Loiko
1aec594018 Merge :audio_processing and :aec_dump_interface.
Merges the two targets in modules/audio_processing
and removes some redundant code. This enables not writing
a bunch of redundant code in
https://webrtc-review.googlesource.com/c/src/+/70502

':audio_processing' did depend on ':aec_dump_interface'.
'modules/audio_processing/aec_dump' did depend on
'aec_dump_interface' but not ':audio_processing'.

Having the AecDump implementation not depending on
'audio_processing' allows to have faster compilation time and
reduces the dependencies. However, maintaining such a decoupling
makes APM and AecDump client code more complex.

NOTRY=true # want this in and 'ios_api_framework' seems stuck.

Bug: webrtc:7404
Change-Id: I75a5f234591014ac42d52bc1a36526072f5be89c
Reviewed-on: https://webrtc-review.googlesource.com/76603
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23244}
2018-05-15 14:22:52 +00:00
Alex Loiko
73ec01977b Add RuntimeSettings to CustomProcessing.
CustomProcessing is the interface to injectable audio processing
submodules to AudioProcessing. This CL makes it possible to set
runtime settings on the injected render processing component.

Note that the current runtime setting handling happens on the capture
thread. Therefore, we add another SwapQueue to communicate with the
render thread.

Bug: webrtc:9138, webrtc:9262
Change-Id: I665ce2d83a2b35ca8b25cca813d2cef7bd0ba911
Reviewed-on: https://webrtc-review.googlesource.com/76123
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23236}
2018-05-15 10:03:25 +00:00
Per Åhgren
0dfd3721ef Avoid enforcing that the stream delay is reported for AEC3
Bug: webrtc:9243
Change-Id: I0703a77d049d20f8dbc547d149f102f7fbb3e017
Reviewed-on: https://webrtc-review.googlesource.com/74701
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23147}
2018-05-07 14:44:38 +00:00
Alessio Bazzica
33444dc835 APM pre-gain sub-module: code improvements.
- No need to have a unique ptr for the swap queue
- Remove default case from the switch in
  AudioProcessingImpl::HandleRuntimeSettings()

Bug: webrtc:9138
Change-Id: I346ba1db6510b5caa637510298b67ead07197b81
Reviewed-on: https://webrtc-review.googlesource.com/71164
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22958}
2018-04-20 12:53:53 +00:00
Fredrik Solenberg
104ad0b62b Remove stale dependencies from APM static lib target:
- protobuf library
- file_wrapper.h

These appear to have been left behind during the AecDump refactoring.
After this CL, APM no longer depends on zlib by default! :)

Bug: webrtc:9139
Change-Id: I12a8df2a17a575515b9c07165825f0879c4e15eb
Reviewed-on: https://webrtc-review.googlesource.com/70762
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22923}
2018-04-18 17:00:05 +00:00
Per Åhgren
d0fa820559 Allow AEC3 to use any externally reported audio buffer delay in AEC3
This CL adds support for using any externally reported audio buffer
delay to set the initial alignment in AEC3 which is used before the
AEC has been able to detect the delay.

Bug: chromium:834182,webrtc:9163
Change-Id: Ic71355f69b7c4d5815b78e49987043441e7908fb
Reviewed-on: https://webrtc-review.googlesource.com/70580
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22917}
2018-04-18 09:05:54 +00:00
Ivo Creusen
b1facc1f71 The initialization of the echo detector should always signal that the input audio is mono.
Since we always pass in the first audio channel, we should always pass 1 as the number of channels in the initialization function.

Bug: webrtc:8732
Change-Id: I978edb125d7cc701a5e07193256327908be00560
Reviewed-on: https://webrtc-review.googlesource.com/69660
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22885}
2018-04-16 18:38:58 +00:00
Alex Loiko
b5c9a79e68 Activate the pre-amplifier in AudioProcessing.
It's a module for applying a gain to the capture signal.
The gain is the first processing step in APM.

After this CL, these two features work:
* The PreAmplifier can be activated with
  AudioProcessing::Config::pre_amplifier
* The PreApmlifier can be controlled after APM creation by
  AudioProcessing::SetRuntimeSetting.

What's left is a change to AecDumps and to AecDump-replay.

NOTRY=True # 1-line change, tests just passed.

Bug: webrtc:9138
Change-Id: I85b3af511695b0a9cec2eed6fee7f05080305e1d
Reviewed-on: https://webrtc-review.googlesource.com/69811
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22881}
2018-04-16 14:36:49 +00:00
Alex Loiko
5feb30e85f Options and settings for the Pre-amplifier.
Add configuration fields for the pre-amplifier in the Audio Processing
Module. Also add flags and settings for the pre-amplifier in
audioproc_f.

Also make the setting stored in Aec Dumps. And make the setting
applied when playing back Aec Dumps in audioproc_f.

Bug: webrtc:9138
Change-Id: I4e59df200e1ebc56f06fae74ebf17d85858958a3
Reviewed-on: https://webrtc-review.googlesource.com/69560
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22876}
2018-04-16 12:25:48 +00:00
Alessio Bazzica
c054e78f4e Send runtime settings to the Audio Processing Module (APM)
This CL includes the following changes:
- APM runtime setting (ID + float payload) and unit tests
- Swap queue of APM runtime settings used in AudioProcessingImpl
- runtime settings handler that forwards the settings to APM
  sub-modules when a message is retrieved from the queue
- Unit test placeholder to check that the pre-gain update message
  is correctly delivered

Bug: webrtc:9138
Change-Id: Id22704af15fde2b87a4431f5ce64ad1aeafc5280
Reviewed-on: https://webrtc-review.googlesource.com/69320
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22873}
2018-04-16 11:11:27 +00:00
Fredrik Solenberg
bbf21a3fd6 Remove dependencies on modules:module_api from AudioProcessing.
- Directly include api/audio/audio_frame.h everywhere AudioFrame is used.
- This *will* remove transient dependencies on libjpeg and a bunch of other things from the e.g. APM.
- audio_frame.h still included from module_common_types.h for backwards compatibility with clients.

Bug: webrtc:9139, webrtc:7504
Change-Id: Id96f9268c01667fbcc29a01f5c1dd25a37836897
Reviewed-on: https://webrtc-review.googlesource.com/62464
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22845}
2018-04-12 22:05:27 +00:00
Karl Wiberg
6a4d411023 Move file_wrapper.h to rtc_base/system/
This moves it from an API directory (system_wrappers/include/) to a
non-API directory, which is exactly what we want for utilities like
this.

BUG=webrtc:8445

Change-Id: I440974da4d347b09ff042478720d7983056b62b9
Reviewed-on: https://webrtc-review.googlesource.com/21226
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22579}
2018-03-23 11:17:15 +00:00
Ivo Creusen
647ef09d1e Add more parameters to the Initialize function of the echo detector.
Since the echo detector processes both the render and the capture audio streams, it needs to know the sample rates and number of channels of both.

Bug: webrtc:8732
Change-Id: Icd26e561d5dd98bd789a6dfa75f468f3fde06fee
Reviewed-on: https://webrtc-review.googlesource.com/61861
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22436}
2018-03-15 09:21:56 +00:00
Sam Zackrisson
ab1aee0be4 Reland "Deprecate the adaptive level controller"
This is a reland of 6f37ed78d9

CQ dry run OK except for missing iOS swarming bots.
NOTRY=True

Original change's description:
> Deprecate the adaptive level controller
>
> Level control handled by default-on AGC.
>
> Bug: none
> Change-Id: I405daeceece12c896d41156b649fcfd556726f77
> Reviewed-on: https://webrtc-review.googlesource.com/59682
> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22305}

Bug: none
Change-Id: I0b9b8e2f3457d5efd4603efbfbbc6b84651df315
Reviewed-on: https://webrtc-review.googlesource.com/60720
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22352}
2018-03-09 09:42:13 +00:00
Sam Zackrisson
52f8188f5d Revert "Deprecate the adaptive level controller"
This reverts commit 6f37ed78d9.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Deprecate the adaptive level controller
> 
> Level control handled by default-on AGC.
> 
> Bug: none
> Change-Id: I405daeceece12c896d41156b649fcfd556726f77
> Reviewed-on: https://webrtc-review.googlesource.com/59682
> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22305}

TBR=solenberg@webrtc.org,saza@webrtc.org,aleloi@webrtc.org

Change-Id: Ic52f41fcbebfd2291a51b17ac788313e1ceef163
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/60240
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22308}
2018-03-06 11:54:22 +00:00
Sam Zackrisson
6f37ed78d9 Deprecate the adaptive level controller
Level control handled by default-on AGC.

Bug: none
Change-Id: I405daeceece12c896d41156b649fcfd556726f77
Reviewed-on: https://webrtc-review.googlesource.com/59682
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22305}
2018-03-06 10:20:01 +00:00
Sam Zackrisson
4d3644979c Add stub draft of audio generator to APM
This provides the empty shell of an AudioGenerator class.
It is intended to be used for debugging purposes and can be inserted
into the APM much like an AecDump. It allows for playing out diagnostic
audio unaffected by codecs and network jitter, while still capturing
API interaction like in a normal call.

NOTRY=True

Bug: webrtc:8882
Change-Id: I8132afc95cdba02ab233f44e22e0a5f530710ef7
Reviewed-on: https://webrtc-review.googlesource.com/53300
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22282}
2018-03-05 09:28:52 +00:00
Alex Loiko
e36e8bbf6d Add FixedGainController and move GainController2 in APM.
The FixedGainController (FGC) applies a fixed gain. It will also
control the limiter. The limiter will be landed over the next several
CLs.

The GainController2 is a 'private submodule' of APM. It will control
the new automatic gain controller (AGC). It controls the AGC through
Initialize() and ApplyConfig().

This CL contains

* build changes to make modules/audio_processing/agc2 an independent
  target

* a new MutableFloatAudioFrame which is the audio interface between
  AGC2 and APM

* move of the fixed gain application from GainController2 to
  FixedGainController.

If you are a googler, there is more information in this doc:
https://docs.google.com/document/d/1RV2Doet3MZtUPAHVva61Vjo20iyd1bmmm3aR8znWpzo/edit#

Bug: webrtc:7949
Change-Id: Ief95cbbce83c3aafe54638fd2ab881c9fb8bdc3a
Reviewed-on: https://webrtc-review.googlesource.com/50440
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22046}
2018-02-16 10:56:38 +00:00
Alex Loiko
6df09f6f6a Add decibel conversion functions to //common_audio:common_audio
The functions replace some existing code and will be used in the
the new AutomaticGainController.

Bug: webrtc:7949
Change-Id: I9a32132d4a4699a507b8548a2eac10972a2f3fd6
Reviewed-on: https://webrtc-review.googlesource.com/53141
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22045}
2018-02-16 10:46:48 +00:00
Jonas Olsson
645b027dc4 Streamline error handling and logging in the audio processing module
Bug: webrtc:8529
Change-Id: I40817d578c2c4106892e564df1bc734efcef5503
Reviewed-on: https://webrtc-review.googlesource.com/52540
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22034}
2018-02-15 15:06:26 +00:00
Per Åhgren
1373582148 Add offline logging of the system delay for AEC3
Bug: webrtc:8671
Change-Id: I8c1801673d9da05c4c5d5385ad455de4d225fff3
Reviewed-on: https://webrtc-review.googlesource.com/52100
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22018}
2018-02-14 12:21:03 +00:00
Gustaf Ullberg
8e9252a14f AEC3 can only be activated by injection.
Removed echo_canceller3.enabled from API configuration.

Bug: webrtc:8346
Change-Id: Ie88a518c7eb37653ad9b20b18bdec6476076ccb6
Reviewed-on: https://webrtc-review.googlesource.com/27080
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21829}
2018-01-31 14:11:19 +00:00
Ivo Creusen
83bd29081c Remove the AudioProcessing::Create methods.
Due to the growing number of arguments, these functions are being replaced by the AudioProcessingBuilder class.

Bug: webrtc:8668
Change-Id: Ic3936fbd47d92eac22a857a678dca5fd8c029d8b
Reviewed-on: https://webrtc-review.googlesource.com/46241
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21826}
2018-01-31 13:09:39 +00:00
Ivo Creusen
09fa4b04dd Make the echo detector injectable.
This adds a generic interface for an echo detector, and makes it possible to inject one into the audio processing module.

Bug: webrtc:8732
Change-Id: I30d97aeb829307b2ae9c4dbeb9a3e15ab7ec0912
Reviewed-on: https://webrtc-review.googlesource.com/38900
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21588}
2018-01-11 15:43:01 +00:00
Ivo Creusen
5ec7e12760 Added a builder class for the AudioProcessingModule.
As the number of injectable components of the APM increases, it is become increasingly unwieldy to keep expanding the Create function with more parameters. This builder class should make it easier to inject more components in the future.

Bug: webrtc:8668
Change-Id: If91547527760486c2a4daa9696bee22ec1d7675e
Reviewed-on: https://webrtc-review.googlesource.com/34651
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21425}
2017-12-22 12:19:03 +00:00
Alex Loiko
5825aa673c Render-side pre-processing in APM.
This CL adds a way to insert a custom render-side pre-processor to
APM. The pre-processor operates in full-band mode before anything
else. Currently the render processing chain is (if everything is
enabled):

Network --> [Pre processing] --> [Band split] -->
[IntelligibilityEnhancer] --> [Echo canceller (read-only)] -->
[Band merge] --> Playout

Since the render pre processor and capture post processor have the
same interface, I renamed webrtc::PostProcessing into
webrtc::CustomProcessing.

The old APM factory method PostProcessing will be deprecated and
dependencies updated as part of webrtc:8665

NOTRY=True

Bug: webrtc:8665
Change-Id: Ia381cbf12e336d6587406a14d77243d931f69a31
Reviewed-on: https://webrtc-review.googlesource.com/29201
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21327}
2017-12-18 16:11:03 +00:00
Per Åhgren
83c4a02b76 Added metric for the delay in AEC3.
Bug: webrtc:8569
Change-Id: I659049a411654bd3a252ab29008fac467f903efd
Reviewed-on: https://webrtc-review.googlesource.com/25600
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20892}
2017-11-27 12:52:42 +00:00
Ivo Creusen
56d460902e Use the new AudioProcessing statistics everywhere.
The new interface uses optionals instead of default values, and only values that are actually used are included. To make it easy to add/remove stats in the future, the struct itself is copied around on all layers, instead of copying the values one by one. This CL also fixes a bug which caused several APM statistics to get stuck at a fixed level when there are no more receive streams (after some period where there were receive streams). Since APM doesn't know this happens, an argument was added to the GetStats call to pass this information down to APM.

Bug: webrtc:8563, b/67926135
Change-Id: I96cc008353355bb520c4523f5c5379860f73ee24
Reviewed-on: https://webrtc-review.googlesource.com/25621
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20877}
2017-11-24 18:17:39 +00:00
Gustaf Ullberg
09b9faed53 APM reports AEC3 ERL and ERLE metrics also via the old GetStatistics function.
The audio processing module reports the metrics 'echo return loss'
and 'echo return loss enhancement' for AEC3 via the old, soon to be
replaced, GetStatistics fuction.

Bug: webrtc:8533
Change-Id: I6b2286b5cdf8f20ebf14f82f1180f6bfb6c00c68
Reviewed-on: https://webrtc-review.googlesource.com/25642
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20869}
2017-11-24 14:13:59 +00:00
Gustaf Ullberg
332150d7df APM reports ERL and ERLE metrics for AEC3.
The audio processing module reports the metrics 'echo return loss'
and 'echo return loss enhancement' for AEC3.

Bug: webrtc:8533
Change-Id: I166c504adf013d6cb5d6d3c9717d0622c3454bb7
Reviewed-on: https://webrtc-review.googlesource.com/24880
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20835}
2017-11-22 15:01:47 +00:00
Ivo Creusen
ae02609645 Add parallel stats interface with optional stats to APM.
This new parallel GetStatistics function uses Optionals to indicate if stats are valid or not, and no longer relies on default values. It also takes an argument to indicate if receive streams are present, and if not several stats will not be set.

Bug: b/67926135
Change-Id: I175de1c65c414bea6ec9ca8b0b16f07cb2308d9f
Reviewed-on: https://webrtc-review.googlesource.com/17942
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20789}
2017-11-20 13:13:20 +00:00
Mirko Bonadei
675513b96a Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:

for m in PLOG \
  LOG_TAG \
  LOG_GLEM \
  LOG_GLE_EX \
  LOG_GLE \
  LAST_SYSTEM_ERROR \
  LOG_ERRNO_EX \
  LOG_ERRNO \
  LOG_ERR_EX \
  LOG_ERR \
  LOG_V \
  LOG_F \
  LOG_T_F \
  LOG_E \
  LOG_T \
  LOG_CHECK_LEVEL_V \
  LOG_CHECK_LEVEL \
  LOG
do
  git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format

Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
2017-11-09 11:56:32 +00:00
Gustaf Ullberg
bd83b914c3 Separate AEC3 config from AudioProcessing::Config.
The struct containing the config for AEC3 is removed from
AudioProcessing::Config and is put in a new struct called
EchoCanceller3Config.

AEC3 should no longer be activated through
AudioProcessing::ApplyConfig. Instead an EchoCanceller3Factory
can be injected at AudioProcessing creation.

Bug: webrtc:8346
Change-Id: I27e3592e675eec3632a60c45d9e0d12514c2c567
Reviewed-on: https://webrtc-review.googlesource.com/11420
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20342}
2017-10-19 08:19:52 +00:00
Gustaf Ullberg
ce045acd94 Enable Echo Control at injection.
Echo Control is enabled in capture_nonlocked_ when injected.
Renamed echo_canceller3_enabled to echo_controller_enabled.

Bug: webrtc:8346
Change-Id: Icf441f07ce64719358841544da7579feeb7cfdbb
Reviewed-on: https://webrtc-review.googlesource.com/10808
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20311}
2017-10-16 13:28:37 +00:00
Gustaf Ullberg
8eb9c7d838 Added EchoCanceller3Factory.
Added EchoCanceller3Factory that implements EchoControlFactory and can
be used for injecting EchoCanceller3 into Audio Processing Module.

Renamed InitializeEchoCanceller3 to InitializeEchoController.

Bug: webrtc:8346
Change-Id: I47078da6a49aca1ee41f6a9d5b7b8e91bb5c11a3
Reviewed-on: https://webrtc-review.googlesource.com/9220
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20299}
2017-10-14 07:38:32 +00:00
Gustaf Ullberg
052c78d93f Removed unused AudioProcessing::Create.
Bug: webrtc:8346
Change-Id: I3f0e0727c0377c138202b25100766b3c34e6536a
Reviewed-on: https://webrtc-review.googlesource.com/9381
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20288}
2017-10-13 14:18:27 +00:00
Alessio Bazzica
270f7b5353 AGC2 dummy module: fixed gain param, APM integration, audioproc_f adaptation
In preparation of coming CLs that will add an AGC interface to make the
gain controller injectable.

This CL simplifies AGC2 (dummy sub-module of audioproc_f) since it only
implements the fixed digital mode with hard-clipping - i.e., no limiter
is used.
The AGC2 config now includes the fixed gain to apply and audioproc_f
has been adapted accordingly.
Finally, this CL slightly simplifies the AGC2 integration into APM.

This CL is a continuation of https://codereview.webrtc.org/2995043002/

Bug: webrtc:7494
Change-Id: I3d554ea4dc6208928352059feb14987edabf14c7
Reviewed-on: https://webrtc-review.googlesource.com/4661
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20278}
2017-10-13 11:05:37 +00:00
Gustaf Ullberg
002ef28272 Added EchoControlFactory interface.
The factory for EchoControl is changed from an rtc::Callback1 to an
interface. This avoids using rtc::Callback1 outside of WebRTC.
This also makes the EchoControl factory more similar to other
factories in the code base.

Bug: webrtc:8345
Change-Id: Ie61b9416ed771f8c756326736d17e339eb768469
Reviewed-on: https://webrtc-review.googlesource.com/8900
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20272}
2017-10-13 09:03:07 +00:00
Gustaf Ullberg
d8579e0133 EchoControl factory injectable in AudioProcessing.
This CL enables a factory method creating acoustic echo cancellers
that inherit EchoControl to be injected into the audio processing
module. AudioProcessing will call the factory method to create an
instance of the EchoControl subclass when needed. In the event of
sample rate changes, AudioProcessing will recreate the object using
the factory method.

Bug: webrtc:8346
Change-Id: I0c508b4d4cdb35569864cefaa0e3aea2555cc9b9
Reviewed-on: https://webrtc-review.googlesource.com/7742
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20251}
2017-10-11 14:52:06 +00:00
Gustaf Ullberg
59ff0e216b Renamed echo_canceller3 to echo_controller in APM.
Simple rename to reflect that any AEC implementing the EchoControl
interface could be used instead of EchoCanceller3.

Bug: webrtc:8346
Change-Id: Id9abdc15bf3e0b30197077b8c11e20891a7463b3
Reviewed-on: https://webrtc-review.googlesource.com/7611
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20203}
2017-10-09 10:38:02 +00:00
Niels Möller
84255bbe3b Add explicit includes of refcountedobject.h where it is used.
This is in preparation for deleting the include in rtc_base/refcount.h,
but that change has to wait for some downstream applications to 
not rely in the indirect include.

Partial reland of "Make rtc_base/refcount.h self contained, not including refcountedobject.h."

This is a reland of b7239a9dc8
Original change's description:
> Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> 
> The refcount.h file doesn't depend on anything from
> refcountedobject.h. The motivation of this change to make it possible
> to add additional declarations to refcount.h, and include it from
> refcountedobject.h.
> 
> Bug: webrtc:8270
> Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> Reviewed-on: https://webrtc-review.googlesource.com/5760
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20106}

Bug: webrtc:8270
Change-Id: I63a42712f6c1ec83823c629d1a954fd1a04d4a6c
Reviewed-on: https://webrtc-review.googlesource.com/7281
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20185}
2017-10-06 13:00:14 +00:00
Niels Moller
fb26f85b79 Revert "Reland "Make rtc_base/refcount.h self contained, not including refcountedobject.h.""
This reverts commit bf6937a8e9.

Reason for revert: Broke internal projects.

Original change's description:
> Reland "Make rtc_base/refcount.h self contained, not including refcountedobject.h."
> 
> This is a reland of b7239a9dc8
> Original change's description:
> > Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> > 
> > The refcount.h file doesn't depend on anything from
> > refcountedobject.h. The motivation of this change to make it possible
> > to add additional declarations to refcount.h, and include it from
> > refcountedobject.h.
> > 
> > Bug: webrtc:8270
> > Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> > Reviewed-on: https://webrtc-review.googlesource.com/5760
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Commit-Queue: Niels Moller <nisse@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#20106}
> 
> Bug: webrtc:8270
> Change-Id: I9738f6680ab52d0f43639a1a39175fdba5957681
> Reviewed-on: https://webrtc-review.googlesource.com/5840
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20180}

TBR=kwiberg@webrtc.org,nisse@webrtc.org

Change-Id: I342b241f5bb707b59ccf2d15a1a5befecb53a52e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8270
Reviewed-on: https://webrtc-review.googlesource.com/7280
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20181}
2017-10-06 11:05:55 +00:00
Niels Möller
bf6937a8e9 Reland "Make rtc_base/refcount.h self contained, not including refcountedobject.h."
This is a reland of b7239a9dc8
Original change's description:
> Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> 
> The refcount.h file doesn't depend on anything from
> refcountedobject.h. The motivation of this change to make it possible
> to add additional declarations to refcount.h, and include it from
> refcountedobject.h.
> 
> Bug: webrtc:8270
> Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> Reviewed-on: https://webrtc-review.googlesource.com/5760
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20106}

Bug: webrtc:8270
Change-Id: I9738f6680ab52d0f43639a1a39175fdba5957681
Reviewed-on: https://webrtc-review.googlesource.com/5840
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20180}
2017-10-06 10:20:48 +00:00
Gustaf Ullberg
c522298e03 Added first version of the EchoControl interface, used for AEC abstraction.
Bug: webrtc:8346
Change-Id: I792a5f8eefb98388de199fea12c017759fdc6c1e
Reviewed-on: https://webrtc-review.googlesource.com/6780
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20174}
2017-10-06 07:24:43 +00:00
Niels Moller
d25fa78daf Revert "Make rtc_base/refcount.h self contained, not including refcountedobject.h."
This reverts commit b7239a9dc8.

Reason for revert: Broke chromium mac build, compilation failures on content/renderer/media/webrtc/webrtc_video_frame_adapter.h.

Original change's description:
> Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> 
> The refcount.h file doesn't depend on anything from
> refcountedobject.h. The motivation of this change to make it possible
> to add additional declarations to refcount.h, and include it from
> refcountedobject.h.
> 
> Bug: webrtc:8270
> Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> Reviewed-on: https://webrtc-review.googlesource.com/5760
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20106}

TBR=kwiberg@webrtc.org,nisse@webrtc.org

Change-Id: I7334597cc8979ba9cfaff526967084349ef27f3c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8270
Reviewed-on: https://webrtc-review.googlesource.com/5800
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20107}
2017-10-03 09:49:04 +00:00
Niels Möller
b7239a9dc8 Make rtc_base/refcount.h self contained, not including refcountedobject.h.
The refcount.h file doesn't depend on anything from
refcountedobject.h. The motivation of this change to make it possible
to add additional declarations to refcount.h, and include it from
refcountedobject.h.

Bug: webrtc:8270
Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
Reviewed-on: https://webrtc-review.googlesource.com/5760
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20106}
2017-10-03 09:37:30 +00:00
Sam Zackrisson
0beac583bb Add PostProcessing interface to audio processing module.
This CL adds an interface for a generic PostProcessing module that
is optionally added to the APM at construction time.

(Parenthetically this CL also adds a missing lock check to
InitializeGainController2.)

Bug: webrtc:8201
Change-Id: I7de64cf8d5335ecec450da8a961660906141d42a
Reviewed-on: https://webrtc-review.googlesource.com/1570
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19973}
2017-09-26 14:07:15 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/audio_processing/audio_processing_impl.cc (Browse further)