This CL corrects the computation of the delay headroom so that
it is only updated when the delay is updated. This is important
as otherwise a too large headroom will be reported, which then
could cause buffer access issues.
Bug: webrtc:7878, chromium:736893
Change-Id: Ib37cb608b064dd5d4df3f8fc423448ee80ed0106
Reviewed-on: https://chromium-review.googlesource.com/549335
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18781}
It was included twice. In both of these targets:
webrtc/modules/audio_processing:{audio_processing_tests,
audio_processing_unittests}
In audio_processing_tests, the new unit tests were added to
public_deps, which (we think) somehow caused webrtc:webrtc_tests
to list the AecDump tests, to much confusion.
Bug: webrtc:7404
Change-Id: I5788d93fef00d30a523312f317dde90eb64db8de
Reviewed-on: https://chromium-review.googlesource.com/543120
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18715}
Floating-point calculations are not guaranteed to happen at compile time
unless you force the issue with constexpr. This initializer was found
by running tools\win\static_initializers on a canary build
chrome_child.dll. constexpr was added to kSilenceRms for consistency.
BUG=chromium:341941
Review-Url: https://codereview.webrtc.org/2943833002
Cr-Commit-Position: refs/heads/master@{#18684}
The following changes have been made:
- command line args wired,
- user output added,
- final polishing.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2808053002
Cr-Commit-Position: refs/heads/master@{#18609}
Reason for revert:
Build file causing google3 compilation error fixed
Original issue's description:
> Revert of Conversational speech tool, simualtor + unit tests (patchset #12 id:220001 of https://codereview.webrtc.org/2790933002/ )
>
> Reason for revert:
> Compile Error.
>
> Original issue's description:
> > The simulator puts into action the schedule of speech turns encoded in a MultiEndCall instance. The output is a set of audio track pairs. There is one set for each speaker and each set contains one near-end and one far-end audio track. The tracks are directly written into wav files instead of creating them in memory. To speed up the creation of the output wav files, *all* the source audio tracks (i.e., the atomic speech turns) are pre-loaded.
> >
> > The ConversationalSpeechTest.MultiEndCallSimulator unit test defines a conversational speech sequence and creates two wav files (with pure tones at 440 and 880 Hz) that are used as atomic speech turn tracks.
> >
> > This CL also patches MultiEndCall in order to allow input audio tracks with same sample rate and single channel only.
> >
> > BUG=webrtc:7218
> >
> > Review-Url: https://codereview.webrtc.org/2790933002
> > Cr-Commit-Position: refs/heads/master@{#18480}
> > Committed: 6b648c4697
>
> TBR=minyue@webrtc.org,alessiob@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7218
>
> Review-Url: https://codereview.webrtc.org/2925123003
> Cr-Commit-Position: refs/heads/master@{#18481}
> Committed: 4c72cf43dfTBR=minyue@webrtc.org,charujain@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2930853002
Cr-Commit-Position: refs/heads/master@{#18606}
Currently the debug dump functionality of WebRTC (a log of all
AudioProcessing operations) was tested by the following tests:
1. ApmTest.VerifyDebugDump* which configures and runs AudioProcessing
from a debug dump, and verifies that the same debug dump is
recorded.
2. DebugDumpTest.* which is a comprehensive test of the debug dump
operations. AudioProcessing configuration is changed, and the dump
is scanned for the change.
3. ApmTest::{DebugDump, DebugDumpFromFileHandle} that verify that
debug dumping can be started and files written.
This CL replaces the debug dump mechanism in all these tests to
webrtc::AecDump. Some of the tests are adapted to the chenges of the
new API to AecDump {Start,Stop}DebugRecording: the old functions
signal errors when a file cannot be opened. With AecDump, the
AecDumpFactory instead returns a nullptr.
The CL also changes audioproc_f to use AecDump.
BUG=webrtc:7404
Review-Url: https://codereview.webrtc.org/2864373002
Cr-Commit-Position: refs/heads/master@{#18605}
const int16_t* data() const;
int16_t* mutable_data();
- data() returns a zeroed static buffer on muted frames (to avoid unnecessary zeroing of the member buffer) and directly returns AudioFrame::data_ on unmuted frames.
- mutable_data(), lazily zeroes AudioFrame::data_ if the frame is currently muted, sets muted=false, and returns AudioFrame::data_.
These accessors serve to "force" callers to be aware of the mute state field, i.e. lazy zeroing is not the primary motivation.
This change only optimizes handling of muted frames where it is somewhat trivial to do so. Other improvements requiring more significant structural changes will come later.
BUG=webrtc:7343
TBR=henrika
Review-Url: https://codereview.webrtc.org/2750783004
Cr-Commit-Position: refs/heads/master@{#18543}
Specifically, just like SafeMin() and SafeMax() it handles all
combinations of integer and all
combinations of floating-point arguments by picking a
result type that is guaranteed to be able to hold the result.
This CL also replaces a bunch of std::min + std:max call pairs with
calls to SafeClamp()---the ones that could easily be found by grep
because "min" and "max" were on the same line. :-)
BUG=webrtc:7459
Review-Url: https://codereview.webrtc.org/2808513003
Cr-Commit-Position: refs/heads/master@{#18542}
The default implementations of AudioProcessing::{AttachAecDump,
DetachAecDump} are removed and audio_processing.cc is decoupled from
aec_dump.h. After this CL, the two methods are pure virtual. The
default implementations were added because doing otherwise would break
internal projects.
Bug: webrtc:7404
Change-Id: If94f60aeefe4ad1eefed3744f857692cc645bdf4
Reviewed-on: https://chromium-review.googlesource.com/528132
Commit-Queue: Alex Loiko <aleloi@google.com>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18517}
This CL ensures that it is not possible to run several echo canceller
solutions in cascade inside the audio processing module.
Bug: webrtc:7776
Change-Id: I1777f97aeacb8cdf5c6c3be4bf13eefcde7d69fb
Reviewed-on: https://chromium-review.googlesource.com/527053
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18505}
This CL adds a MockAecDump and integration tests that inject the mock
into AudioProcessingImpl. The tests check the call pattern between
AudioProcessingImpl and AecDump. The existing tests ApmTest.* and
DebugDumpTest.* (not touched by this CL) check that the data written
by AecDumpImpl is valid.
The tests check that the protobuf-writing methods for the different
protobuf message types in audio_processing/debug.proto are indeed
called for the different modes of AudioProcessingImpl operation.
BUG=webrtc:7404
Review-Url: https://codereview.webrtc.org/2888533005
Cr-Commit-Position: refs/heads/master@{#18501}
This reflects currently active developers of the module.
NOTRY=True
Bug: None
Change-Id: Ibc0810b08db753404fcb94038a4bd857d5585ef9
Reviewed-on: https://chromium-review.googlesource.com/528075
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18492}
Reason for revert:
Compile Error.
Original issue's description:
> The simulator puts into action the schedule of speech turns encoded in a MultiEndCall instance. The output is a set of audio track pairs. There is one set for each speaker and each set contains one near-end and one far-end audio track. The tracks are directly written into wav files instead of creating them in memory. To speed up the creation of the output wav files, *all* the source audio tracks (i.e., the atomic speech turns) are pre-loaded.
>
> The ConversationalSpeechTest.MultiEndCallSimulator unit test defines a conversational speech sequence and creates two wav files (with pure tones at 440 and 880 Hz) that are used as atomic speech turn tracks.
>
> This CL also patches MultiEndCall in order to allow input audio tracks with same sample rate and single channel only.
>
> BUG=webrtc:7218
>
> Review-Url: https://codereview.webrtc.org/2790933002
> Cr-Commit-Position: refs/heads/master@{#18480}
> Committed: 6b648c4697TBR=minyue@webrtc.org,alessiob@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2925123003
Cr-Commit-Position: refs/heads/master@{#18481}
The ConversationalSpeechTest.MultiEndCallSimulator unit test defines a conversational speech sequence and creates two wav files (with pure tones at 440 and 880 Hz) that are used as atomic speech turn tracks.
This CL also patches MultiEndCall in order to allow input audio tracks with same sample rate and single channel only.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2790933002
Cr-Commit-Position: refs/heads/master@{#18480}
This CL implements webrtc::AecDump, which is an interface defined in
https://codereview.webrtc.org/2778783002.
This AudioProcessing submodule writes audio and APM state to a
file. The file writing is done by posting IO tasks
(write_to_file_task.h) on an rtc::TaskQueue. There is an existing
implementation for this through AudioProcessing::StartDebugRecording()
and AudioProcessing::StopDebugRecording(). This implementation still
works, and is used as the default until this dependent CL:
https://codereview.webrtc.org/2896813002/.
To be able to build webrtc without protobuf support, the interface is
isolated from protobuf types. Audio data from AudioProcessing is
passed to AecDumpImpl through the AecDump interface. There it is
stored in protobuf objects, which are posted on the task queue.
This functionality is verified correct by the CL
https://codereview.webrtc.org/2864373002, which enables this recording
submodule in APM tests.
BUG=webrtc:7404
Review-Url: https://codereview.webrtc.org/2865113002
Cr-Commit-Position: refs/heads/master@{#18241}
configuration, inputs and outputs over a period of time. It is
activated by AudioProcessing::StartRecording. The data is stored in
binary protobuf format in a specified file. The file IO is, as of
this CL, done from the real-time audio thread.
This CL contains an interface for AecDump, a new APM submodule that
will handle the recordings. Calls to the new interface from the
AudioProcessingModule are added. These calls have no effect, and for a
short while, audio_processing_impl.cc will contain two copies of
recording calls.
The original calls are guarded by the WEBRTC_AUDIOPROC_DEBUG_DUMP
preprocessor define. They still have an effect, while the new ones do
not. In the following CLs, the old recording calls will be removed,
and an implementation of AecDump added.
The reasons for the refactoring is to move file IO operations from the
real-time audio thread, to add a top-level low-priority task queue for
logging tasks like this, to simplify and modularize audio_processing_impl.cc
and remove some of the preprocessor directives. These goals will be
archived by the upcoming CLs. The implementation is in
https://codereview.webrtc.org/2865113002.
BUG=webrtc:7404
Review-Url: https://codereview.webrtc.org/2778783002
Cr-Commit-Position: refs/heads/master@{#18233}
This CL ensures that the output of the level controller is kept
when no other submodules in APM are active
BUG=webrtc:7697,
Review-Url: https://codereview.webrtc.org/2902723002
Cr-Commit-Position: refs/heads/master@{#18230}
This CL increases the transparency of the AEC3 via tuning.
The major changes are
1) Limiting the suppression gain to the 16 bit sample floor.
2) Controlling the rate of the suppression gain increase
according to the signal characteristics.
Apart from these tunings, the code for the suppression gain
was refactored to increase/maintain the code quality after
the above changes.
BUG=webrtc:7519,webrtc:7528, chromium:715893
Review-Url: https://codereview.webrtc.org/2886733002
Cr-Commit-Position: refs/heads/master@{#18229}
split domain and only implements floating point operations (to avoid spectral
leakage issues and unnecessary complexity).
The goal of this CL is adding the new sub-module into APM without providing an
implementation that could replace the existing gain control modules. The focus
is in fact on initialization, reset, and configuration of AGC2.
The module itself only applies a hard-coded gain value. This behavior will
change in the coming CLs.
BUG=webrtc:7494
Review-Url: https://codereview.webrtc.org/2848593002
Cr-Commit-Position: refs/heads/master@{#18222}
This CL adjusts the render processing rate such to avoid resampling of the
render signal when that is not needed.
Note that to avoid acquiring more locks than needed, this should be achieved
during initialization.
BUG=webrtc:7667
Review-Url: https://codereview.webrtc.org/2887693002
Cr-Commit-Position: refs/heads/master@{#18207}
This CL adds a log message with the relevant part of the internal state of the echo detector to the text log when this unexpected scenario occurs.
BUG=b/38014838
Review-Url: https://codereview.webrtc.org/2883283002
Cr-Commit-Position: refs/heads/master@{#18185}
This CL changes the updating of a loop index from using the modulus
operator to using a conditional, avoiding the divisions done in the
modulus operator which had a measurable impact on mpbile
platforms.
Additionally, there is a similar removal of another modulus operator, but the impact of that should be negligible.
BUG=webrtc:7666
Review-Url: https://codereview.webrtc.org/2882183004
Cr-Commit-Position: refs/heads/master@{#18168}
This is a robustness test for the residual echo detector, that can help to detect numerical issues.
BUG=b/38014838
Review-Url: https://codereview.webrtc.org/2877803002
Cr-Commit-Position: refs/heads/master@{#18165}
This CL removes the residual echo detector from the list of
modules in APM that requires band-splitting.
BUG=webrtc:6220, webrtc:6183
Review-Url: https://codereview.webrtc.org/2884913002
Cr-Commit-Position: refs/heads/master@{#18164}
This CL moves the residual echo detector to reside outside of
the band-scheme in APM. The benefit of this is that the
residual echo detector will then no longer enforce the
band-splitting to be used when it is the only active component
inside APM.
This CL also introduces diagnostic dumping of data inside the
residual echo detector.
BUG=webrtc:6220, webrtc:6183
Review-Url: https://codereview.webrtc.org/2884593002
Cr-Commit-Position: refs/heads/master@{#18150}
The residual echo likelihood should report a likelihood between 0.0 and 1.0. Currently it can happen that echo likelihoods > 1.0 are reported. As a temporary mitigation to stop this, this CL enforces a hard maximum of 1.0 for the echo likelihood while we investigate the issue further.
BUG=b/38014838
Review-Url: https://codereview.webrtc.org/2861123002
Cr-Commit-Position: refs/heads/master@{#18030}
Reason for revert:
The original patch set was correct, but the Chromium bug number needed to be corrected.
Original issue's description:
> Revert of Added ARM Neon SIMD optimizations for AEC3 (patchset #2 id:970001 of https://codereview.webrtc.org/2834073005/ )
>
> Reason for revert:
> The bug number for the chromium bug was wrong.
>
> Original issue's description:
> > Added ARM Neon optimizations for AEC3
> >
> > This CL adds Neon SIMD optimizations for AEC3 on ARM, resulting
> > in an 8 times complexity reduction. The optimizations are basically
> > identical to what was already in place for SSE2.
> >
> > BUG=chromium:14993, webrtc:6018
> >
> > Review-Url: https://codereview.webrtc.org/2834073005
> > Cr-Commit-Position: refs/heads/master@{#17993}
> > Committed: f246b91eba
>
> TBR=ivoc@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:14993, webrtc:6018
>
> Review-Url: https://codereview.webrtc.org/2856113003
> Cr-Commit-Position: refs/heads/master@{#17994}
> Committed: b70f8cfd4dTBR=ivoc@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:714993, webrtc:6018
Review-Url: https://codereview.webrtc.org/2862573002
Cr-Commit-Position: refs/heads/master@{#17997}
Reason for revert:
The bug number for the chromium bug was wrong.
Original issue's description:
> Added ARM Neon optimizations for AEC3
>
> This CL adds Neon SIMD optimizations for AEC3 on ARM, resulting
> in an 8 times complexity reduction. The optimizations are basically
> identical to what was already in place for SSE2.
>
> BUG=chromium:14993, webrtc:6018
>
> Review-Url: https://codereview.webrtc.org/2834073005
> Cr-Commit-Position: refs/heads/master@{#17993}
> Committed: f246b91ebaTBR=ivoc@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:14993, webrtc:6018
Review-Url: https://codereview.webrtc.org/2856113003
Cr-Commit-Position: refs/heads/master@{#17994}
This CL adds Neon SIMD optimizations for AEC3 on ARM, resulting
in an 8 times complexity reduction. The optimizations are basically
identical to what was already in place for SSE2.
BUG=chromium:14993, webrtc:6018
Review-Url: https://codereview.webrtc.org/2834073005
Cr-Commit-Position: refs/heads/master@{#17993}
This CL corrects the behavior in AEC3 during buffer overruns
and underruns in three ways.
1) When there is no render signal available (due to a buffering
issues, a zero block is inserted instead of the previous render
block. This avoids the same block being repeatedly inserted when
there are many back-to-back calls.
2) The internal counters in the main adaptive filter gain are also
reset when the filter is reset.
3) The internal counters in the shadow adaptive filter gain are
reset when the filter is reset.
BUG=chromium:717920,webrtc:7559
Review-Url: https://codereview.webrtc.org/2862533002
Cr-Commit-Position: refs/heads/master@{#17991}
In this CL, the neteq_unittest_tools target is split in two separate
targets. One still called neteq_tools which does not set
testonly=true and that includes code related to audio input,
replacement audio and fake decoding. The other target called
neteq_test_tools contains the remaining files, and is
still under testonly=true.
Other renames:
neteq_test_tools -> neteq_test_tools_deprecated
neteq_test_minimal -> neteq_tools_minimal
Cyclic dependencies were also cleaned up.
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_rel_ng,linux_chromium_compile_dbg_ng
BUG=webrtc:7467,webrtc:6828
Review-Url: https://codereview.webrtc.org/2845013003
Cr-Commit-Position: refs/heads/master@{#17921}
This target keeps track of .h the files under webrtc/modules/include/
that are not part of any target.
If a .h file is not part of a target the 'gn check' utility is not
able to spot if a target is missing a dependency because even if
it parses '#include' directives it is not able to find a target that
contains these headers.
BUG=webrtc:7513
NOTRY=True
Review-Url: https://codereview.webrtc.org/2838873002
Cr-Commit-Position: refs/heads/master@{#17880}
Specifically, they handle all combinations of two integer and two
floating-point arguments by picking a result type that is guaranteed
to be able to hold the result. This means callers no longer have to
deal with potentially dangerous casting to make all the arguments have
the same type, like they have to with std::min() and std::max().
Also, they're constexpr.
Mostly for illustrative purposes, this CL replaces a few std::min()
and std::max() calls with SafeMin() and SafeMax().
BUG=webrtc:7459
Review-Url: https://codereview.webrtc.org/2810483002
Cr-Commit-Position: refs/heads/master@{#17869}
Make all rtc_source_test target that contains tests that
are included in a test executable only be visible to the
rtc_test target. Doing this exposed a couple of errors and
dependency problems that were resolved. Having this could
have prevented duplicated execution of tests like the case that
was recently fixed by deadbeef@ in
https://codereview.webrtc.org/2820263004
New targets:
* //webrtc/modules/rtp_rtcp:fec_test_helper
* //webrtc/modules/rtp_rtcp:mock_rtp_rtcp
* //webrtc/modules/remote_bitrate_estimator:mock_remote_bitrate_observer
The mock files and targets should probably be moved into webrtc/test in
the future, but that's out of the scope of this CL.
BUG=webrtc:5716
NOTRY=True
Review-Url: https://codereview.webrtc.org/2828793003
Cr-Commit-Position: refs/heads/master@{#17863}
This CL improves the echo cancellation performance on setups where
headsets are used (systems with such low echo path gain
that no correlation between the render and capture signals
can be found) in 4 ways:
1) The echo path gain for systems with headsets is assumed to be
nonzero.
2) The stationary component of the render power is not included
in nonlinear echo power estimate.
3) The behavior after echo path gain changes is made less cautious.
4) The detection of systems with headsets is made more rapid.
BUG=chromium:712651, webrtc:6018
Review-Url: https://codereview.webrtc.org/2823903003
Cr-Commit-Position: refs/heads/master@{#17768}
- BUILD file reorganized, unit tests now have dedicated targets.
- "fake_polqa" is a binary producing fake output in the same format of PolqaOem64; the binary is injected for unit tests instead of the actual POLQA tool.
- Minor refactoring to inject the path to the POLQA binary instead of its parent folder.
- Unit tests for the evaluation score workers.
- Unit tests for the ApmModuleSimulator class.
- Unit tests for the test data generators: ReverberationTestDataGenerator added.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2811953002
Cr-Commit-Position: refs/heads/master@{#17674}
This CL adds tuning to AEC3 for the purpose of reducing the impact of
gain changes in the analog microphone gain.
BUG=chromium:710818, webrtc:6018
Review-Url: https://codereview.webrtc.org/2811283003
Cr-Commit-Position: refs/heads/master@{#17673}
This CL adds further SSE2 optimizations for the AEC3
adaptive filter.
The changes are bitexact
BUG=webrtc:6018
Review-Url: https://codereview.webrtc.org/2810133002
Cr-Commit-Position: refs/heads/master@{#17667}
Most of the complex functionality in AEC3 is done using
vector maths. This CL adds a new functionality for
performing these using SIMD operations in a simple manner
whenever such are available.
The reason for putting the implementations in the header file
is to allow any possible inlining.
BUG=webrtc:6018
Review-Url: https://codereview.webrtc.org/2813823002
Cr-Commit-Position: refs/heads/master@{#17663}
The SSE2 optimizations of the filter core in the matched
filter was only half-done. This CL finalizes those.
In particular:
-It adds finalization of updating of the filter.
-It removes the manual loop unrolling in order to reduce and
simplify the code.
Note that the changes pass the bitexactness tests in an
external AEC3 test suite, and the test
MatchedFilter.TestOptimizations succeed.
BUG=webrtc:6018
Review-Url: https://codereview.webrtc.org/2813563003
Cr-Commit-Position: refs/heads/master@{#17655}
This CL changes the name of classes, methods and variables making using "noise generator".
This naming is replaced with "input-reference generator" which is more descriptive of the actual role.
Comments, CSS class and HTML item names have also been changed.
Consistency for variable names has been verified and the style checked with pylint.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2805653002
Cr-Commit-Position: refs/heads/master@{#17639}
Changes in the microphone gain are effecting the AEC in the sense
that each change in the microphone gain is a change in the echo
path seen by the AEC. This CL utilizes the ability of AEC3 to
leverage information about known changes in the analog microphone
gain.
BUG=webrtc:6018
Review-Url: https://codereview.webrtc.org/2808073002
Cr-Commit-Position: refs/heads/master@{#17625}