This CL completely removes the methods
AudioProcessing::{Start,Stop}DebugDumpRecording. These methods have
been replaced with AudioProcessing::{Attach,Detach}AecDump. Their
implementation was removed in the parent CL
https://chromium-review.googlesource.com/c/589147
Bug: webrtc:7404
Change-Id: Ia3d5314985af9c74f79c94c514ded1f8afc78fb5
Reviewed-on: https://chromium-review.googlesource.com/589152
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19334}
AudioProcessingModule has a feature to make a recording of its
configuration, inputs and outputs over a period of time. In the past
CLs, this feature has been rewritten to move file IO away from
real-time audio threads. The interface has changed from
{Start,Stop}DebugDumpRecording to {Attach,Detach}AecDump.
This CL removes the previous implementation of the old interface
StartDebugRecording. The public interface is left to not cause
problems to downstream projects. It will be removed in the dependent
CL https://chromium-review.googlesource.com/c/589152/
With this CL, usage of WEBRTC_AUDIOPROC_DEBUG_DUMP and ~300 LOC of
logging code is removed from AudioProcessingImpl.
Bug: webrtc:7404
Change-Id: I16e7b557774e4bc997e1f5de4f97ed2c31d63879
Reviewed-on: https://chromium-review.googlesource.com/589147
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19332}
That way, the debug printout will tell us which of x and y that was false.
BUG=none
Review-Url: https://codereview.webrtc.org/2988153003
Cr-Commit-Position: refs/heads/master@{#19297}
Found via supersize query:
size_info.symbols.WhereFullNameMatches(r'\bk[A-Z]').WhereInSection('d')
This moves 90 symbols from .data -> .data.rel.ro (5.50kb)
BUG=chromium:747064
Review-Url: https://codereview.webrtc.org/2986163002
Cr-Commit-Position: refs/heads/master@{#19274}
If the input file name matches the "<name>-<params>.wav" pattern and <name> is a valid signal creator name, then <params> is parsed and used to create a new signal which is written in place of the missing file.
This CL only adds a pure tone creator. For instance, 'pure_tone-440_1000.wav' creates a pure tone at 440 Hz, 1000 ms long, mono, sampled at 48kHz.
This feature can be used to simplify the creation of common probe signals - no need to add external .wav files. Also, it will be exploited by a coming CL that adds a new evaluation score requiring the input signal to be a pure tone.
Additional minor fixes:
- apm_quality_assessment_unittest.py: command line arguments replaced to avoid that those for the unit test framework are passed
- simulation_unittest.py: invalid evaluation score name replaced
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2989823002
Cr-Commit-Position: refs/heads/master@{#19200}
- render stream support, required to assess AEC;
- echo path simulation and input mixer, to generate echo and add it to the
speech signal;
- export engine: improved UI, switch to Pandas DataFrames;
- minor design improvements and needed adaptions.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2813883002
Cr-Commit-Position: refs/heads/master@{#19198}
A multiplication result doesn't fit in an int32_t type. This change
rewrites the code to avoid the overflowing multiplication.
Here y[0], y[1] are int16 numbers containing the (truncated) topmost
18 and (scaled Q2 to use the full int16) the least significant 13
bits of a 32-bit value. The change makes y[1] to be calculated
directly instead of using y[0] as an intermediate value.
TESTED=this change passes the bit exactness tests, and has also been
running on the audio_processing fuzzer with a CHECK comparing the
old and new value.
Bug: chromium:747202
Change-Id: Iafc69eb7391d494afdadf65f5b7f399a57bbe9a8
Reviewed-on: https://chromium-review.googlesource.com/580907
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19120}
All downstream code have been updated to the new location.
In PRESUBMIT.py:
* Remove webrtc/rtc_base from CPP_BLACKLIST
* Add webrtc/rtc_base to LEGACY_API_DIRS
Fix some duplicated paths in
webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
BUG=webrtc:7634
TBR=kwiberg@webrtc.org
Review-Url: https://codereview.webrtc.org/2976293002
Cr-Commit-Position: refs/heads/master@{#19094}
The variable 'tmp_int32' in LowCutFilter::BiqueadFilter::Process can
be negative. This replaces a left shift with multiplication.
Bug: chromium:735593, chromium:743330
Change-Id: Idec7fbcc17495f7241eb4bea44920585740e3695
Reviewed-on: https://chromium-review.googlesource.com/575136
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19074}
This avoids a memcopy call which may corrupt audio handling and, in rare cases, crash WebRTC with a buffer over-read.
BUG=webrtc:7845
Review-Url: https://codereview.webrtc.org/2980723002
Cr-Commit-Position: refs/heads/master@{#18984}
The check triggered in 30 / 1000 cases of running PeerConnectionIntegrationTest.CallTransferredForCaller locally, far more often than expected.
It will soon be replaced by more graceful handling.
BUG=webrtc:7845
Review-Url: https://codereview.webrtc.org/2975043002
Cr-Commit-Position: refs/heads/master@{#18983}
This CL adds detection of components in the render signal that are of
strong narrowband nature and therefore may cause problems for the AEC.
This CL also adds functionality in the echo suppressor to suppress
these signals
BUG=webrtc:7967
Review-Url: https://codereview.webrtc.org/2980493002
Cr-Commit-Position: refs/heads/master@{#18968}
This CL robustifies the echo removal in AEC3 during the initial parts
of a call in two ways:
-By extending the period until which a headset is deemed to be used.
-By increasing the assumed echo path gain for unknown echo paths at
higher frequencies.
BUG=webrtc:7971
Review-Url: https://codereview.webrtc.org/2974883002
Cr-Commit-Position: refs/heads/master@{#18967}
This CL adds two changes:
-Adaptive adjustment of the echo suppression to both cover the cases
when the echo path well covers the room, and when when it does not.
-Identification of the case when the echo is too low to be audible
and adaptive handling of this case in the echo suppression.
BUG=webrtc:7519, webrtc:7956,webrtc:7957
Review-Url: https://codereview.webrtc.org/2974583004
Cr-Commit-Position: refs/heads/master@{#18962}
All downstream code have been updated to the new location.
In PRESUBMIT.py:
* Remove webrtc/rtc_base from CPP_BLACKLIST
* Add webrtc/rtc_base to LEGACY_API_DIRS
Fix some duplicated paths in
webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
BUG=webrtc:7634
TBR=kwiberg@webrtc.org
Review-Url: https://codereview.webrtc.org/2973183002
Cr-Commit-Position: refs/heads/master@{#18948}
Ensure that the ring buffer does not return a pointer into the buffer if
no data is available to read.
The ring buffer fix is not directly applicable to issue webrtc:7845, but may cause related memory errors.
BUG=webrtc:7845
Review-Url: https://codereview.webrtc.org/2971313002
Cr-Commit-Position: refs/heads/master@{#18940}
This CL addresses the issue of echo leakage of low level
echoes by making the echo canceller more restrictive for
that scenario.
BUG=webrtc:7930
Review-Url: https://codereview.webrtc.org/2969943002
Cr-Commit-Position: refs/heads/master@{#18884}
The complexity test for the audio processing module have long proven
to give false alarms of complexity regressions for which no related
changes can be identified. Attempts to address that has improved the
that, but the tests do still give false alarms.
This CL deactivates the complexity tests until a better way of
testing this is available.
BUG=chromium:713507, webrtc:5846,webrtc:6685,webrtc:7712
Review-Url: https://codereview.webrtc.org/2897403006
Cr-Commit-Position: refs/heads/master@{#18879}
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`
The only manual edit is to add an include of webrtc/rtc_base/checks.h in
webrtc/modules/audio_device/android/opensles_common.h, which likely
was needed due to changed include paths due to 'git cl format'.
BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True
Review-Url: https://codereview.webrtc.org/2969653002
Cr-Commit-Position: refs/heads/master@{#18871}
This CL exposes the parameter for adjusting the AEC3 performance
for large rooms.
Bug: webrtc:7519
Review-Url: https://codereview.webrtc.org/2967603002
Cr-Commit-Position: refs/heads/master@{#18862}
Due to the implementation of the analog AGC in the audio
processing module, the detection for the analog gain done in AEC3
fails on some platforms where there is no analog gain to control.
This CL removes that functionality until the AGC behavior has
been corrected.
Bug: webrtc:7910, chromium:738322
Change-Id: Ibdbe1e02252387dfd94b36ba7471f5c56ae27f48
Reviewed-on: https://chromium-review.googlesource.com/556040
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18850}
This CL loosens the requirement on the API jitter in APM
that can be tolerated without affecting the AEC3 performance.
BUG=webrtc:7911,chromium:738323
Review-Url: https://codereview.webrtc.org/2967493004
Cr-Commit-Position: refs/heads/master@{#18849}
Leaving compatibility script in webrtc/tools/compare_videos.py to
avoid breaking our video quality tests in Chromium.
Forwarding GN targets are left in webrtc/tools/BUILD.gn.
BUG=webrtc:7855
NOTRY=True
NOPRESUBMIT=True
Review-Url: https://codereview.webrtc.org/2965593002
Cr-Commit-Position: refs/heads/master@{#18848}
[This CL is a rebase of an original CL by solenberg@:
https://codereview.webrtc.org/2948763002/ which in turn was a
rebase of an original CL by peah@:
https://chromium-review.googlesource.com/c/527032/]
Allow an external audio processing module to be used in WebRTC
This CL adds support for optionally using an externally created audio
processing module in a peerconnection. The ownership is shared
between the peerconnection and the external creator of the module.
As part of this the internal ownership of the audio processing module
is moved from VoiceEngine to WebRtcVoiceEngine.
BUG=webrtc:7775
Review-Url: https://codereview.webrtc.org/2961723004
Cr-Commit-Position: refs/heads/master@{#18837}
This CL corrects the initialization of the AEC3, as well
as for the other submodules in the whole audio processing module
in the sense that it properly update the submodule states also
for the case when reinitialization is trigger from the render
side of the audio processing module.
Bug: chromium:736889,webrtc:7879
Change-Id: I423e963835d0c3227caa8e186b29031bcb912515
Reviewed-on: https://chromium-review.googlesource.com/549315
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18784}
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}