Commit graph

19 commits

Author SHA1 Message Date
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
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
Per Åhgren
56b5a6c4b2 audioproc_f: Modified and added further logging of used aec3 parameters
This CL:
-Adds the option to log the aec3 parameters used for a simulation.
-Cleans up the logging of the custom setting of aec3 parameters to
 instead rely on the newly added logging.

Bug: webrtc:8671
Change-Id: If73a73d08e5a5077416033ded598a83fb1ade3e0
Reviewed-on: https://webrtc-review.googlesource.com/100381
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24742}
2018-09-14 13:56:52 +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
Per Åhgren
5a72a5ef2b Adding quiet mode for audioproc_f
This CL adds a quiet mode for audioproc_f and hooks up the verbose
output of the AEC3 settings read from the JSON input file to that.

Bug: webrtc:8671
Change-Id: I93bbd1efc6502649da7b2b3e9f7557e9c184b0ed
Reviewed-on: https://webrtc-review.googlesource.com/95700
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24416}
2018-08-24 05:52:43 +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
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
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +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
af998e2fdc Remove non-API beamformer references
This removes beamformer references from audioproc_f, some non-beamformer tests, and a few other bits and bobs.
The beamformer is, after this, very decoupled from the remaining APM code.

Bug: webrtc:9402
Change-Id: Iaafc95517013d7a17723ef2329f17b5e09069bc9
Reviewed-on: https://webrtc-review.googlesource.com/83983
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23649}
2018-06-19 08:29:24 +00:00
Per Åhgren
c5efb0c080 Added an audioproc option to not report the stream delay
Bug: webrtc:9316
Change-Id: If7a20bbac998e9a779579650f3eb9019f974e9a8
Reviewed-on: https://webrtc-review.googlesource.com/79141
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23415}
2018-05-28 13:22:29 +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
Alex Luebs
24c220c178 Changed target_angle_degrees in audioproc_float to float to avoid integer division when converting to radians
Change-Id: I1b12d03524c34ed3fc4da89216539fd31a5c703b

Bug: none
Change-Id: I1b12d03524c34ed3fc4da89216539fd31a5c703b
Reviewed-on: https://webrtc-review.googlesource.com/61942
Commit-Queue: Alejandro Luebs <aluebs@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22462}
2018-03-15 19:01:47 +00:00
Ivo Creusen
2cb4105224 Moved audioproc_f interface into api directory.
The interface of the audioproc_f tool should be located in the api/ directory, so it becomes visible to the outside world.

Bug: webrtc:8732
Change-Id: Ia7475883aeb0e1f7a6afa5e791204b38dc53a8b8
Reviewed-on: https://webrtc-review.googlesource.com/61801
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22449}
2018-03-15 12:31:37 +00:00
Renamed from modules/audio_processing/test/audioproc_float.cc (Browse further)