Commit graph

349 commits

Author SHA1 Message Date
Gustaf Ullberg
ed51a6e665 AEC3: Avoid static initializers
Bug: webrtc:9288,chromium:846615
Change-Id: I9df7f07454bdba45181972b7ed3dff77c370abb3
Reviewed-on: https://webrtc-review.googlesource.com/81750
Reviewed-by: Christian Fremerey <chfremer@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23538}
2018-06-07 18:13:01 +00:00
Per Åhgren
05d8ee1b3e AEC3: Delay stabilization after a delay change
This CL ensures that the linear-filter based refined delay is chosen to
match the delay that was detected by the delay estimator during the time
it takes for the linear filter to converge.

Bug: webrtc:9371,chromium:850451
Change-Id: Ib9cf532df0577ceca10a260d9d2deba5306f88bb
Reviewed-on: https://webrtc-review.googlesource.com/81682
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23537}
2018-06-07 14:35:55 +00:00
Per Åhgren
78ea818864 AEC3: Added filter preprocessing to avoid low frequency artefacts
This filter preprocess the time domain representation of the adaptive
linear filter to avoid low-frequency components causing issues in
the filter analysis.

Bug: webrtc:9343, chromium:848231
Change-Id: I40494959f1b76242a7c9f2a2fc85c2ad4af9e164
Reviewed-on: https://webrtc-review.googlesource.com/79142
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23536}
2018-06-07 13:35:40 +00:00
Gustaf Ullberg
f469b63d44 AEC3: Improved anti-aliasing filter for DSF 4
This change contains a new anti-aliasing filter for the delay estimator
for down-sampling factor 4. The new (elliptic) filter has a much wider
main lobe allowing for faster convergence.

Bug: webrtc:9288,chromium:846615
Change-Id: Id109974a59fe6f48c5e0ccc4f4e06c0d94c8bd03
Reviewed-on: https://webrtc-review.googlesource.com/81680
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23534}
2018-06-07 12:21:36 +00:00
Gustaf Ullberg
34c9f1252a AEC3: Move decimator filters to the new notation
Preparing for changing the filters of the decimator by moving the old
filters to the new zero, pole, gain notation.

Bug: webrtc:9288,chromium:846615
Change-Id: I2b01a2555d34617e0bf251c782703753f72cd56f
Reviewed-on: https://webrtc-review.googlesource.com/81189
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23528}
2018-06-07 08:09:17 +00:00
Gustaf Ullberg
c4b7f037b7 AEC3: Adjust active render limits for downsampling factor 8
The signal used for delay estimation at downsampling factor 8 is bandpass
filtered and contains less energy than for other downsampling factors.
This CL adjusts the energy threshold used for determining if there is enough
farend activity to update the matched filters in the delay estimator.
Only downsampling factor 8 is affected.

Bug: webrtc:9288,chromium:846615
Change-Id: I6f38f5609a31e7a08e60571ac75ea75c9962e026
Reviewed-on: https://webrtc-review.googlesource.com/80443
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23486}
2018-06-01 10:07:16 +00:00
Gustaf Ullberg
435187d18d AEC3: CascadedBiQuadFilter can run different filters in cascade
CascadedBiQuadFilter can run identical filters multiple times. This CL
allows the use of different filters in each step. This enables the use
of more elaborate filters. The filters are defined by zeros, poles and
gains.

The 'old' way of initializing CascadedBiQuadFilter with a transfer
function and number of filters is left intact.

Bug: webrtc:9288,chromium:846615
Change-Id: Ie4a5b98eba044415571cdcac087b20870a0b5d33
Reviewed-on: https://webrtc-review.googlesource.com/80060
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23473}
2018-05-31 13:45:15 +00:00
Per Åhgren
e3ca991770 AEC3: Added a mode to properly utilize highly linear setups
Bug: webrtc:9321
Change-Id: I9c1abbd6b1daa1ecff041633318edfb8a011e9c0
Reviewed-on: https://webrtc-review.googlesource.com/79480
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23423}
2018-05-29 07:59:03 +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
Jesús de Vicente Peña
dd09287514 AEC3: Gain limiter: Improving the behavior of the gain limiter.
In this work, we change the behavior of the gain limiter so it also looks at the energy
 on farend around the default delay for deciding the suppression gain
that should be applied at the initial portion of the call.

Bug: webrtc:9311,chromium:846724
Change-Id: I0b777cedbbd7fd689e72070f72237296ce120d3c
Reviewed-on: https://webrtc-review.googlesource.com/78960
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23400}
2018-05-25 15:49:38 +00:00
Gustaf Ullberg
78b1c4a487 AEC3: Delay estimator uses bandpass filtered signal with downsampling factor 8
Letting the delay estimator operate at a sampling frequency of 2 kHz
with audio between 0 and 1 kHz makes it sensitive to noisy environments.
This CL bandpass filters the 16 kHz signal before downsampling to 2 kHz
in a way that the downsampled 2 kHz signal contains audio between 1 and
2 kHz. It also sets downsampling factor 8 as default which significantly
reduces computational complexity.

Bug: webrtc:9288,chromium:846615
Change-Id: Iaf67898a1a14326cd61bb7f81c14d3c12a697c8d
Reviewed-on: https://webrtc-review.googlesource.com/78703
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23395}
2018-05-25 09:31:38 +00:00
Niels Möller
14682a3c5f Delete macro RTC_DEFINE_STATIC_LOCAL.
Code using the macro change to a plain declaration+init of a local
variable.

Also delete includes of <stdint.h> and <stddef.h> from basictypes.h.

Bug: webrtc:6853
Change-Id: I5ffceb449c1bf8f5badb595d5a343a47b0c6deae
Reviewed-on: https://webrtc-review.googlesource.com/78460
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23377}
2018-05-24 08:10:35 +00:00
Gustaf Ullberg
43c707ada5 AEC3: Debug dump of render decimator input/output
Bug: webrtc:9288
Change-Id: Ic270bab173e4681a102dca93a5dc8c61caa981a0
Reviewed-on: https://webrtc-review.googlesource.com/78285
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23351}
2018-05-22 15:13:59 +00:00
Gustaf Ullberg
41c11e4cad AEC3: Rounding of estimated call skew
This CL fixes the rounding of the estimated average call skew. Before it
was rounded down (toward INT_MIN). Now it is rounded to the nearest integer.
This avoids unnecessary fluctuations of the estimated call skew (and
unnecessary resets).

Bug: webrtc:9283,chromium:888042
Change-Id: Id5b3c593f812f5f9fd3dcdafb7e388a6ef1ac153
Reviewed-on: https://webrtc-review.googlesource.com/77684
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23338}
2018-05-22 08:15:58 +00:00
Niels Möller
65ec0fc81e Delete unneeded includes of basictypes.h.
This is a kitchen-sink header, some pieces should be moved to
byteorder.h, the rest likely deleted.

Delete most includes of basictypes.h. In leaf headers,
include stddef.h and stdint.h explicitly where needed.

Bug: webrtc:6853
Change-Id: Ibc809936a8f94d418e4eb650da1e89c1b9142073
Reviewed-on: https://webrtc-review.googlesource.com/77721
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23333}
2018-05-21 19:35:08 +00:00
Jesús de Vicente Peña
666becad58 AEC3: ERLE improvements
The ERLE computation was improved by two means:
- The update function was always called and just parts of the internal code reacts to the converged filter flag
- When computing the ERLE, the ratio of energies is now computed using more points and, therefore, a more robust estimation is achieved.

Bug: webrtc:9284
Change-Id: Ie4f871f19cfad1a13741352ddd7b0a27ad6c3fb6
Reviewed-on: https://webrtc-review.googlesource.com/77767
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23329}
2018-05-21 15:11:06 +00:00
Gustaf Ullberg
6bf5a0d5b6 AEC3: High-pass filter delay estimator signals
This CL applies a high pass filter to the delay estimator signals which
improves the adaptation of the matched filters in noisy environments.
This results in faster delay estimation.

Bug: webrtc:9288
Change-Id: I8ffe5442eab7ac2f10a7ba236b08a0f07ec90645
Reviewed-on: https://webrtc-review.googlesource.com/77725
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23308}
2018-05-18 14:33:26 +00:00
Per Åhgren
2d9a3b1aba Increasing the API call skew hysteresis limit in AEC3
This CL increases the allowed variations in the API call skew limit in
AEC3.

Bug: webrtc:9283,chromium:888042
Change-Id: Ib5e784c6f3dcf1bf3a2cbfe2b1559953db9227a8
Reviewed-on: https://webrtc-review.googlesource.com/77430
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23305}
2018-05-18 13:39:26 +00:00
Per Åhgren
90e3fbdd37 Activating the AEC3 audibility improvements functionality
This CL turns on the previously implemented AEC3 audibility
improvements, which before has been off by default.

Bug: webrtc:9193,chromium:836790
Change-Id: Ibcd057ba5dd002718d62fd83db33d01d9563b8ea
Reviewed-on: https://webrtc-review.googlesource.com/77123
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23265}
2018-05-16 16:47:16 +00:00
Alessio Bazzica
2f1e6d4920 AGC2 RNN VAD: Polishing.
- Code clean: exploiting the recently added ArrayView ctor for
  std::array
- Pitch search internal unit test: long const arrays moved to
  a resource file
- Minor changes

Bug: webrtc:9076
Change-Id: Iaf30753f2498b4568860d72e0b81f5351235692f
TBR: aleloi@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/76920
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23248}
2018-05-15 16:41:02 +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
Alessio Bazzica
beb1d34729 AGC2 RNN VAD: Feature extraction.
This CL finalizes the feature extraction part for the RNN VAD adding
a class that combines a high-pass filter, LP residual computation,
pitch estimation and spectral features extraction.

This CL also includes a minor refactoring of the pitch estimation
library.

Bug: webrtc:9076
Change-Id: I918b9e143bc6dd2bf508a891446067258a68a777
Reviewed-on: https://webrtc-review.googlesource.com/75504
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23235}
2018-05-15 10:02:20 +00:00
Alex Loiko
f55babc298 Add namespace 'webrtc' to AudioFrameView.
Mini-change: add 'webrtc' namespace. The template class AudioFrameView
got declared in the global namespace by mistake. (My fault). Now
fixing.

Bug: webrtc:9262.
Change-Id: I6f2b4ab1ccdb223505e7181b8e6f12f5f23b3684
Reviewed-on: https://webrtc-review.googlesource.com/76140
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23215}
2018-05-14 12:33:49 +00:00
Alessio Bazzica
bc0b37c08a AGC2 RNN VAD: Spectral features extraction.
This CL defines SpectralFeaturesExtractor which is responsible for
computing the spectral features used as input for the RNN.

Bug: webrtc:9076
Change-Id: I5e1396b89eca9c13bb268e8419a16436a9c3450f
Reviewed-on: https://webrtc-review.googlesource.com/73760
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23206}
2018-05-11 21:15:36 +00:00
Per Åhgren
d18e87edd4 Correcting the AEC3 transparent mode behavior avoid incorrect activation
This CL adds robustness to avoid the AEC3 transparent mode to be
incorrectly activated when
-there is strong near-end noise
-there is only low-level nearend activity.

Bug: webrtc:9256,chromium:841193
Change-Id: I26c2759d163914eb85dc3d863da8acbf28cbb88d
Reviewed-on: https://webrtc-review.googlesource.com/75511
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23191}
2018-05-09 12:36:41 +00:00
Per Åhgren
ced31ba1cf Correcting the usage of the estimated echo path gain in AEC3
This CL corrects the usage of the estimated echo path gain to not be
hardcoded to 1. In order to retain the tuned behavior, the CL for now
maintains the former behavior in the code.

Bug: webrtc:9255,chromium:851187
Change-Id: I7f91c72e476680a8a854c22b74b1771fae446110
Reviewed-on: https://webrtc-review.googlesource.com/75510
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23190}
2018-05-09 12:35:31 +00:00
Per Åhgren
e05c43cc39 Remove the headroom and delay estimation feedback loop in AEC3
This CL ensures that the external audio buffer delay is correctly used
by removing the applied headroom and avoiding that the delay estimation
feedback fromt the echo remover overrules the external delay
information.

Bug: webrtc:9241,chromium:839860
Change-Id: I53cc78ace34a71994ab24a3b552f29979e2aae78
Reviewed-on: https://webrtc-review.googlesource.com/75513
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23189}
2018-05-09 12:34:26 +00:00
Alex Loiko
0520b0eb7b FFT-based auto correlation.
During pitch search in the RNN VAD, we calculate auto
correlation. Before this CL, we computed kNumInvertedLags12kHz=147 dot
products of vectors with kBufSize12kHz-kMaxPitch12kHz=240
elements. This was the most time consuming step of the new VAD.

This CL makes the computation happen in frequency domain. Profiling
shows a 3x speed increase. In future, we can try using a more efficient
FFT and to reduce the FFT length to some of e.g. 400, 405, 432.

# For minimal Clang plugin check change.
TBR: kwiberg@webrtc.org

Bug: webrtc:9076
Change-Id: I688251a415869d53175a37f390f441d4e035d954
Reviewed-on: https://webrtc-review.googlesource.com/73366
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23171}
2018-05-08 12:07:42 +00:00
Alessio Bazzica
0bd0a3fe4c AGC2 RNN VAD: Spectral features internal API.
This CL adds helper functions to be used for the spectral features
computation. Namely, it includes the following:
- band boundaries (frequency to FFT coeffcient index)
- band energy coefficients
- log band energy coefficients
- fixed size DCT table and computation

Bug: webrtc:9076
Change-Id: I03a8799b226d986bc1e37cefd0c3039f94b5592a
Reviewed-on: https://webrtc-review.googlesource.com/73687
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23170}
2018-05-08 11:52:32 +00:00
Alessio Bazzica
2284c56670 Adding double braces for array initialization.
TBR=maxmorin@webrtc.org

Bug: webrtc:9076
Change-Id: Ic341ef7437392dd5d6141147a2412ec54204ae10
Reviewed-on: https://webrtc-review.googlesource.com/75121
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Max Morin <maxmorin@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23164}
2018-05-08 09:15:16 +00:00
Alessio Bazzica
0424c19fda AGC2 RNN VAD: FFT utility lib
BandAnalysisFft class that wraps the FFT library, makes it easy to change
FFT library, applies windowing function and owns the FFT input buffer.

Bug: webrtc:9076
Change-Id: I9e7ed587ae263b906e04a66bf8c06eaae64daf19
Reviewed-on: https://webrtc-review.googlesource.com/72900
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23150}
2018-05-07 16:16:28 +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
Per Åhgren
9ad845d2ab Soften the AEC3 transparent mode to handle broken headsets
This CL softens the effect of the AEC3 transparent mode to also handle
headsets that leak low-level echoes in a nonlinear way.
This is handled by reintroducing the limit in the echo path gain for the
nonlinear mode. Due to recent improvements in echo suppressor behavior
this is now possible to do with a limited impact on the near-end speech.

Bug: webrtc:9246,chromium:840347
Change-Id: I0ca5157160d1884ba93b962323b56016756986d3
Reviewed-on: https://webrtc-review.googlesource.com/74703
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23145}
2018-05-07 13:52:08 +00:00
Gustaf Ullberg
623d281792 Correcting the use of externally reported delay in AEC3
Externally reported delay affects internal delay of the render delay buffer.

Bug: webrtc:9241,chromium:839860
Change-Id: Ia4e67eaea739e732dd6dcfec343dd7ee37ef883f
Reviewed-on: https://webrtc-review.googlesource.com/74704
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23144}
2018-05-07 13:49:28 +00:00
Alessio Bazzica
d8d02147d9 AGC2 Bi-Quad filter: separate target and unit test.
Adding a build target for the bi-qaud filter to make it available for
the RNN VAD of AGC2. Also adding a unit test to test the computation
both in-place and not in-place while comparing the produced output to
that of scipy.signal.

Bug: webrtc:9076
Change-Id: I16176a477ee4b81bb1e090c4906c3a9948ad2772
Reviewed-on: https://webrtc-review.googlesource.com/74220
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23141}
2018-05-07 12:22:54 +00:00
Alessio Bazzica
a5b903833f Reland "Reland "AGC2 RNN VAD: Recurrent Neural Network impl""
This reverts commit 3c9f47434f.

Reason for revert: downstream projects fixed

Original change's description:
> Revert "Reland "AGC2 RNN VAD: Recurrent Neural Network impl""
> 
> This reverts commit e0bba68ede.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Reland "AGC2 RNN VAD: Recurrent Neural Network impl"
> > 
> > This reverts commit 97e349ace7.
> > 
> > Reason for revert: downstream projects fixed
> > 
> > Original change's description:
> > > Revert "AGC2 RNN VAD: Recurrent Neural Network impl"
> > > 
> > > This reverts commit 2491cb7382.
> > > 
> > > Reason for revert: broke internal build
> > > 
> > > Original change's description:
> > > > AGC2 RNN VAD: Recurrent Neural Network impl
> > > > 
> > > > RNN implementation for the AGC2 VAD that includes a fully connected
> > > > layer and a gated recurrent unit layer.
> > > > 
> > > > Bug: webrtc:9076
> > > > Change-Id: Ibb8b0b4e9213f09eb9dbe118bbdc94d7e8e4f91b
> > > > Reviewed-on: https://webrtc-review.googlesource.com/72060
> > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> > > > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > > > Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#23101}
> > > 
> > > TBR=phoglund@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org
> > > 
> > > Change-Id: Ic311c4b7d79094e959d3a2c4a53c398f34c954e2
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:9076
> > > Reviewed-on: https://webrtc-review.googlesource.com/74200
> > > Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> > > Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#23103}
> > 
> > TBR=phoglund@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org
> > 
> > Change-Id: I0c7f8e0f59be926322d05b1da1d4d19c0777dab2
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:9076
> > Reviewed-on: https://webrtc-review.googlesource.com/74460
> > Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
> > Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23113}
> 
> TBR=phoglund@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org
> 
> Change-Id: I3985a6d38df1d4438a50d031bc9f6cf41eb83121
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9076
> Reviewed-on: https://webrtc-review.googlesource.com/74560
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23117}

TBR=phoglund@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org

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

Bug: webrtc:9076
Change-Id: I4d81786837017d4daf0dbb1218306795b977ade5
Reviewed-on: https://webrtc-review.googlesource.com/74760
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23138}
2018-05-07 11:13:14 +00:00
Gustaf Ullberg
a49eacb30a AEC3: External delay - Fix mismatch in time units
Fixes a confusion of time units (milliseconds vs blocks) of externally
reported audio delay. This fix reduces the risk of echo in the beginning
of a call.

Bug: webrtc:9241,chromium:839860
Change-Id: I534cc15d6b215a5881ae46759f573a56871170a3
Reviewed-on: https://webrtc-review.googlesource.com/74589
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23128}
2018-05-04 16:52:24 +00:00
Sam Zackrisson
3c9f47434f Revert "Reland "AGC2 RNN VAD: Recurrent Neural Network impl""
This reverts commit e0bba68ede.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "AGC2 RNN VAD: Recurrent Neural Network impl"
> 
> This reverts commit 97e349ace7.
> 
> Reason for revert: downstream projects fixed
> 
> Original change's description:
> > Revert "AGC2 RNN VAD: Recurrent Neural Network impl"
> > 
> > This reverts commit 2491cb7382.
> > 
> > Reason for revert: broke internal build
> > 
> > Original change's description:
> > > AGC2 RNN VAD: Recurrent Neural Network impl
> > > 
> > > RNN implementation for the AGC2 VAD that includes a fully connected
> > > layer and a gated recurrent unit layer.
> > > 
> > > Bug: webrtc:9076
> > > Change-Id: Ibb8b0b4e9213f09eb9dbe118bbdc94d7e8e4f91b
> > > Reviewed-on: https://webrtc-review.googlesource.com/72060
> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> > > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > > Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#23101}
> > 
> > TBR=phoglund@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org
> > 
> > Change-Id: Ic311c4b7d79094e959d3a2c4a53c398f34c954e2
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:9076
> > Reviewed-on: https://webrtc-review.googlesource.com/74200
> > Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> > Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23103}
> 
> TBR=phoglund@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org
> 
> Change-Id: I0c7f8e0f59be926322d05b1da1d4d19c0777dab2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9076
> Reviewed-on: https://webrtc-review.googlesource.com/74460
> Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23113}

TBR=phoglund@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org

Change-Id: I3985a6d38df1d4438a50d031bc9f6cf41eb83121
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9076
Reviewed-on: https://webrtc-review.googlesource.com/74560
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23117}
2018-05-04 11:52:26 +00:00
Gustaf Ullberg
0e6375e78b AEC3: Transparency improvements to the suppressor
This CL contains changes to the echo suppressor that improves the
transparency of AEC3.

- The comfort noise level is used as masker and the masking threshold is
increased.
- Suppression gains are allowed to increase more rapidly.
- Suppression gains decrease slower in the lower frequencies after strong
nearend.

Change-Id: I7adf31ed90b0e007072191f40439f27c3b0bccf2
Bug: webrtc:9230,chromium:839379
Reviewed-on: https://webrtc-review.googlesource.com/73680
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23115}
2018-05-04 11:02:14 +00:00
Alessio Bazzica
e0bba68ede Reland "AGC2 RNN VAD: Recurrent Neural Network impl"
This reverts commit 97e349ace7.

Reason for revert: downstream projects fixed

Original change's description:
> Revert "AGC2 RNN VAD: Recurrent Neural Network impl"
> 
> This reverts commit 2491cb7382.
> 
> Reason for revert: broke internal build
> 
> Original change's description:
> > AGC2 RNN VAD: Recurrent Neural Network impl
> > 
> > RNN implementation for the AGC2 VAD that includes a fully connected
> > layer and a gated recurrent unit layer.
> > 
> > Bug: webrtc:9076
> > Change-Id: Ibb8b0b4e9213f09eb9dbe118bbdc94d7e8e4f91b
> > Reviewed-on: https://webrtc-review.googlesource.com/72060
> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23101}
> 
> TBR=phoglund@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org
> 
> Change-Id: Ic311c4b7d79094e959d3a2c4a53c398f34c954e2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9076
> Reviewed-on: https://webrtc-review.googlesource.com/74200
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23103}

TBR=phoglund@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org

Change-Id: I0c7f8e0f59be926322d05b1da1d4d19c0777dab2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9076
Reviewed-on: https://webrtc-review.googlesource.com/74460
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23113}
2018-05-04 09:33:25 +00:00
Jesús de Vicente Peña
65ddf07219 AEC3: not applying noise gating when using the stationarity properties of the render signal
Bug: webrtc:9193,chromium:836790
Change-Id: I87ded1d33869037420c435155bd084f6fc3efdb0
Reviewed-on: https://webrtc-review.googlesource.com/73740
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23111}
2018-05-04 09:14:24 +00:00
Karl Wiberg
7ba22b8eea Break out the part of the iSAC codec that's used for Voice Activity Detection
The audio processing code is using parts of the iSAC codec to do voice
activity detection (VAD), but it's undesirable for it to pull in the
entire iSAC codec as a dependency. So this CL factors out the parts of
iSAC that's needed for VAD to a separate build target.

Bug: webrtc:8396
Change-Id: I884e25d8fd0bc815fca664352b0573b4b173880e
Reviewed-on: https://webrtc-review.googlesource.com/69640
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23110}
2018-05-04 08:53:34 +00:00
Sam Zackrisson
97e349ace7 Revert "AGC2 RNN VAD: Recurrent Neural Network impl"
This reverts commit 2491cb7382.

Reason for revert: broke internal build

Original change's description:
> AGC2 RNN VAD: Recurrent Neural Network impl
> 
> RNN implementation for the AGC2 VAD that includes a fully connected
> layer and a gated recurrent unit layer.
> 
> Bug: webrtc:9076
> Change-Id: Ibb8b0b4e9213f09eb9dbe118bbdc94d7e8e4f91b
> Reviewed-on: https://webrtc-review.googlesource.com/72060
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23101}

TBR=phoglund@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org

Change-Id: Ic311c4b7d79094e959d3a2c4a53c398f34c954e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9076
Reviewed-on: https://webrtc-review.googlesource.com/74200
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23103}
2018-05-03 13:49:22 +00:00
Alessio Bazzica
2491cb7382 AGC2 RNN VAD: Recurrent Neural Network impl
RNN implementation for the AGC2 VAD that includes a fully connected
layer and a gated recurrent unit layer.

Bug: webrtc:9076
Change-Id: Ibb8b0b4e9213f09eb9dbe118bbdc94d7e8e4f91b
Reviewed-on: https://webrtc-review.googlesource.com/72060
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23101}
2018-05-03 13:05:31 +00:00
Jesús de Vicente Peña
2f2633d90c AEC3: Audility: Avoid the initialization of the noise estimator in pure zeroes signals at the render.
Bug: webrtc:9193,chromium:836790
Change-Id: Ic162dd72947f1d075b55df6725a17b66c782930a
Reviewed-on: https://webrtc-review.googlesource.com/73200
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23075}
2018-05-02 10:19:46 +00:00
Alessio Bazzica
f22550175b AGC2 RNN VAD: Pitch Search
Functions to estimate pitch period and gain.

Bug: webrtc:9076
Change-Id: Icfe9430dcae11bdb96165c5bfe6e2b1d3bf848ab
Reviewed-on: https://webrtc-review.googlesource.com/70382
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23066}
2018-04-30 10:20:39 +00:00
Jesús de Vicente Peña
9558192711 AEC3: Removing the need of a buffer for the stationarity estimator of the render signal.
Change-Id: I6983e1d8bdd048a5d92209e3023c687f82d383d5

Bug: webrtc:9193,chromium:836790
Change-Id: I6983e1d8bdd048a5d92209e3023c687f82d383d5
Reviewed-on: https://webrtc-review.googlesource.com/72760
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23065}
2018-04-30 09:03:19 +00:00
Per Åhgren
658ad8816b Removed the updating of the padding data buffer in the AEC3 FFT
This CL removes the updating of the buffered data used to to pad the
64 sample blocks to 128 samples FFTs. As that padding was used
incorrectly in one place this resolves an important issue.


Bug: webrtc:9159,chromium:833801,webrtc:9206
Change-Id: Ie6830878ebec6130b61d4e7e3169357f2e253073
Reviewed-on: https://webrtc-review.googlesource.com/73240
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23059}
2018-04-27 19:26:03 +00:00
Per Åhgren
169c7fd521 Use windowed, data padded, FFTs when computing the AEC3 suppressor gain
This CL changes the way the suppressor gain is computed in AEC3 in that
the FFTs used are padded with data and windowed with a Hanning-style
window.
This gives better FFT accuracy, an behavior matching the suppressor
gain application, and also results in one less FFT operation.

Bug: webrtc:9204,chromium:837563
Change-Id: I612676c389cb76a3130966a9b596ff3f44d21863
Reviewed-on: https://webrtc-review.googlesource.com/73141
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23057}
2018-04-27 14:47:56 +00:00