1028 Commits

Author SHA1 Message Date
Per Åhgren
f0a6fb19c6 Corrected the computation of the headroom in the AEC3 buffer alignment
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}
2017-06-27 11:42:37 +00:00
Alex Loiko
57ff3f4ec8 Remove aec_dump_unittests from audio_processing_tests.
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}
2017-06-22 12:18:51 +00:00
brucedawson
fde2116288 Use constexpr to avoid a static initializer
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}
2017-06-20 17:57:09 +00:00
alessiob
19e087fc91 This CL finalizes the Conversational Speech tool.
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}
2017-06-15 10:49:57 +00:00
alessiob
f9784f23d7 Reland of Conversational speech tool, simualtor + unit tests (patchset #1 id:1 of https://codereview.webrtc.org/2925123003/ )
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: 4c72cf43df

TBR=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}
2017-06-15 09:24:59 +00:00
aleloi
f4dd191b28 Change existing aec dump tests to use webrtc::AecDump.
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}
2017-06-15 08:55:38 +00:00
yujo
36b1a5fcec Add mute state field to AudioFrame and switch some callers to use it. Also make AudioFrame::data_ private and instead provide:
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}
2017-06-12 19:45:32 +00:00
kwiberg
0703856b53 Add SafeClamp(), which accepts args of different types
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}
2017-06-12 18:40:47 +00:00
Alex Loiko
be767e0f7a Remove default impl of Attach/DetachAecDump.
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}
2017-06-09 17:18:31 +00:00
Per Åhgren
46537a3879 Avoiding cascaded software echo cancellers
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}
2017-06-08 22:39:03 +00:00
aleloi
20e4a73b9b MockAecDump and integration tests between AecDump and AudioProcessing
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}
2017-06-08 15:12:46 +00:00
Alex Loiko
04ca637be3 Make 'aleloi@' OWNER of webrtc/modules/audio_processing
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}
2017-06-08 09:36:10 +00:00
charujain
4c72cf43df 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}
2017-06-07 18:59:09 +00:00
alessiob
6b648c4697 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}
2017-06-07 18:04:35 +00:00
nisse
7926c12933 Delete unneeded includes of system_wrappers/include/sleep.h
BUG=None

Review-Url: https://codereview.webrtc.org/2915903003
Cr-Commit-Position: refs/heads/master@{#18380}
2017-06-01 12:34:08 +00:00
peah
1b92722ad5 Simplified the ERLE computation code in AEC3
BUG=webrtc:7519

Review-Url: https://codereview.webrtc.org/2901253002
Cr-Commit-Position: refs/heads/master@{#18249}
2017-05-24 06:44:47 +00:00
aleloi
06013e99ac AecDump implementation.
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}
2017-05-23 15:52:05 +00:00
aleloi
868f32f423 AudioProcessingModule has a feature to make a recording of its
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}
2017-05-23 14:20:05 +00:00
peah
23ac8b49f4 Preserve level controller output when no other effects are active
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}
2017-05-23 12:33:56 +00:00
peah
1d68089f4b Transparency increasing tuning for AEC3.
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}
2017-05-23 11:07:10 +00:00
alessiob
3ec96df907 This CL introduces a new APM sub-module named AGC2 that does not use the band
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}
2017-05-22 13:57:06 +00:00
peah
ce4d91527a Avoid render resampling when there is no need for render signal analysis.
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}
2017-05-19 08:28:05 +00:00
ivoc
1592c74d8a Add log message to help analyze why echo likelihood > 1.1
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}
2017-05-17 16:53:02 +00:00
peah
94f6fa0526 Removed implicit divisions in the residual echo detector
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}
2017-05-16 14:25:06 +00:00
ivoc
860249ec62 Adds fuzzer for the residual echo detector.
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}
2017-05-16 13:50:11 +00:00
peah
52775841f0 Ensures the residual echo detector does not requiring band-splitting
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}
2017-05-16 13:14:09 +00:00
peah
edddac54bc Corrected the number of channels used when AEC3 is run on stereo input.
BUG=chromium:722343, webrtc:7519

Review-Url: https://codereview.webrtc.org/2883933003
Cr-Commit-Position: refs/heads/master@{#18158}
2017-05-16 08:08:58 +00:00
peah
9e6a290c8d Moving the residual echo detector outside of band-scheme in APM
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}
2017-05-15 14:19:21 +00:00
ivoc
8f94cd3419 Prevent residual echo likelihood values greater than 1.0.
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}
2017-05-05 12:50:10 +00:00
peah
5d153c76c6 Reland of Added ARM Neon SIMD optimizations for AEC3 (patchset #1 id:1 of https://codereview.webrtc.org/2856113003/ )
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: b70f8cfd4d

TBR=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}
2017-05-03 13:45:44 +00:00
peah
b70f8cfd4d 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}
2017-05-03 13:40:47 +00:00
peah
f246b91eba 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}
2017-05-03 13:28:59 +00:00
peah
debaa442ed Corrected the behavior in AEC3 during buffer overruns and underruns
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}
2017-05-03 12:39:09 +00:00
bpostelnicu
4ed18da990 Make sure the resulted operation is calculated on float basis.
BUG=webrtc:7558

Review-Url: https://codereview.webrtc.org/2634283002
Cr-Commit-Position: refs/heads/master@{#17983}
2017-05-03 10:20:18 +00:00
henrik.lundin
b637a94b63 NetEq tests: BUILD target reorg
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}
2017-04-28 07:59:45 +00:00
mbonadei
1140f97e48 Reland of Creating webrtc/modules:module_api (patchset #1 id:1 of https://codereview.webrtc.org/2839963005/ )
Reason for revert:
Fixing the Gn error and try to reland.

Original issue's description:
> Revert of Creating webrtc/modules:module_api (patchset #5 id:80001 of https://codereview.webrtc.org/2838873002/ )
>
> Reason for revert:
> Causes build problem: https://build.chromium.org/p/client.webrtc/builders/iOS64%20Sim%20Debug%20%28iOS%209.0%29/builds/1630/steps/generate%20build%20files%20%28mb%29/logs/stdio
>
> Original issue's description:
> > Creating webrtc/modules:module_api
> >
> > 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}
> > Committed: 5a1a092ed0
>
> TBR=kjellander@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7513
>
> Review-Url: https://codereview.webrtc.org/2839963005
> Cr-Commit-Position: refs/heads/master@{#17881}
> Committed: bb08c3e296

TBR=kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=kjellander@webrtc.org
BUG=webrtc:7513

Review-Url: https://codereview.webrtc.org/2843913002
Cr-Commit-Position: refs/heads/master@{#17884}
2017-04-26 10:38:35 +00:00
mbonadei
bb08c3e296 Revert of Creating webrtc/modules:module_api (patchset #5 id:80001 of https://codereview.webrtc.org/2838873002/ )
Reason for revert:
Causes build problem: https://build.chromium.org/p/client.webrtc/builders/iOS64%20Sim%20Debug%20%28iOS%209.0%29/builds/1630/steps/generate%20build%20files%20%28mb%29/logs/stdio

Original issue's description:
> Creating webrtc/modules:module_api
>
> 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}
> Committed: 5a1a092ed0

TBR=kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7513

Review-Url: https://codereview.webrtc.org/2839963005
Cr-Commit-Position: refs/heads/master@{#17881}
2017-04-26 09:00:16 +00:00
mbonadei
5a1a092ed0 Creating webrtc/modules:module_api
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}
2017-04-26 08:53:54 +00:00
kwiberg
7885d3f5c6 Add SafeMin() and SafeMax(), which accept args of different types
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}
2017-04-25 19:35:07 +00:00
kjellander
e0629c045e GN: Tighten up test target visibility + refactorings
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}
2017-04-25 11:04:50 +00:00
peah
e52a203a56 Echo canceller 3 improvements for setups with headsets.
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}
2017-04-19 16:03:40 +00:00
alessiob
13fc18068f Minor correction in the docstring of AudioProcessing::set_stream_delay_ms().
BUG=webrtc:7494
NOTRY=True

Review-Url: https://codereview.webrtc.org/2822253002
Cr-Commit-Position: refs/heads/master@{#17762}
2017-04-19 12:35:51 +00:00
kjellander
dd460e2aa2 Fix lint errors to enable stricter PyLint rules
These fixes are needed to avoid errors after submitting
https://codereview.webrtc.org/2737963003

BUG=webrtc:7303
NOTRY=True

Review-Url: https://codereview.webrtc.org/2812273002
Cr-Commit-Position: refs/heads/master@{#17679}
2017-04-12 19:06:13 +00:00
alessiob
a79143f3e9 This CL includes the following changes:
- 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}
2017-04-12 13:56:25 +00:00
peah
103ac7e7d9 AEC3 Tuning changes.
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}
2017-04-12 12:40:55 +00:00
peah
69ffdf4938 Further SSE2 optimizations for the AEC3 adaptive filter.
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}
2017-04-12 10:04:09 +00:00
peah
5e79b29313 Adding new functionality for SIMD optimizations in AEC3
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}
2017-04-12 08:20:45 +00:00
peah
b213a16b28 Finalized the SSE2 optimizations for the matched filter in AEC3
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}
2017-04-11 14:12:29 +00:00
alessiob
93cda2ebde APM-QA tool, renaming noise generators into input-reference generators.
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}
2017-04-11 08:06:28 +00:00
peah
6799553a2c Add information about microphone gain changes to AEC3
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}
2017-04-10 21:12:41 +00:00