Commit graph

122 commits

Author SHA1 Message Date
Gustaf Ullberg
8c51f2e9cd AnalyzeReverseStream with StreamConfig
Adding a version of AnalyzeReverseStream with audio parameters
described by StreamConfig. This is part of preparations for
multichannel APM in Chromium.

Bug: webrtc:10913
Change-Id: I7c4650eab8bd7fcdec970a7e4a8fa203f09bed9e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157897
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29573}
2019-10-22 14:27:14 +00:00
saza
0bad15f2ed Remove the noise_suppression() pointer to submodule interface
Bug: webrtc:9878
Change-Id: I356afddb56cc1957e9d0415e2723f66e0e4ac522
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137517
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29499}
2019-10-16 11:55:15 +00:00
Sam Zackrisson
41478c7c1b Remove AudioProcessing::gain_control() getter
This change also resolves a bug in audioproc_f:
The implicit ApplyConfig calls to enable gain control settings in
aec_dump_simulator.cc:377-406 [1] are overwritten by the ApplyConfig
call on line 500 using a config from line 292.

Compared to a ToT build including a fix for that bug, these changes
are bitexact on a large number of aecdumps.

[1] https://cs.chromium.org/chromium/src/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc?l=377&rcl=8bbf9e2c6e40feb8efcbf276b43945a14d651e9b

Bug: webrtc:9878
Change-Id: Id427d34e838c999d996d58193977ac2a9198edd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156463
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29481}
2019-10-15 09:23:16 +00:00
Mirko Bonadei
35214fcfe2 Add missing RTC_EXPORT for the component build.
Bug: webrtc:9419
Change-Id: I3225259fb4cc55e9820f590928795f4587f1e3cb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153884
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29479}
2019-10-15 09:07:44 +00:00
saza
6787f232ae Remove AudioProcessing::level_estimator() getter
The new configuration path is via AudioProcessing::ApplyConfig and
AudioProcessing::GetStatistics.

Bug: webrtc:9878
Change-Id: Ic912d67455fcef4895566edb8fef62baf62d7cfe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156440
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29454}
2019-10-11 18:08:17 +00:00
Sam Zackrisson
0824c6f61a Delete voice_detection() pointer to submodule
The new configuration path is via AudioProcessing::ApplyConfig and
AudioProcessing::GetStatistics.

ApmTest.Process passes with unchanged reference files if
audio_processing_impl would initialize the VAD with
VoiceDetection::kLowLikelihood instead of kVeryLowLikelihood.
This was verified by testing this CL with that modification.

Bug: webrtc:9878
Change-Id: I4d08df37a07e5c72feeec02a07d6b9435f917d72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155445
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29395}
2019-10-07 13:06:05 +00:00
Sam Zackrisson
feee1e4c36 Add flag to APM to force multichannel even with AEC3
Currently, APM fakes multichannel in two ways:
 - With injected AECs, capture processing is only performed on the left
channel. The result is copied into the other channels.
 - With multichannel render audio, all channels are mixed into one
before analysing.

This CL adds a flag to disable these behaviors, ensuring proper
multichannel processing happens throughout the APM pipeline.

Adds killswitches to separately disable render / capture multichannel.

Additionally - AEC3 currently crashes when running with multichannel.
This CL adds the missing pieces to at least have it run without
triggering any DCHECKS, including making the high pass filter properly
handle multichannel.

Bug: webrtc:10913, webrtc:10907
Change-Id: I38795bf8f312b959fcc816a056fba2c68d4e424d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152483
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29248}
2019-09-20 06:36:12 +00:00
Per Åhgren
fcbe4071ce Adding more refined control over choice of band-splitting
This CL allows the user to have more refined control over what band
splitting-scheme is used inside the audio processing module.


Bug: webrtc:6181
Change-Id: I236c3b1f96ab80cc4ffb8c39c045c034764567a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152480
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29189}
2019-09-14 23:14:17 +00:00
Per Åhgren
c8626b6072 Reland "Reland Process 8 kHz audio as 16 kHz internally of the audio processing module"
This is a reland of b7b8e30cb4

Original change's description:
> Reland Process 8 kHz audio as 16 kHz internally of the audio processing module
> 
> This CL relands the code from the CL "Process 8 kHz audio as 16 kHz internally
> of the audio processing module" which by mistake was reverted via a rebase in
> another CL.
> 
> The CL changes the behavior of APM for 8 kHz so that it is internally
> processed as 16 kHz.
> 
> Bug: webrtc:10863
> Change-Id: I32a57b2d279c2134125667c19b09cfda381a33c3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150221
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28944}

Bug: webrtc:10863
Change-Id: Ic626b99b099248f0d8a677dc4cfe1505e14ae7cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150330
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28949}
2019-08-23 14:24:48 +00:00
Artem Titarenko
7c4b0c56bf Revert "Reland Process 8 kHz audio as 16 kHz internally of the audio processing module"
This reverts commit b7b8e30cb4.

Reason for revert: Broke ApmTest.Process test in internal iOS waterfall

Original change's description:
> Reland Process 8 kHz audio as 16 kHz internally of the audio processing module
> 
> This CL relands the code from the CL "Process 8 kHz audio as 16 kHz internally
> of the audio processing module" which by mistake was reverted via a rebase in
> another CL.
> 
> The CL changes the behavior of APM for 8 kHz so that it is internally
> processed as 16 kHz.
> 
> Bug: webrtc:10863
> Change-Id: I32a57b2d279c2134125667c19b09cfda381a33c3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150221
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28944}

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

Change-Id: Ia49e07b0c25c49da646917516e317f1d57cc4e84
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10863
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150326
Reviewed-by: Artem Titarenko <artit@webrtc.org>
Commit-Queue: Artem Titarenko <artit@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28948}
2019-08-23 13:11:13 +00:00
Per Åhgren
b7b8e30cb4 Reland Process 8 kHz audio as 16 kHz internally of the audio processing module
This CL relands the code from the CL "Process 8 kHz audio as 16 kHz internally
of the audio processing module" which by mistake was reverted via a rebase in
another CL.

The CL changes the behavior of APM for 8 kHz so that it is internally
processed as 16 kHz.

Bug: webrtc:10863
Change-Id: I32a57b2d279c2134125667c19b09cfda381a33c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150221
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28944}
2019-08-23 09:19:28 +00:00
Per Åhgren
d47941e018 Reland "Simplification and refactoring of the AudioBuffer code"
This is a reland of 81c0cf287c

Original change's description:
> Simplification and refactoring of the AudioBuffer code
> 
> This CL performs a major refactoring and simplification
> of the AudioBuffer code that.
> -Removes 7 of the 9 internal buffers of the AudioBuffer.
> -Avoids the implicit copying required to keep the
>  internal buffers in sync.
> -Removes all code relating to handling of fixed-point
>  sample data in the AudioBuffer.
> -Changes the naming of the class methods to reflect
>  that only floating point is handled.
> -Corrects some bugs in the code.
> -Extends the handling of internal downmixing to be
>  more generic.
> 
> Bug: webrtc:10882
> Change-Id: I12c8af156fbe366b154744a0a1b3d926bf7be572
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149828
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28928}

Bug: webrtc:10882
Change-Id: I2ddf327e80a03468c41662ae63c619ff34f2363a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150101
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28938}
2019-08-22 10:34:05 +00:00
Per Åhgren
1c602e39ce Process 8 kHz audio as 16 kHz internally of the audio processing module
This CL changes the behavior of APM for 8 kHz so that it is internally
processed as 16 kHz.


Bug: webrtc:10863
Change-Id: Ie17de6551c6e984b60534820374a49ca298f06ce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148800
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28929}
2019-08-21 14:21:53 +00:00
Artem Titov
59bbd65561 Add ToString method for AudioProcessing::Config
Bug: webrtc:10138
Change-Id: Icc0b40596867fd6fb8c1de5ca209dbafb504e50d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147726
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28745}
2019-08-02 10:01:56 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Niels Möller
825aad13dc Delete almost all includes of platform_file.h
Only remaining user is WavReader. Demote its constructor
accepting a PlatformFile to private, to refactor implementation
in a later cl.

Bug: webrtc:6463
Change-Id: I7b950be6f02073cb135dd0fab1190b9dc0de1fba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144025
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28410}
2019-06-28 07:30:15 +00:00
Fredrik Hernqvist
ca362855e1 Add PlayoutVolumeChange RuntimeSetting.
Add a PlayoutVolumeChange RuntimeSetting. Trigger an echo path change when the playout volume is changed.

Bug: webrtc:10608
Change-Id: I1e736b93c1865d08c7d2582f6fe00216c1e1f72e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135746
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Fredrik Hernqvist <fhernqvist@webrtc.org>
Commit-Queue: Fredrik Hernqvist <fhernqvist@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27913}
2019-05-10 14:12:23 +00:00
Per Åhgren
ea4c5df366 Remove the reporting of histogram data for AEC2
This CL removes the legacy reporting of histogram data for AEC2.

Bug: webrtc:5298
Change-Id: I838e729e0fb78d28e16de0fa79ddf5c857682d65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135101
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27834}
2019-05-03 08:58:42 +00:00
Per Åhgren
6ee75fdfcb Allow setting the AGC2 fixed gain during runtime
This CL extends the supported runtime settings in
APM to also comprise the AGC2 fixed gain.
The CL was originally created by Adam Whiteside.

Bug: webrtc:10574
Change-Id: I79b3d6501f1e202b66a9b6018f8a493a56b01f62
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134101
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27782}
2019-04-26 10:05:45 +00:00
Sam Zackrisson
f0d1c03c31 Add replacement interface for webrtc::GainConrol
The pointer-to-submodule interfaces are being removed.
This CL:
1) introduces AudioProcessing::Config::GainController1 with most config,
2) adds functions to APM for setting and getting analog gain,
3) creates a temporary GainControlConfigProxy to support the transition
   to the new config.
4) Moves the lock references in GainControlForExperimentalAgc and
   GainControlImpl into the GainControlConfigProxy, as it becomes the
   sole AGC object with functionality exposed to the client.

Bug: webrtc:9947, webrtc:9878
Change-Id: Ic31e15e9bb26d6497a92b77874e0b6cab21ff2b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126485
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27316}
2019-03-27 15:19:41 +00:00
Per Åhgren
03257b049e Add flag for explicitly specifying that the legacy AEC2 should be used
This CL adds a temporary flag for specifying that the legacy AEC2 should
be used.

Bug: webrtc:10366
Change-Id: Ie3edaa1560cdc1282b62242beb67aa6fee7f2841
Reviewed-on: https://webrtc-review.googlesource.com/c/124980
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26891}
2019-02-28 10:56:27 +00:00
Mirko Bonadei
d970807e0c Remove rtc_base/scoped_ref_ptr.h.
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.

More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.

Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
2019-01-25 20:29:58 +00:00
Sam Zackrisson
235131303b Add noise suppression settings to AudioProcessing::Config
This Config configuration will eventually replace the AudioProcessing::noise_suppression() interface.

This also introduces a proxy NoiseSuppression, returned by AudioProcessing::noise_suppression.
Without this proxy, ApplyConfig could overwrite NS settings for clients who currently use noise_suppression(). For example, the following code will not preserve the noise suppression level:

apm->noise_suppression()->set_level(NoiseSuppression::kHigh);
auto cfg = apm->GetConfig();
apm->ApplyConfig(cfg);

The NoiseSuppression instance returned by noise_suppression() has no way to update the config inside APM, so GetConfig() will return an out-of-date config which is then re-applied. This CL adds a proxy that makes this update, by forwarding Enable() and set_level() calls to ApplyConfig().

Drive-by change: AudioProcessing::Config substructs are reordered to mirror the capture processing pipeline.

Tested: Ran ToT and this CL builds of audioproc_f and verified identical settings/aecdumps.
Bug: webrtc:9947
Change-Id: I823eade894be115c254d656562564108b2b63b1f
Reviewed-on: https://webrtc-review.googlesource.com/c/116521
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26248}
2019-01-14 16:17:19 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
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
Alessio Bazzica
8da7b350cf AGC2 adaptive digital false by default
Avoid that the client code relies on the adaptive digital mode being
enabled by default (error prone).

Bug: webrtc:7494
Change-Id: I765fecf535cf31a2163e10595a42520473c233b6
Reviewed-on: https://webrtc-review.googlesource.com/c/111586
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25728}
2018-11-21 14:20:15 +00:00
Alessio Bazzica
dd886082c5 AGC2 flags: remove deprecated fields.
Downstream projects adapted, clean up.

Bug: webrtc:7494
Change-Id: I019b8dd79c6bc55c900fb5595d5e2ee8aa0a2400
Reviewed-on: https://webrtc-review.googlesource.com/c/110865
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25656}
2018-11-15 13:47:24 +00:00
Alessio Bazzica
1e2542f593 AGC2: adding level estimation option (RMS or peak-based).
This CL makes possible to choose the level estimation for the adaptive
digital GC of AGC2. The options are RMS (default and currently used
estimator) and peak-based (already computed, but not used).

Besides adding the new AGC2 config param for the level estimator, this CL
also refactors the config class by making it more structured.

Bug: webrtc:7494
Change-Id: I20eb558ca50f13536aa7bdea08d21de3b630f8bc
Reviewed-on: https://webrtc-review.googlesource.com/c/110144
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25620}
2018-11-13 14:32:13 +00:00
Sam Zackrisson
63ada787b5 Remove outdated TODO
Bug: webrtc:9535
Change-Id: I8f7a719eb9f32a91f45620453568e5f7d2264de8
Reviewed-on: https://webrtc-review.googlesource.com/c/109461
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25511}
2018-11-06 08:39:16 +00:00
Alex Loiko
5e784616e0 Make the extra seturation margin configurable.
The extra saturation margin is a setting for the SaturationProtector
in GainController2. The higher it is, the less gain GC2 will apply. In
this CL we pipe the setting up to audio_processing.h. Now the setting
can be set at a high level.

Also in this CL add a few (missing, they should have been there
already) tests for the GC2 and GC2 with saturation margin.

Bug: webrtc:7494
Change-Id: I1b61f1662e6c6a8817fd5b0e845339694bf8d50d
Reviewed-on: https://webrtc-review.googlesource.com/c/109001
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25470}
2018-11-01 15:12:11 +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
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
Mirko Bonadei
3d255309e9 Reland "Export symbols needed by the Chromium component build (part 1)."
This reverts commit 16fe3f290a.

Reason for revert:
After discussing this problem with nisse@ and yvesg@, we decided to modify
how RTC_EXPORT works and avoid to depend on the macro COMPONENT_BUILD.
RTC_EXPORT will instead depend on a macro WEBRTC_COMPONENT_BUILD (which
can be set as a GN argument which defaults to false).
When all the symbols needed by Chromium will be marked with RTC_EXPORT we
will flip the GN arg in Chromium, setting to to `component_build` and from
that moment, Chromium will depend on a WebRTC shared library when
`component_build=true`.

Original change's description:
> Revert "Export symbols needed by the Chromium component build (part 1)."
>
> This reverts commit 99eea42fc1.
>
> Reason for revert:
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::UnwrapTurnPacket(unsigned char const *, unsigned int, unsigned int *, unsigned int *)" (__imp_?UnwrapTurnPacket@cricket@@YA_NPBEIPAI1@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ValidateRtpHeader(unsigned char const *, unsigned int, unsigned int *)" (__imp_?ValidateRtpHeader@cricket@@YA_NPBEIPAI@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketStunTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketStunTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_udp.obj:("bool __thiscall network::P2PSocketUdp::DoSend(struct network::P2PSocketUdp::PendingPacket const &)" (?DoSend@P2PSocketUdp@network@@AAE_NABUPendingPacket@12@@Z))
>
> Original change's description:
> > Reland "Reland "Export symbols needed by the Chromium component build (part 1).""
> >
> > This reverts commit b49520bfc0.
> >
> > Reason for revert: Problem fixed in https://chromium-review.googlesource.com/c/chromium/src/+/1261398.
> >
> > Original change's description:
> > > Revert "Reland "Export symbols needed by the Chromium component build (part 1).""
> > >
> > > This reverts commit 588f4642d1.
> > >
> > > Reason for revert: Breaks WebRTC Chromium FYI Win Builder (dbg).
> > > lld-link: error: undefined symbol: "__declspec(dllimport) __thiscall webrtc::Config::Config(void)" (__imp_??0Config@webrtc@@QAE@XZ)
> > > [...]
> > >
> > > Original change's description:
> > > > Reland "Export symbols needed by the Chromium component build (part 1)."
> > > >
> > > > This reverts commit 2ea9af2275.
> > > >
> > > > Reason for revert: The problem will be fixed by
> > > > https://chromium-review.googlesource.com/c/chromium/src/+/1261122.
> > > >
> > > > Original change's description:
> > > > > Revert "Export symbols needed by the Chromium component build (part 1)."
> > > > >
> > > > > This reverts commit 9e24dcff16.
> > > > >
> > > > > Reason for revert: Breaks chromium.webrtc.fyi bots.
> > > > >
> > > > > Original change's description:
> > > > > > Export symbols needed by the Chromium component build (part 1).
> > > > > >
> > > > > > This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
> > > > > > to mark WebRTC symbols as visible from a shared library, this doesn't
> > > > > > mean these symbols are part of the public API (please continue to refer
> > > > > > to [1] for info about what is considered public WebRTC API).
> > > > > >
> > > > > > [1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
> > > > > >
> > > > > > Bug: webrtc:9419
> > > > > > Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
> > > > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103505
> > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > > > > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > > > > > Cr-Commit-Position: refs/heads/master@{#24969}
> > > > >
> > > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > > >
> > > > > Change-Id: I01f6e18f0d2c0f0309cdaa6c943c3927e1f1f49f
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: webrtc:9419
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103720
> > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#24974}
> > > >
> > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > >
> > > > Change-Id: I83bbc7f550fc23e823c4d055e0a6f60c828960dd
> > > > No-Presubmit: true
> > > > No-Tree-Checks: true
> > > > No-Try: true
> > > > Bug: webrtc:9419
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103740
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#24980}
> > >
> > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > >
> > > Change-Id: I4b7cfe492f2c8eeda5c8ac52520e0cfc95ade9b0
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:9419
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/103801
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#24983}
> >
> > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:9419
> > Change-Id: Id986a0a03cdc2818690337784396882af067f7fa
> > Reviewed-on: https://webrtc-review.googlesource.com/c/104602
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#25049}
>
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
>
> Change-Id: I6f58b9c90defccdb160307783fb55271ab424fa1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9419
> Reviewed-on: https://webrtc-review.googlesource.com/c/104623
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25050}

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

Change-Id: I4d01ed96ae40a8f9ca42c466be5c87653d75d7c1
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/104641
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25108}
2018-10-11 09:50:21 +00:00
Mirko Bonadei
16fe3f290a Revert "Export symbols needed by the Chromium component build (part 1)."
This reverts commit 99eea42fc1.

Reason for revert:
lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::UnwrapTurnPacket(unsigned char const *, unsigned int, unsigned int *, unsigned int *)" (__imp_?UnwrapTurnPacket@cricket@@YA_NPBEIPAI1@Z)
>>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ValidateRtpHeader(unsigned char const *, unsigned int, unsigned int *)" (__imp_?ValidateRtpHeader@cricket@@YA_NPBEIPAI@Z)
>>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
>>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
>>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketStunTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketStunTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
>>> referenced by obj/services/network/network_service/socket_udp.obj:("bool __thiscall network::P2PSocketUdp::DoSend(struct network::P2PSocketUdp::PendingPacket const &)" (?DoSend@P2PSocketUdp@network@@AAE_NABUPendingPacket@12@@Z))

Original change's description:
> Reland "Reland "Export symbols needed by the Chromium component build (part 1).""
> 
> This reverts commit b49520bfc0.
> 
> Reason for revert: Problem fixed in https://chromium-review.googlesource.com/c/chromium/src/+/1261398.
> 
> Original change's description:
> > Revert "Reland "Export symbols needed by the Chromium component build (part 1).""
> > 
> > This reverts commit 588f4642d1.
> > 
> > Reason for revert: Breaks WebRTC Chromium FYI Win Builder (dbg).
> > lld-link: error: undefined symbol: "__declspec(dllimport) __thiscall webrtc::Config::Config(void)" (__imp_??0Config@webrtc@@QAE@XZ)
> > [...]
> > 
> > Original change's description:
> > > Reland "Export symbols needed by the Chromium component build (part 1)."
> > > 
> > > This reverts commit 2ea9af2275.
> > > 
> > > Reason for revert: The problem will be fixed by
> > > https://chromium-review.googlesource.com/c/chromium/src/+/1261122.
> > > 
> > > Original change's description:
> > > > Revert "Export symbols needed by the Chromium component build (part 1)."
> > > > 
> > > > This reverts commit 9e24dcff16.
> > > > 
> > > > Reason for revert: Breaks chromium.webrtc.fyi bots.
> > > > 
> > > > Original change's description:
> > > > > Export symbols needed by the Chromium component build (part 1).
> > > > > 
> > > > > This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
> > > > > to mark WebRTC symbols as visible from a shared library, this doesn't
> > > > > mean these symbols are part of the public API (please continue to refer
> > > > > to [1] for info about what is considered public WebRTC API).
> > > > > 
> > > > > [1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
> > > > > 
> > > > > Bug: webrtc:9419
> > > > > Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103505
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > > > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#24969}
> > > > 
> > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > > 
> > > > Change-Id: I01f6e18f0d2c0f0309cdaa6c943c3927e1f1f49f
> > > > No-Presubmit: true
> > > > No-Tree-Checks: true
> > > > No-Try: true
> > > > Bug: webrtc:9419
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103720
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#24974}
> > > 
> > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > 
> > > Change-Id: I83bbc7f550fc23e823c4d055e0a6f60c828960dd
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:9419
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/103740
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#24980}
> > 
> > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > 
> > Change-Id: I4b7cfe492f2c8eeda5c8ac52520e0cfc95ade9b0
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:9419
> > Reviewed-on: https://webrtc-review.googlesource.com/c/103801
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#24983}
> 
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: webrtc:9419
> Change-Id: Id986a0a03cdc2818690337784396882af067f7fa
> Reviewed-on: https://webrtc-review.googlesource.com/c/104602
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25049}

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

Change-Id: I6f58b9c90defccdb160307783fb55271ab424fa1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/104623
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25050}
2018-10-08 13:09:27 +00:00
Mirko Bonadei
99eea42fc1 Reland "Reland "Export symbols needed by the Chromium component build (part 1).""
This reverts commit b49520bfc0.

Reason for revert: Problem fixed in https://chromium-review.googlesource.com/c/chromium/src/+/1261398.

Original change's description:
> Revert "Reland "Export symbols needed by the Chromium component build (part 1).""
> 
> This reverts commit 588f4642d1.
> 
> Reason for revert: Breaks WebRTC Chromium FYI Win Builder (dbg).
> lld-link: error: undefined symbol: "__declspec(dllimport) __thiscall webrtc::Config::Config(void)" (__imp_??0Config@webrtc@@QAE@XZ)
> [...]
> 
> Original change's description:
> > Reland "Export symbols needed by the Chromium component build (part 1)."
> > 
> > This reverts commit 2ea9af2275.
> > 
> > Reason for revert: The problem will be fixed by
> > https://chromium-review.googlesource.com/c/chromium/src/+/1261122.
> > 
> > Original change's description:
> > > Revert "Export symbols needed by the Chromium component build (part 1)."
> > > 
> > > This reverts commit 9e24dcff16.
> > > 
> > > Reason for revert: Breaks chromium.webrtc.fyi bots.
> > > 
> > > Original change's description:
> > > > Export symbols needed by the Chromium component build (part 1).
> > > > 
> > > > This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
> > > > to mark WebRTC symbols as visible from a shared library, this doesn't
> > > > mean these symbols are part of the public API (please continue to refer
> > > > to [1] for info about what is considered public WebRTC API).
> > > > 
> > > > [1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
> > > > 
> > > > Bug: webrtc:9419
> > > > Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103505
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#24969}
> > > 
> > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > 
> > > Change-Id: I01f6e18f0d2c0f0309cdaa6c943c3927e1f1f49f
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:9419
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/103720
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#24974}
> > 
> > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > 
> > Change-Id: I83bbc7f550fc23e823c4d055e0a6f60c828960dd
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:9419
> > Reviewed-on: https://webrtc-review.googlesource.com/c/103740
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#24980}
> 
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> 
> Change-Id: I4b7cfe492f2c8eeda5c8ac52520e0cfc95ade9b0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9419
> Reviewed-on: https://webrtc-review.googlesource.com/c/103801
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24983}

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

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

Bug: webrtc:9419
Change-Id: Id986a0a03cdc2818690337784396882af067f7fa
Reviewed-on: https://webrtc-review.googlesource.com/c/104602
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25049}
2018-10-08 12:54:06 +00:00
Mirko Bonadei
b49520bfc0 Revert "Reland "Export symbols needed by the Chromium component build (part 1).""
This reverts commit 588f4642d1.

Reason for revert: Breaks WebRTC Chromium FYI Win Builder (dbg).
lld-link: error: undefined symbol: "__declspec(dllimport) __thiscall webrtc::Config::Config(void)" (__imp_??0Config@webrtc@@QAE@XZ)
[...]

Original change's description:
> Reland "Export symbols needed by the Chromium component build (part 1)."
> 
> This reverts commit 2ea9af2275.
> 
> Reason for revert: The problem will be fixed by
> https://chromium-review.googlesource.com/c/chromium/src/+/1261122.
> 
> Original change's description:
> > Revert "Export symbols needed by the Chromium component build (part 1)."
> > 
> > This reverts commit 9e24dcff16.
> > 
> > Reason for revert: Breaks chromium.webrtc.fyi bots.
> > 
> > Original change's description:
> > > Export symbols needed by the Chromium component build (part 1).
> > > 
> > > This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
> > > to mark WebRTC symbols as visible from a shared library, this doesn't
> > > mean these symbols are part of the public API (please continue to refer
> > > to [1] for info about what is considered public WebRTC API).
> > > 
> > > [1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
> > > 
> > > Bug: webrtc:9419
> > > Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/103505
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#24969}
> > 
> > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > 
> > Change-Id: I01f6e18f0d2c0f0309cdaa6c943c3927e1f1f49f
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:9419
> > Reviewed-on: https://webrtc-review.googlesource.com/c/103720
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#24974}
> 
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> 
> Change-Id: I83bbc7f550fc23e823c4d055e0a6f60c828960dd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9419
> Reviewed-on: https://webrtc-review.googlesource.com/c/103740
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24980}

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

Change-Id: I4b7cfe492f2c8eeda5c8ac52520e0cfc95ade9b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/103801
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24983}
2018-10-04 11:46:18 +00:00
Mirko Bonadei
588f4642d1 Reland "Export symbols needed by the Chromium component build (part 1)."
This reverts commit 2ea9af2275.

Reason for revert: The problem will be fixed by
https://chromium-review.googlesource.com/c/chromium/src/+/1261122.

Original change's description:
> Revert "Export symbols needed by the Chromium component build (part 1)."
> 
> This reverts commit 9e24dcff16.
> 
> Reason for revert: Breaks chromium.webrtc.fyi bots.
> 
> Original change's description:
> > Export symbols needed by the Chromium component build (part 1).
> > 
> > This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
> > to mark WebRTC symbols as visible from a shared library, this doesn't
> > mean these symbols are part of the public API (please continue to refer
> > to [1] for info about what is considered public WebRTC API).
> > 
> > [1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
> > 
> > Bug: webrtc:9419
> > Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
> > Reviewed-on: https://webrtc-review.googlesource.com/c/103505
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#24969}
> 
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> 
> Change-Id: I01f6e18f0d2c0f0309cdaa6c943c3927e1f1f49f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9419
> Reviewed-on: https://webrtc-review.googlesource.com/c/103720
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24974}

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

Change-Id: I83bbc7f550fc23e823c4d055e0a6f60c828960dd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/103740
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24980}
2018-10-04 11:22:19 +00:00
Mirko Bonadei
2ea9af2275 Revert "Export symbols needed by the Chromium component build (part 1)."
This reverts commit 9e24dcff16.

Reason for revert: Breaks chromium.webrtc.fyi bots.

Original change's description:
> Export symbols needed by the Chromium component build (part 1).
> 
> This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
> to mark WebRTC symbols as visible from a shared library, this doesn't
> mean these symbols are part of the public API (please continue to refer
> to [1] for info about what is considered public WebRTC API).
> 
> [1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
> 
> Bug: webrtc:9419
> Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
> Reviewed-on: https://webrtc-review.googlesource.com/c/103505
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24969}

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

Change-Id: I01f6e18f0d2c0f0309cdaa6c943c3927e1f1f49f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/103720
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24974}
2018-10-04 09:49:53 +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
Mirko Bonadei
9e24dcff16 Export symbols needed by the Chromium component build (part 1).
This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
to mark WebRTC symbols as visible from a shared library, this doesn't
mean these symbols are part of the public API (please continue to refer
to [1] for info about what is considered public WebRTC API).

[1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md

Bug: webrtc:9419
Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
Reviewed-on: https://webrtc-review.googlesource.com/c/103505
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24969}
2018-10-04 08:47:20 +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
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
Alex Loiko
e583174d1e Optionally disable digital adaptive AGC2.
The AGC2 is enabled by flipping
AudioProcessing::Config::GainController2::enabled. The flag enables
both AdaptiveAgc and FixedGainController. Before this CL, there was no
way(*) to only enable the FixedGainController. After this CL, it's
also possible to flip the setting
|AudioProcessing::Config::GainController2::adaptive_digital_mode|. The
default is |true|, which is the previous behavior.

* Except for instantiating and setting it up outside of the APM like
  it's done in the AudioMixer.

Bug: webrtc:7494
Change-Id: I506e93b6687221ac467f083fa8db3d45c98c1b83
Reviewed-on: https://webrtc-review.googlesource.com/95426
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24432}
2018-08-24 15:54:43 +00:00