858 Commits

Author SHA1 Message Date
ivoc
d0a151c698 Update default values for APM stats to match old behavior.
In the new APM statistics interface, the default values did not match those previously used in AudioSendStream::Stats.

BUG=webrtc:6525

Review-Url: https://codereview.webrtc.org/2469783002
Cr-Commit-Position: refs/heads/master@{#14896}
2016-11-02 16:14:42 +00:00
ivoc
3e9a537601 Original CL: https://codereview.webrtc.org/2433153003/, commit 8b8d3e4c30e8ea3846b58dfd36d1fd35a7799df4.
Revert CL: https://codereview.webrtc.org/2456333002/, commit 48dfab5c58119a4e65c52506ed55f8de79725bcf.

The new function on the APM interface is no longer pure virtual.

BUG=webrtc:6525
TBR=solenberg@webrtc.org,peah@webrtc.org

Review-Url: https://codereview.webrtc.org/2458993002
Cr-Commit-Position: refs/heads/master@{#14827}
2016-10-28 14:55:39 +00:00
ivoc
af27ed01d7 Add algorithm for Residual Echo Detector.
This algorithm calculates an estimate of the Pearson product-moment correlation coefficient between the power of 10ms audio buffers taken from the render and capture sides, for various different delay values.

BUG=webrtc:6525

Review-Url: https://codereview.webrtc.org/2419563003
Cr-Commit-Position: refs/heads/master@{#14824}
2016-10-28 14:04:08 +00:00
kjellander
6ceab08322 GN: New conventions, default target and refactorings
Introduce a convention on categorizing GN targets:
1. Production code
2. Tests
3. Examples
4. Tools
The first two have targets spread out all over the tree,
while the latter are isolated to examples/ and tools/ directories.

Another new convention: Each directory's BUILD.gn file shall contain
a target named similar to the directory name. This target shall
contain the 'most common' production code, i.e. so that most
consumers of the directory can depend on only the directory
(which implicitly means that target in GN).

//webrtc:webrtc_tests is changed to depend on all WebRTC tests.
From now on, it's necessary to add new test targets to this dependency
tree in order to get them compiled.

Two new group targets are created:
//webrtc/modules/audio_coding:audio_coding_tests
//webrtc/modules/audio_processing:audio_processing_tests
to reduce the long list of tests in //webrtc:webrtc_tests.

Visibility on //webrtc:webrtc and  //webrtc:webrtc_tests is restricted
to the root target, to avoid circular dependencies due to the monolithic
property of these targets (a problem we've had in the past).

The 'root' target at the top level is renamed to 'default', which means GN will
build this target instead of _all_ generated targets
(see https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/faq.md#Can-I-control-what-targets-are-built-by-default).
This target now depends on everything we want to build, meaning all targets now
explicitly needs to be wired up from the root target in order to get build.
Having this, the number of compiled objects on Android is decreased from 8855 to 6276. It also gives us better control over our build.

BUG=webrtc:6440
TESTED=git cl try --clobber
NOTRY=True

Review-Url: https://codereview.webrtc.org/2441383002
Cr-Commit-Position: refs/heads/master@{#14821}
2016-10-28 12:44:07 +00:00
ivoc
9f4a4a096b Add empty residual echo detector.
This CL does not contain the actual algorithm, but only creates an empty processing component and connects the right signals to it. The algorithm will be added in a follow-up CL.

BUG=webrtc:6525

Review-Url: https://codereview.webrtc.org/2405403003
Cr-Commit-Position: refs/heads/master@{#14820}
2016-10-28 12:39:23 +00:00
peah
f005a00094 Added calling of the stream_analog_level api in audioproc_f
The test program audioproc_f does not call the stream_analog_level
method. This should be done do
1) Ensure that proper log output is produced when reproducing a call.
2) Ensure that this method is properly tested.
3) Ensure that the correct side-effects are triggered (this method
   is not const).

BUG=webrtc:6564

Review-Url: https://codereview.webrtc.org/2449043008
Cr-Commit-Position: refs/heads/master@{#14817}
2016-10-28 12:02:39 +00:00
ivoc
48dfab5c58 Revert of New statistics interface for APM (patchset #11 id:200001 of https://codereview.webrtc.org/2433153003/ )
Reason for revert:
This CL breaks internal dependencies.

Original issue's description:
> New statistics interface for APM
>
> This adds functions to enable and retrieve statistics from APM. These functions are not yet called, which will happen in a follow-up CL.
>
> BUG=webrtc:6525
>
> Committed: https://crrev.com/8b8d3e4c30e8ea3846b58dfd36d1fd35a7799df4
> Cr-Commit-Position: refs/heads/master@{#14810}

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

Review-Url: https://codereview.webrtc.org/2456333002
Cr-Commit-Position: refs/heads/master@{#14814}
2016-10-28 10:29:37 +00:00
peah
135259ac8f In order to be able to analyze the AGC behavior on
aecdump recordings in an efficient manner, it is
important to be able to use a standardized analysis
script. For this to be feasible, data log points should
be present.

This CL adds those logpoints as well as the framework
needed to for those to work.

BUG=webrtc:6564

Review-Url: https://codereview.webrtc.org/2457783003
Cr-Commit-Position: refs/heads/master@{#14812}
2016-10-28 10:12:15 +00:00
ivoc
8b8d3e4c30 New statistics interface for APM
This adds functions to enable and retrieve statistics from APM. These functions are not yet called, which will happen in a follow-up CL.

BUG=webrtc:6525

Review-Url: https://codereview.webrtc.org/2433153003
Cr-Commit-Position: refs/heads/master@{#14810}
2016-10-28 08:32:24 +00:00
Gordana.Cmiljanovic
11f72b1945 Fix compile error for non Intel platforms
Fixing compile error for non Intel platforms
when using C implemented fft functions
(for example, optimizations are not implemented for mips64el
and C functions must be used)

Adding bypass of presubmit to avoid code style and header
errors caused by the fact that files with legacy code are
being renamed.

NOPRESUBMIT=true
BUG=webrtc:6595
TEST=gn gen out-gn/mips64-android-webrtc --args="is_debug=false target_os=\"android\" target_cpu=\"mips64el\""
     ninja -C out-gn/mips64-android-webrtc audio_processing

Review-Url: https://codereview.webrtc.org/2442773002
Cr-Commit-Position: refs/heads/master@{#14808}
2016-10-28 06:44:15 +00:00
solenberg
059fb4480b - Replace FakeAudioProcessing in WVoE unittest with MockAudioProcessing.
- Update MockAudioProcessing to current APM interface.
- Replace calls to VoEAudioProcessing::Start/StopAecDump with direct calls on APM.
- Add AudioProcessing* in WVoE, get it from VoE, so we can call directly on APM.

BUG=webrtc:4690

Review-Url: https://codereview.webrtc.org/2446143002
Cr-Commit-Position: refs/heads/master@{#14786}
2016-10-26 12:12:29 +00:00
peah
701d628f5f Moved the AGC render sample queue into the audio processing module
Several subcomponents inside APM copy render audio from
the render side to the capture side using the same
pattern. Currently this is done independently for the
submodules.

This CL moves the the AGC functionality for this into
APM.

BUG=webrtc:5298, webrtc:6540

Review-Url: https://codereview.webrtc.org/2444283002
Cr-Commit-Position: refs/heads/master@{#14770}
2016-10-25 12:42:25 +00:00
peah
a062460a68 Several subcomponents inside APM copy render audio from
the render side to the capture side using the same
pattern. Currently this is done independently for the
submodules.

This CL moves the the AECM functionality for this into
APM.

BUG=webrtc:5298, webrtc:6540

Review-Url: https://codereview.webrtc.org/2444793005
Cr-Commit-Position: refs/heads/master@{#14768}
2016-10-25 11:45:32 +00:00
peah
764e364933 Several subcomponents inside APM copy render audio from
the render side to the capture side using the same
pattern. Currently this is done independently for the
submodules.

This CL moves the the AEC functionality for this into
APM.

BUG=webrtc:5298, webrtc:6540

Review-Url: https://codereview.webrtc.org/2427553003
Cr-Commit-Position: refs/heads/master@{#14726}
2016-10-22 12:04:35 +00:00
peah
897497361e Added the missing ReadQueuedRenderData() call to the AECM bitexactness test
BUG=webrtc:6573

Review-Url: https://codereview.webrtc.org/2437033002
Cr-Commit-Position: refs/heads/master@{#14725}
2016-10-22 11:00:44 +00:00
peah
12986c4534 Added the missing ReadQueuedRenderData() call to the gain controller bitexactness test
BUG=webrtc:6571

Review-Url: https://codereview.webrtc.org/2441603003
Cr-Commit-Position: refs/heads/master@{#14724}
2016-10-22 09:38:37 +00:00
peah
da38293e51 Added the missing ReadQueuedRenderData() call to the AEC bitexactness test
BUG=webrtc:6572

Review-Url: https://codereview.webrtc.org/2438733002
Cr-Commit-Position: refs/heads/master@{#14723}
2016-10-22 08:08:45 +00:00
peah
883ad662f4 Removed the deprecated audioproc executable
BUG=webrtc:6536

Review-Url: https://codereview.webrtc.org/2425583002
Cr-Commit-Position: refs/heads/master@{#14645}
2016-10-17 07:08:56 +00:00
peah
8f7cc7e77d This CL corrects the emptying of the render queues for the
AEC and AECM when these become full to also work when not
in debug mode.

BUG=webrtc:6530

Review-Url: https://codereview.webrtc.org/2419023002
Cr-Commit-Position: refs/heads/master@{#14637}
2016-10-14 10:23:39 +00:00
peah
73a28ee066 The AudioProcessing class is used as an interface
to the functionality in the audio processing module.
Therefore, it should be a pure interface.
This CL ensures that is the case.

BUG=webrtc:6515

Review-Url: https://codereview.webrtc.org/2406193002
Cr-Commit-Position: refs/heads/master@{#14608}
2016-10-12 10:01:57 +00:00
peah
c19f312f54 This CL adds functionality in the level controller to
receive a signal level to use initially, instead of the
default initial signal level.

The initial form of the CL
(https://codereview.webrtc.org/2254973003/) was reverted
due to down-stream  dependencies. These have been resolved,
but the CL needed to be revised according to the new scheme
for passing parameters to the audio processing module.
Therefore, please review this CL as if it is new.

TBR=aleloi@webrtc.org
BUG=webrtc:6386

Review-Url: https://codereview.webrtc.org/2337083002
Cr-Commit-Position: refs/heads/master@{#14579}
2016-10-07 21:54:15 +00:00
peah
81b9291dfd The FFT functionality in aec_rdft* is based on legacy C
code which is not thread-safe in the sense that the
rdft_init method can only be run in a single-threaded.

Currently, inside WebRTC multiple instances of the audio-
processing module are set up which means that the init
method may be run concurrently.

In order to avoid having to protect the init method with
a lock to ensure single-threaded behavior that, this CL
places the FFT functionality inside a class so that there
is no global component of the FFT functionality.

Note that:
1) The nonstandard header for the ooura_fft.cc was copied
   from the aec_rdft.cc header, and augmented with a
   description of the changes introduced in this CL.
2) The clang warnings for the ooura_fft_sse2.cc,
   ooura_fft_neon.cc and ooura_fft_mips.cc were not
   addressed as this code was kept as it was before this CL
3) Clang-format was run on all files apart from
   ooura_fft_mips.cc (as that would change the format of
   the inline assempbly code).

Adding bypass of presubmit to avoid code style and header errors caused by the fact that files with legacy code are being renamed.

NOPRESUBMIT=true

BUG=chromium:638583

Review-Url: https://codereview.webrtc.org/2348213002
Cr-Commit-Position: refs/heads/master@{#14554}
2016-10-06 13:46:27 +00:00
peah
8a9b0f8e02 The current format of the log output of the level controller differs from the rest of the log. Furthermore, it is hard to automatically parse. This CL changes the format to be a JSON-type format which does not have those issues.
BUG=webrtc:6408

Review-Url: https://codereview.webrtc.org/2364553003
Cr-Commit-Position: refs/heads/master@{#14489}
2016-10-04 07:06:10 +00:00
peah
6d3a1f922d Removed unused state variable in the AEC
BUG=webrtc:5298

Review-Url: https://codereview.webrtc.org/2364773003
Cr-Commit-Position: refs/heads/master@{#14486}
2016-10-04 06:25:26 +00:00
Kári Tristan Helgason
470c0887b3 Fix modules_unittests on iOS.
Some of the module tests were failing on iOS, causing them to be ignored
on the trybots. Specifically this CL:
- Skips some tests that should not run on the simulator
- Fixes iOS file system test helpers
- Fixes failing nalu parser unittest

BUG=webrtc:4752
R=henrika@webrtc.org, peah@webrtc.org, sprang@webrtc.org
TBR=tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/2352063002 .

Cr-Commit-Position: refs/heads/master@{#14472}
2016-10-03 11:13:33 +00:00
kwiberg
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
kwiberg
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +00:00
kjellander
b62dbbe985 GN: Change rtc_source_set targets --> rtc_static_library
This changes most non-test related rtc_source_set targets to be
rtc_static_library instead. Targets without any .cc files are excluded.
This should bring back the build behavior we used to have with GYP
(i.e. same symbols exported in the libjingle_peerconnection.a file, which
are used by some downstream projects).

After doing an Android build with these changes:
$ nm --defined-only -g -C out/Release/lib.unstripped/libjingle_peerconnection_so.so | grep -i createpeerconnectionf
00077c51 T Java_org_webrtc_PeerConnectionFactory_nativeCreatePeerConnectionFactory
$ nm --defined-only -g -C out/Release/obj/webrtc/api/libjingle_peerconnection.a | grep -i createpeerconnectionf
00000001 T webrtc::CreatePeerConnectionFactory(rtc::Thread*, rtc::Thread*, rtc::Thread*, webrtc::AudioDeviceModule*, cricket::WebRtcVideoEncoderFactory*, cricket::WebRtcVideoDecoderFactory*)
00000001 T webrtc::CreatePeerConnectionFactory()

See https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cookbook.md#Note-on-static-libraries
for more details on this.

NOTICE: This should be further cleaned up in the future, to reduce
binary bloat and unnecessary linking time. Right now it's more
important to restore the desired build output though.

BUG=webrtc:6410, chromium:630755

Review-Url: https://codereview.webrtc.org/2361623004
Cr-Commit-Position: refs/heads/master@{#14364}
2016-09-23 07:38:58 +00:00
Alejandro Luebs
ef00925cd0 Compensate for the IntelligibilityEnhancer processing delay in high bands
Before this CL, the IntelligibilityEnhancer introduced a processing delay to the lower band, without compensating for it in the higher bands. This CL corrects this.

BUG=b/30780909
R=henrik.lundin@webrtc.org, peah@webrtc.org

Review URL: https://codereview.webrtc.org/2320833002 .

Cr-Commit-Position: refs/heads/master@{#14311}
2016-09-20 21:52:08 +00:00
peah
de65ddc212 This CL renames variables and method and removes some one-line
methods inside the audio processing module for the purpose of
increasing code readability.

BUG=

Review-Url: https://codereview.webrtc.org/2335633002
Cr-Commit-Position: refs/heads/master@{#14269}
2016-09-16 22:02:22 +00:00
peah
2dc4cdeea7 Correcting the enabling of the level controller in the audio processing simulator
BUG=

Review-Url: https://codereview.webrtc.org/2337133005
Cr-Commit-Position: refs/heads/master@{#14247}
2016-09-16 07:01:39 +00:00
kwiberg
9e2be5f292 webrtc/modules/audio_processing: Use RTC_DCHECK() instead of assert()
Review-Url: https://codereview.webrtc.org/2320053003
Cr-Commit-Position: refs/heads/master@{#14211}
2016-09-14 12:23:29 +00:00
peah
d29e3ea4b2 Added build flag around the Intelligibility enhancer performance test code
BUG=chromium:641931

Review-Url: https://codereview.webrtc.org/2294093004
Cr-Commit-Position: refs/heads/master@{#14202}
2016-09-14 04:42:43 +00:00
kwiberg
d59d3bb117 Replace a DCHECK with static_assert
This requires marking a bunch of compile-time constants "constexpr"
instead of just "const".

Review-Url: https://codereview.webrtc.org/2335483003
Cr-Commit-Position: refs/heads/master@{#14199}
2016-09-13 14:49:41 +00:00
peah
88ac853e14 The current scheme for setting parameters and specifying the
behavior of the audio processing module is quite complex and hard to
implement in a threadsafe and efficient manner. Therefore a new
scheme for setting the parameters in the audio processing module is
introduced in this CL.

The idea is to roll this scheme out gradually and as a first functionality
in the audio processing module where this is applied the level controller
was chosen. This CL includes the replacement of the Config-based
level controller scheme with the new scheme.

TBR=henrik.lundin@webrtc.org, solenberg@webrtc.org,
BUG=webrtc:5298

Review-Url: https://codereview.webrtc.org/2338493002
Cr-Commit-Position: refs/heads/master@{#14190}
2016-09-12 23:47:32 +00:00
peah
a421ddd60e The buffering of the farend signal is refactored in this CL.
The former buffering scheme was overly complicated and
complex as.
-It buffered twice as many data points as needed.
-It used the ring_buffer C functionality directly inside the
 delay adjustment functionality which makes that
functionality very hard to read.

In order to overcome these problems this CL does
-Change the buffering to buffer only the amount of samples
 needed.
-Wrap the ring_buffer C functionality in a wrapper class
 with methods that are more descriptive in what they do
 to affect the AEC delay.

Additional notes:
-Some minor other name changes/code changes were also
 introduced.
-The ringbuffer C functionality should be removed, but now
 is not the time to do it as the rest of the code is very
 adapted to the wrapping behavior of the ringbuffer. It is
 better to simplify the surrounding code before doing that.

The changes have been tested to be bitexact.

This CL is chained to the CL https://codereview.webrtc.org/2321483002/
and will be followed by another CL.

BUG=webrtc:5298, webrtc:6018

Review-Url: https://codereview.webrtc.org/2319693003
Cr-Commit-Position: refs/heads/master@{#14188}
2016-09-12 18:27:20 +00:00
peah
8e56521143 The output signal of the AEC needs to be buffered as the
internal block size of the AEC differ from the frame
size in the AEC output.

Before this CL, this buffering was done using ringbuffers
as well as secondary internal AEC buffers that were stored
on the state. The internal buffers were redundant, and the
ringbuffers were so short that the benefit of using
ringbuffers were lost.

This CL addresses the above issues by replacing the
ringbuffers by linear buffers. This has the main advantage
of cleaner code but it should significantly less
computational complex.

Furthermore, as the complexity of the function where the
conversion to external and internal AEC frame sizes is done
increased significantly with the changes in this CL, the
CL also include refactoring the near-end buffer handling
to increase readability and reduce code repetition.

After the changes in this CL it is very clear that the
former buffering of the output was incorrectly done for
the first frames. This CL corrects that but in doing that
it breaks the bitexactness with the former code.
The bitexactness is, however, only broken for the first
1000 samples and it has been verified that for a test suite
the CL maintains bitexactness in the AEC output
after the first 1000 samples.

This CL is chained to the CL https://codereview.webrtc.org/2311833002/ and will be
followed by more CLs that refactor the other buffers
inside the AEC.

BUG=webrtc:5298, webrtc:6018

Review-Url: https://codereview.webrtc.org/2321483002
Cr-Commit-Position: refs/heads/master@{#14184}
2016-09-12 11:49:50 +00:00
kjellander
10f606d8de Revert of Introduced new scheme for controlling the functionality inside the audio processing module (patchset #12 id:260001 of https://codereview.webrtc.org/2292863002/ )
Reason for revert:
Interface change in the mock breaks downstream code.

Original issue's description:
> The current scheme for setting parameters and specifying the behavior
> of the audio processing module is quite complex and hard to implement
> in a threadsafe and efficient manner. Therefore a new scheme for setting
> the parameters in the audio processing module is introduced in this CL.
>
> The idea is to roll this scheme out gradually and as a first functionality
> in the audio processing module where this is applied the level controller
> was chosen. This CL includes the replacement of the Config-based
> level controller scheme with the new scheme.
>
> BUG=webrtc:5298
>
> Committed: https://crrev.com/c8bbe3fe9aad9e9a1189a42dcaa8f5d6c261ecc8
> Cr-Commit-Position: refs/heads/master@{#14171}

TBR=solenberg@webrtc.org,henrik.lundin@webrtc.org,peah@webrtc.org
BUG=webrtc:5298
NOTRY=True

Review-Url: https://codereview.webrtc.org/2334583002
Cr-Commit-Position: refs/heads/master@{#14177}
2016-09-12 06:04:37 +00:00
peah
2ace3f9406 The audio processing module (APM) relies on two for
functionalities  doing sample-rate conversions:
-The implicit resampling done in the AudioBuffer CopyTo,
 CopyFrom, InterleaveTo and DeinterleaveFrom methods.
-The multi-band splitting scheme.

The selection of rates in these have been difficult and
complicated, partly due to that the APM API which allows
for activating the APM submodules without notifying
the APM.

This CL adds functionality that for each capture frame
polls all submodules for whether they are active or not
and compares this against a cached result.
Furthermore, new functionality is added that based on the
results of the comparison do a reinitialization of the APM.

This has several advantages
-The code deciding on whether to analysis and synthesis is
 needed for the bandsplitting can be much simplified and
 centralized.
-The selection of the processing rate can be done such as
 to avoid the implicit resampling that was in some cases
 unnecessarily done.
-The optimization for whether an output copy is needed
 that was done to improve performance due to the implicit
 resampling is no longer needed, which simplifies the
 code and makes it less error-prone in the sense that
 is no longer neccessary to keep track of whether any
 module has changed the signal.

Finally, it should be noted that the polling of the state
for all the submodules was done previously as well, but in
a less obvious and distributed manner.

BUG=webrtc:6181, webrtc:6220, webrtc:5298, webrtc:6296, webrtc:6298, webrtc:6297

Review-Url: https://codereview.webrtc.org/2304123002
Cr-Commit-Position: refs/heads/master@{#14175}
2016-09-10 11:42:36 +00:00
peah
c8bbe3fe9a The current scheme for setting parameters and specifying the behavior
of the audio processing module is quite complex and hard to implement
in a threadsafe and efficient manner. Therefore a new scheme for setting
the parameters in the audio processing module is introduced in this CL.

The idea is to roll this scheme out gradually and as a first functionality
in the audio processing module where this is applied the level controller
was chosen. This CL includes the replacement of the Config-based
level controller scheme with the new scheme.

BUG=webrtc:5298

Review-Url: https://codereview.webrtc.org/2292863002
Cr-Commit-Position: refs/heads/master@{#14171}
2016-09-09 21:17:07 +00:00
Henrik Kjellander
a41c13e6a2 OWNERS: Make everyone able to change *.gn,*.gni files.
Project-wide change to make it possible for all team members
to do changes to GN files.

NOTRY=True
R=kwiberg@webrtc.org
TBR=henrika@webrtc.org

Review URL: https://codereview.webrtc.org/2320043002 .

Cr-Commit-Position: refs/heads/master@{#14163}
2016-09-09 12:51:48 +00:00
peah
906f403088 This CL refactors the buffering of the incoming near-end signal inside
the AEC. This solves the following issues:
-Even though the buffering was previously done using ringbuffers, those
  were inefficiently used which caused a lot of hidden memcopys.
-The ringbuffers wasted a lot of space in the AEC state as they were too
  long.
-The lowest and two upper bands were decoupled in the buffering, which
  required extra code to handle.
-On top of the ringbuffers there was a second linear buffer that was
  stored in the state which caused even more data to be stored on the
  state.
-The incoming nearend frames were passed to the functions in the form
  of buffers on the state, which made the code harder to read as it was
  not immediately clear where the nearend signal was used, and when it
  was modified.

The CL addresses this by replacing all the buffers by two linear buffers:
-One buffer before the AEC processing for producing nearend
  blocks of size 64 that can be processed by the AEC.
-One inside the AEC processing that buffers the current
  nearend block until the next block is processed.

The changes have been tested to be bitexact.
This CL will be followed by several other CLs, that refactor the other
buffers in the AEC.

BUG=webrtc:5298, webrtc:6018

Review-Url: https://codereview.webrtc.org/2311833002
Cr-Commit-Position: refs/heads/master@{#14141}
2016-09-08 16:49:50 +00:00
solenberg
88499ecaca Moving/renaming webrtc/common.h.
This file defines webrtc::Config which was mostly used by modules/audio_processing. The files webrtc/common.h, webrtc/common.cc and webrtc/test/common_unittests.cc are moved to modules/audio_processing and the few remaining uses of webrtc::Config are replaced with simpler code.

- For NetEq and pacing configuration, a VoEBase::ChannelConfig is passed to VoEBase::CreateChannel().
- Removes the need for VoiceEngine::Create(const Config& config). No need to store the webrtc::Config in VoE shared state.

BUG=webrtc:5879

Review-Url: https://codereview.webrtc.org/2307533004
Cr-Commit-Position: refs/heads/master@{#14109}
2016-09-07 14:34:45 +00:00
Alejandro Luebs
37062ed16f Fix chromium-style errors in IntelligibilityEnhancer
BUG=
R=henrik.lundin@webrtc.org, peah@webrtc.org

Review URL: https://codereview.webrtc.org/2308043002 .

Cr-Commit-Position: refs/heads/master@{#14094}
2016-09-06 18:25:50 +00:00
ehmaldonado
e9cc686293 GN Templates: Move common_inherited_config to the template.
Remove common_inherited_config from the targets and add it to the
template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2311843002
Cr-Commit-Position: refs/heads/master@{#14069}
2016-09-05 13:10:23 +00:00
ehmaldonado
7a2ce0b738 GN Templates: Move common_config to the template.
Remove common_config from the targets' config and add
it to the template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2300413002
Cr-Commit-Position: refs/heads/master@{#14063}
2016-09-05 08:35:48 +00:00
ehmaldonado
1dd2335023 GN Templates: Add //build/config/sanitizers:deps to rtc_executable.
Remove //build/config/sanitizers:deps as a dependency for
all rtc_executable targets and add it to the template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2308553002
Cr-Commit-Position: refs/heads/master@{#14048}
2016-09-02 14:03:23 +00:00
ehmaldonado
38a2132b02 GN: Introduce templates.
Defines the rtc_executable, rtc_source_set, rtc_test and
rtc_static_library templates.

These templates provide no functionality yet, but will enable common
configuration to be introduced, avoiding repetition in every target

Changes summary:
- Prepend rtc_ to test, source_set, executable and static_library targets
- Change "configs -= [" to "suppressed_configs += ["
- Include webrtc/build/webrtc.gni where it wasn't included yet
- Delete import("//testing/test.gni"), since rtc_test makes it unnecessary.

BUG=webrtc:6187
TBR=henrik.lundin@webrtc.org,tommi@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2301053002
Cr-Commit-Position: refs/heads/master@{#14043}
2016-09-02 11:10:41 +00:00
solenberg
f383c5754f - Remove unused unit test webrtc/modules/audio_processing/agc/agc_unittest.cc
- Remove webrtc/tools/agc/test_utils.cc/.h - only used from the above test.
- Remove webrtc/tools/agc/agc_harness.cc - not used anymore.

BUG=webrtc:4690

Review-Url: https://codereview.webrtc.org/2299023004
Cr-Commit-Position: refs/heads/master@{#14039}
2016-09-02 09:39:40 +00:00
peah
f28a389446 Moved the place for the aec_debug_dump build flag and changed the name to apm_debug_dump
Currently, the aec_debug_dump buildflag can and is used to store data in the whole of
the audio processing module. Therefore a more appropriate name is apm_debug_dump which
also matches the names of the data dumping functionality. This CL makes that name change.

The CL also changes the WEBRTC_AEC_DEBUG_DUMP define to
WEBRTC_APM_DEBUG_DUMP == 1

Furthermore, this CL moves the buildflag to a more appropriate place.

BUG=webrtc:5298

Review-Url: https://codereview.webrtc.org/2300813004
Cr-Commit-Position: refs/heads/master@{#14026}
2016-09-01 15:58:27 +00:00