This CL adds functionality to use the shadow filter output instead
of the main filter output for cases when the former is better than
the latter. One case when that happens is when there have been an
echo path change, either in the acoustic path, in the audio buffers
or due to some active audio processing effects being applied on
the device.
The CL causes less echo leaks, in particular on devices with
active render processing.
Bug: webrtc:9581,chromium:869821
Change-Id: Icb8df1b94141598da82dc188051ac59e43338938
Reviewed-on: https://webrtc-review.googlesource.com/91820
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24166}
Protect from negative second moments, which are unexpected in TransientDetector::Detect
and may lead to invalid results.
Bug: chromium:866925
Change-Id: Id1d5b2ebb51e54d9d332b869c6f63dcd03cc461c
Reviewed-on: https://webrtc-review.googlesource.com/91164
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24153}
This CL introduces an adaptive estimation of the early reverb
in the estimation for the room reverberation. The benefits of
this is that for room with long early reflections there is
a lower risk of underestimating the reverberation.
This CL is for a landing the code in
https://webrtc-review.googlesource.com/c/src/+/87420,
and the review of the code was done in that CL. The author of
code is devicentepena@webrtc.org
Bug: webrtc:9479, chromium:865397
Change-Id: Id6f57e2a684664aef96e8c502e66775f37da59da
Reviewed-on: https://webrtc-review.googlesource.com/91162
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24146}
Related bug closed since half a year back.
Bug: webrtc:8665
Change-Id: I77007caaa97b5db04f5cf144323cac7a576a7fde
Reviewed-on: https://webrtc-review.googlesource.com/90872
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24135}
This CL increases the AEC3 transparency during call
startup and after echo path delay changes in 3 ways:
1. The exit requirements for the initial mode is
made less strict.
2. The requirements for using the linear echo model
are made less strict.
3. The duplicated reverb modelling in the linear mode
removed.
Bug: webrtc:9572,chromium:868329
Change-Id: I79ea0796ed26408e35576bb39eaae4e4848b4f83
Reviewed-on: https://webrtc-review.googlesource.com/90868
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24132}
This will be the one way of toggling AEC. The EchoControlMobile and
EchoCancellation interfaces will be removed.
The settings introduced here are not used yet, to allow for smooth
downstream fixes.
Bug: webrtc:9535
Change-Id: I3b1a524a0ab7daf63419d7e5ed47417b9282dbf6
Reviewed-on: https://webrtc-review.googlesource.com/90864
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24129}
This CL adds a functionality that jump-starts the
AEC3 shadow filter whenever it performs consistently
worse than the main filter.
The jump-start is done such that the shadow filter
is re-initialized using the main filter coefficients.
The effects of this is a significantly more accurate
main linear filter which leads to less echo leakage
and better transparency
Bug: webrtc:9565, chromium:867873
Change-Id: Ie0b23cd536adc7ce96fc3ed2a7db112aec7437f1
Reviewed-on: https://webrtc-review.googlesource.com/90413
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24117}
This CL corrects the way that the echo subtractor output is
adjusted during the adjustment of the adaptive filter when the
analog AGC gain changes.
The CL also ensures that the main adaptive filter is not updated
when this occurs.
Bug: webrtc:9561,chromium:867373
Change-Id: I636f936128f7d9f0d82ca4140b59f148eb35d6a4
Reviewed-on: https://webrtc-review.googlesource.com/90401
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24101}
All clients who do not own their own APM turn it off by default
(in WebrtcVoiceEngine). AECM with comfort noise is a little-exercised
code path. Configurability of this setting is going away, so we're
better off disabling it by default.
Bug: webrtc:9535
Change-Id: Iba839aa18e79ae29ff20bdf6e30de77870ba4143
Reviewed-on: https://webrtc-review.googlesource.com/89583
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24078}
This reverts commit 771b50ca0b.
Reason for revert: Introduces error-prone config.
Original change's description:
> Add one-stop-shop for built-in AEC toggling in APM
>
> This does not change what AEC functionality is available.
> However, a client that only uses this interface - and not the submodule
> pointer accessors - gets simpler code, and is guaranteed not to run any
> two AECs in tandem.
>
> The submodule interface EchoControlMobile is being deprecated in
> https://webrtc-review.googlesource.com/c/src/+/89392
>
> Bug: webrtc:9535
> Change-Id: Id9326074e566be6d8768010fc421c457beff402c
> Reviewed-on: https://webrtc-review.googlesource.com/89386
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24066}
TBR=saza@webrtc.org,peah@webrtc.org
Change-Id: I43283a1b22538a4caa77313499989146b2ce67f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9535
Reviewed-on: https://webrtc-review.googlesource.com/90060
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24067}
This does not change what AEC functionality is available.
However, a client that only uses this interface - and not the submodule
pointer accessors - gets simpler code, and is guaranteed not to run any
two AECs in tandem.
The submodule interface EchoControlMobile is being deprecated in
https://webrtc-review.googlesource.com/c/src/+/89392
Bug: webrtc:9535
Change-Id: Id9326074e566be6d8768010fc421c457beff402c
Reviewed-on: https://webrtc-review.googlesource.com/89386
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24066}
In AgcManagerDirect::UpdateGain(), Agc::GetRmsErrorDb() is
called. Depending on the result of that call, the analog gain may be
changed. After an analog gain change, the Agc should be reset, because
it's memory contains now invalid loudness levels.
The Agc in modules/audio_processing/agc/agc.cc resets itself at every
successful Agc::GetRmsErrorDb call. The AdaptiveModeLevelEstimatorAgc
does not. This change makes sure all Agcs are reset from
AgcManagerDirect.
It will cause some Agcs to be reset twice. This is fine, because
Agc::Reset() is cheap and idempotent.
Bug: webrtc:7494
Change-Id: Iee7495d699cbdb9d69b2ae0cb07034c6e2761e22
Reviewed-on: https://webrtc-review.googlesource.com/89040
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24054}
A 32-bit number overflows. It's then capped to compute a 16-bit value.
This CL introduces a 64-bit variable on which equivalent operations are
performed instead.
Bug: chromium:864883
Change-Id: I371af869c6586256b900356491f467bed357e11d
Reviewed-on: https://webrtc-review.googlesource.com/89584
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24041}
This CL removes //build/config/clang:find_bad_constructs from the
suppressed_configs list, which means that clang:find_bad_constructs
is now enabled on these translation units.
Bug: webrtc:9251
Change-Id: Ibdafc0bb08de1be7189af7053a67a24e3a26bd6b
Reviewed-on: https://webrtc-review.googlesource.com/89001
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23997}
This CL re-activates the explicit handling of microphone
gain changes in the AEC3 code. The implementation is done
beneath a kill-switch so that when that switch is active
the changes in this CL are bitexact.
Bug: webrtc:9526,chromium:863826
Change-Id: I58e93d8bc0bce7bec91e102de9891ad48ebc55d8
Reviewed-on: https://webrtc-review.googlesource.com/88620
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23986}
This CL refactors the code in AEC3 that analyzes how
well the adaptive filter performs. The purpose of this
is both to simplify code that is more complex than needed
and also to pave the wave for the upcoming CLs that
softens the echo suppression during doubletalk.
The main changes are that:
-The shadow adaptive filter is now never analyzed. This
turned out to never affect the output in the recordings
it was tested on.
-The convergence analysis was moved to the aec state
code.
The changes are bitexact on all testcases where they
have been tested on.
Bug: webrtc:8671
Change-Id: If76b669565325c8eb4d11d1178a7e20306da9a26
Reviewed-on: https://webrtc-review.googlesource.com/87430
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23958}
This CL changes a constant from an approximately correct limit
of 2^25.5.
The new limit is the largest x such that z = 10 satisfies:
((x >> z) + 1)^2 <= 2^31 - 1.
If gains[k + 1] > x, then z >= 11 and needs to be computed.
Bug: chromium:860638
Change-Id: If17f257dacd94806e59e4f32b345a5fb15b4e32b
Reviewed-on: https://webrtc-review.googlesource.com/87583
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23908}
This clarifies dependencies and makes it easier to customize builds
for different binaries.
Also adds BUILD files in aec/ and aecm/.
Moves unit tests to their own target, which subjects them to Chromium
Clang style checks.
The CL contains a fix for a thusly induced warning.
Bug: webrtc:9488
Change-Id: I77b680b42a4dccc5f025005e0890f60b4eaf2961
Reviewed-on: https://webrtc-review.googlesource.com/87304
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23887}
This CL does the following:
1. Adds a new AdaptiveModeLevelEstimatorAgc implementation of the Agc
interface. The new implementation differs from webrtc::Agc by
1. using the AGC2 speech level estimator in
GetRmsErrorDb. webrtc::Agc implements its own with help of
webrtc::LoudnessHistogram.
2. Doesn't forget its past at every GetRmsErrorDb call.
2. Makes AgcManagerDirect use AdaptiveModeLevelEstimatorAgc instead of
webrtc::Agc if the use_agc2_level_estimation flag is set.
Bug: webrtc:7494
Change-Id: I8df3f52e322d433eb5ce5297f4236af2f1877b04
Reviewed-on: https://webrtc-review.googlesource.com/86603
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23875}
Splits 'modules/audio_processing:audio_processing' target. The files
in modules/audio_processing/agc now are in targets in that folder.
Reason for doing this was to include
modules/audio_processing/agc/agc.h from another target in the
dependent CL https://webrtc-review.googlesource.com/c/src/+/86603
This could help reducing the binary size in the future.
Bug: webrtc:7494
Change-Id: I61f50ab6d5ce24d19f4097e0f3fa8b0170010887
Reviewed-on: https://webrtc-review.googlesource.com/87422
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23873}
This reverts commit e90879097c.
Reason for revert: breaking downstream projects
Original change's description:
> IWYU: Add <cmath> for fabsf() and powf(), switch to C++ versions
>
> Fix the build with libstdc++ after 496cedfe5 ("AEC3: Reverberation model:
> Changes on the decay estimation") by including the missing header:
>
> ../../modules/audio_processing/aec3/reverb_model_estimator.cc: In constructor ‘webrtc::ReverbModelEstimator::ReverbModelEstimator(const webrtc::EchoCanceller3Config&)’:
> ../../modules/audio_processing/aec3/reverb_model_estimator.cc:61:21: error: ‘fabsf’ was not declared in this scope
> reverb_decay_(fabsf(config.ep_strength.default_len)),
> ^~~~~
> ../../modules/audio_processing/aec3/reverb_model_estimator.cc:61:21: note: suggested alternative: ‘labs’
> reverb_decay_(fabsf(config.ep_strength.default_len)),
> ^~~~~
> labs
> ../../modules/audio_processing/aec3/reverb_model_estimator.cc: In member function ‘void webrtc::ReverbModelEstimator::UpdateReverbDecay(const std::vector<float>&)’:
> ../../modules/audio_processing/aec3/reverb_model_estimator.cc:206:15: error: ‘powf’ was not declared in this scope
> decay = powf(2.0f, -exp_candidate * kFftLengthBy2);
> ^~~~
>
> While here, also switch to the C++ versions of those functions: std::fabs()
> and std::pow() respectively.
>
> Spotted by Jose Dapena Paz <jose.dapena@lge.com>.
>
> Bug: chromium:819294
> Change-Id: Id803243be8dd17eac95c70a88a37ee2fe1505a5a
> Reviewed-on: https://webrtc-review.googlesource.com/87421
> Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23870}
TBR=gustaf@webrtc.org,alessiob@webrtc.org,raphael.kubo.da.costa@intel.com,devicentepena@webrtc.org
Change-Id: I22423a2d4201183f70ae084e0e21930367824f1c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:819294
Reviewed-on: https://webrtc-review.googlesource.com/87401
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23871}
Fix the build with libstdc++ after 496cedfe5 ("AEC3: Reverberation model:
Changes on the decay estimation") by including the missing header:
../../modules/audio_processing/aec3/reverb_model_estimator.cc: In constructor ‘webrtc::ReverbModelEstimator::ReverbModelEstimator(const webrtc::EchoCanceller3Config&)’:
../../modules/audio_processing/aec3/reverb_model_estimator.cc:61:21: error: ‘fabsf’ was not declared in this scope
reverb_decay_(fabsf(config.ep_strength.default_len)),
^~~~~
../../modules/audio_processing/aec3/reverb_model_estimator.cc:61:21: note: suggested alternative: ‘labs’
reverb_decay_(fabsf(config.ep_strength.default_len)),
^~~~~
labs
../../modules/audio_processing/aec3/reverb_model_estimator.cc: In member function ‘void webrtc::ReverbModelEstimator::UpdateReverbDecay(const std::vector<float>&)’:
../../modules/audio_processing/aec3/reverb_model_estimator.cc:206:15: error: ‘powf’ was not declared in this scope
decay = powf(2.0f, -exp_candidate * kFftLengthBy2);
^~~~
While here, also switch to the C++ versions of those functions: std::fabs()
and std::pow() respectively.
Spotted by Jose Dapena Paz <jose.dapena@lge.com>.
Bug: chromium:819294
Change-Id: Id803243be8dd17eac95c70a88a37ee2fe1505a5a
Reviewed-on: https://webrtc-review.googlesource.com/87421
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23870}
Fix the build with libstdc++ after 496cedfe5 ("AEC3: Reverberation model:
Changes on the decay estimation") by including the missing header:
../../modules/audio_processing/aec3/reverb_model_estimator.cc: In constructor ‘webrtc::ReverbModelEstimator::ReverbModelEstimator(const webrtc::EchoCanceller3Config&)’:
../../modules/audio_processing/aec3/reverb_model_estimator.cc:61:21: error: ‘fabsf’ was not declared in this scope
reverb_decay_(fabsf(config.ep_strength.default_len)),
^~~~~
../../modules/audio_processing/aec3/reverb_model_estimator.cc:61:21: note: suggested alternative: ‘labs’
reverb_decay_(fabsf(config.ep_strength.default_len)),
^~~~~
labs
../../modules/audio_processing/aec3/reverb_model_estimator.cc: In member function ‘void webrtc::ReverbModelEstimator::UpdateReverbDecay(const std::vector<float>&)’:
../../modules/audio_processing/aec3/reverb_model_estimator.cc:206:15: error: ‘powf’ was not declared in this scope
decay = powf(2.0f, -exp_candidate * kFftLengthBy2);
^~~~
Spotted by Jose Dapena Paz <jose.dapena@lge.com>.
Bug: chromium:819294
Change-Id: If992e5e473b9d4d0c1b3c1006c3816b7c4eee296
Reviewed-on: https://webrtc-review.googlesource.com/87241
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#23863}
This clarifies the dependencies of utility/ a lot (spoiler:
there are very few) and makes it easier to separate the build
targets for aecm and aec2.
Bug: webrtc:9488
Change-Id: If916f86e80c19d1b650d0908fbe8343ea7c47bd7
Reviewed-on: https://webrtc-review.googlesource.com/87141
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23860}
The main filter is adapted at a lower rate which reduces the risk of
diverging during double talk. The change yields notable transparency
improvements.
Bug: webrtc:9497
Change-Id: Ib23b7a4055d313dede535d2b65dc7e023a2db042
Reviewed-on: https://webrtc-review.googlesource.com/87300
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23858}
In this CL we have introduced changes on the estimation of the decay involved in the exponential modeling of the reverberation. Specifically, the instantaneous ERLE has been tracked and used for adapting faster in the regions when the linear filter is performing well. Furthermore, the adaptation is just perform during render activity.
Change-Id: I974fd60e4e1a40a879660efaa24457ed940f77b4
Bug: webrtc:9479
Reviewed-on: https://webrtc-review.googlesource.com/86680
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23836}
This change simplifies the calculation of the suppression gains.
It also contains a new tuning of the suppressor.
The suppressor behavior is tuned by setting echo-to-nearend ratios
for when the suppressor is to be fully transparent and for when to
fully suppress. An echo-to-masker value determines when the signal
is masked by noise. These three values are specified for low and
high frequencies.
Change-Id: I108e83c8f2a35462085a3fabaebcc02fa3103607
Bug: webrtc:9482
Reviewed-on: https://webrtc-review.googlesource.com/86021
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23830}
Much like https://bugs.chromium.org/p/chromium/issues/detail?id=855900,
the int32 gain table isn't always small enough for plain multiplication
with an int16.
This appears fixable through regular fixed-point arithmetic (multiply
out[i][n] by integer and fractional part of gain separately), but it's
less readable.
Bug: chromium:858989
Change-Id: Ie5aac25fd0cca4e51858cba69bde06c54a5d31bf
Reviewed-on: https://webrtc-review.googlesource.com/86602
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23815}
1. Adds support for Reset calls in AGC2. The AGC will be reset during
analog gain changes.
2. Allows AdaptiveModeLevelEstimator to return estimates > 0. This can
happen if the signal gain is too high. It's needed for letting the
analog AGC know that the gain is too high.
Bug: webrtc:7494
Change-Id: I38def17c21cc01c36aaea79a2401d8c2f289407b
Reviewed-on: https://webrtc-review.googlesource.com/79360
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23805}
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}
The AGC submodule of APM changes analog gain. These gain changes are
typically ignored by the test tool audioproc_f.
There is an option of the test tool to take action on the gain
changes. It's the '--simulate_mic_gain' option. The option converts
the analog gain to a digital gain. The digital gain is applied to the
capture stream.
This change adds a new simulated microphone kind. The new microphone
has a gain curve defined by
modules/audio_processing/agc/gain_map_internal.h. That gain curve
defines how AGC1 expects a microphone to behave.
Bug: webrtc:7494
Change-Id: Ifb3f54a8c6f8c001a711fa977f39f32413069780
Reviewed-on: https://webrtc-review.googlesource.com/86128
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23801}
We dump the compression level from AgcManagerDirect.
We use the same names and structure as in
GainControlForExperimentalAgc.
This is to get Apm dump file names to match in the upcoming AGC
changes: https://webrtc-review.googlesource.com/c/src/+/79360
TBR: alessiob@webrtc.org
Bug: webrtc:7494
Change-Id: I1e6260ea48ffc43f709e4b0c97f843ad9c3d1824
Reviewed-on: https://webrtc-review.googlesource.com/86546
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23800}
In this work the performance of the linear filter is
estimated. The estimation aims at capture situations when the linear
filter is largely over-estimating the echo. In those circumstances,
the linear filter is scaled with the purpose of accelerating its
convergence.
Change-Id: I05ea3739d82838a6f08673432da92125c47943e0
Bug: webrtc:9466,chromium:857426
Reviewed-on: https://webrtc-review.googlesource.com/86133
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23789}
This CL removes the constraint that freezes the filter adaptation
whenever the estimated echo or the prediction error is saturated. This
allows for much more rapid filter recovery in cases where the echo path
gain for some reason changes, such as when the analog AGC gain is
adjusted or the loudspeaker volume is changed.
TBR: devicentepena@webrtc.org
Bug: webrtc:9466,chromium:857426
Change-Id: Ic0b3b03f41f12e9a607aaadd2ee91cbaa16cac52
Reviewed-on: https://webrtc-review.googlesource.com/86124
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23775}
This CL changes the behavior when the main filter diverges.
Instead of entering non-linear mode, the AEC continues to operate in
linear mode but estimates the residual echo differently. R2 is S2
scaled by a factor of 10.
Bug: chromium:857018,webrtc:9462
Change-Id: I41212efe164ad319cf38a163cdf9d3ea151e0997
Reviewed-on: https://webrtc-review.googlesource.com/85981
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23772}