643 Commits

Author SHA1 Message Date
peah
4510bbd5fc Minor cleaning up of the EchoCancellationImpl code
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11899}
2016-03-08 06:50:21 +00:00
peah
6ebc4d3f7d Changed name for the upcoming AEC from NextGenerationAec to AEC3.
BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#11895}
2016-03-08 00:59:43 +00:00
asapersson
a2c58e2198 Switch to use new implementation in metrics.h for gathering statistics.
Sparse macro replaced for all audio histograms that have a constant name.

BUG=webrtc:5283

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

Cr-Commit-Position: refs/heads/master@{#11885}
2016-03-07 09:53:08 +00:00
peah
50e21bd40b This CL introduces namespaces in the aec c++ files
(the ones that were recently moved from c)

There are many files changed but most changes just
consist of adding namespaces.

In aec_common.h an C++-specific #ifdef needed to be added as
that file is both included from C and C++. I could see no
way around that but please let me know if there is a better
way around that.

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#11883}
2016-03-05 16:39:30 +00:00
peah
b624d8c852 Removed the inheritance from ProcessingComponent for EchoCancellerImpl.
BUG=webrtc:5352

Committed: https://crrev.com/3af0a009f8a7f2dfb630a4f4730044cbbd95bee8
Cr-Commit-Position: refs/heads/master@{#11876}

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

Cr-Commit-Position: refs/heads/master@{#11881}
2016-03-05 11:01:22 +00:00
solenberg
92586f08e5 Revert of Removed the inheritance from ProcessingComponent for EchoCancellerImpl. (patchset #4 id:60001 of https://codereview.webrtc.org/1761813002/ )
Reason for revert:
Breaks all bots, e.g. https://uberchromegw.corp.google.com/i/client.webrtc/builders/Android32%20Builder/builds/6356/steps/compile/logs/stdio

Looks like a missing rebase before landing. Resolve and try again.

Original issue's description:
> Removed the inheritance from ProcessingComponent for EchoCancellerImpl.
>
> BUG=webrtc:5352
>
> Committed: https://crrev.com/3af0a009f8a7f2dfb630a4f4730044cbbd95bee8
> Cr-Commit-Position: refs/heads/master@{#11876}

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

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

Cr-Commit-Position: refs/heads/master@{#11877}
2016-03-04 20:29:08 +00:00
peah
3af0a009f8 Removed the inheritance from ProcessingComponent for EchoCancellerImpl.
BUG=webrtc:5352

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

Cr-Commit-Position: refs/heads/master@{#11876}
2016-03-04 20:13:38 +00:00
peah
20028c49c9 Removing the use of the soon-to-be-removed echo_cancellation_impl
api function that directly returns aec_core.

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#11875}
2016-03-04 19:51:03 +00:00
peah
88950cfbf9 Moved the file aec_resampler.c to be built using C++.
The steps involved were:
1) Change file name to .cc from .c.
2) Update the build files accordingly.
3) Remove the extern header file inclusion.
4) Change the casts in aec_resampler.cc to static_cast
   and reinterpret_cast.

The changes are bitexact.

The CL will be followed with another CL where a proper (webrtc) namespace is introduced. The reason for not having it in this CL is that this was missed in the corresponding
CL that did the above for aec_core.c, ..., and if the
namespaces in all the aec_core -related files can be changed
at the same time that will simplify things.

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#11867}
2016-03-04 08:12:43 +00:00
peah
0197363d18 A bitexactness test for the highpass filter in the
audio processing module.

The test also adds a new helper class called
VectorBasedAudioFrame that is intended to be
reused for the bitexactness tests for the other
submodules.

BUG=webrtc:1091

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

Cr-Commit-Position: refs/heads/master@{#11864}
2016-03-03 19:21:55 +00:00
peah
fc4ff2d92c Fixed Aec handle index in EchoCancellationImpl
that was not updated as it should.

The bug caused no negative impact at all apart
from a missed check that the Aec handles above
index 0 were not null. That check is, however,
done elsewhere so there was no negative impact
of this bug.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11863}
2016-03-03 19:20:32 +00:00
aluebs
a2abdf2fbe Remove usage of fmaf in IntelligibilityEnhancer
This produces bit-exact output and doesn't have the performance sensitivity to vectorisation, giving a complexity decrease of the IntelligibilityEnhancer of about 30x in my local machine.
This performance issue was put in evidence by this CL: https://codereview.webrtc.org/1693823004/

BUG=590998

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

Cr-Commit-Position: refs/heads/master@{#11851}
2016-03-03 02:36:55 +00:00
minyue
7b19b08c18 Reland "Calculating ERLE in AEC more properly."
The original CL (https://codereview.webrtc.org/1644133002/) had an error in the unittest and did not get landed. This CL is to reland it,

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11844}
2016-03-02 14:56:56 +00:00
minyuel
c9bbbe454f Revert "Calculating ERLE in AEC more properly."
This reverts commit 944744b25c76810e576516d2f676b1d9105e302f.

NOTRY=True
TBR=peah@webrtc.org,kjellander@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11817}
2016-02-29 14:20:54 +00:00
minyuel
944744b25c Calculating ERLE in AEC more properly.
The audio level of the AEC's output level was calculated before overlapping add, and therefore, a compensation was needed. The compensation is multiplying the level by 2 since, before overlapping add, the level is roughly halved due to windowing.

This had to be that way because the level was calculated in frequency domain and the signal after overlapping add has only its time domain representation.

The level calculation has been updated to work on time domain signal and therefore the problem is not there any longer.

This CL is to put the calculation of the AEC output level after overlapping add and remove the compensation.

BUG=
R=peah@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11810}
2016-02-29 12:09:07 +00:00
aluebs
0a00759780 Fix the stereo support in IntelligibilityEnhancer
Review URL: https://codereview.webrtc.org/1729753003

Cr-Commit-Position: refs/heads/master@{#11795}
2016-02-27 01:17:44 +00:00
Peter Boström
0e40f7cf87 Remove incorrect reinterpret_cast from const.
Code still compiles in Chromium with a proper const float* variable so
it is expected to address the issue.

BUG=chromium:589951
TBR=peah@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11772}
2016-02-25 21:37:00 +00:00
aluebs
f99af6b885 Fix the gain calculation in IntelligibilityEnhancer
Review URL: https://codereview.webrtc.org/1718793002

Cr-Commit-Position: refs/heads/master@{#11755}
2016-02-25 01:25:50 +00:00
kwiberg
c2b785df5d Replace scoped_ptr with unique_ptr in webrtc/common_audio/
(This is a re-land---without the real_fourier.h changes---of 11716, which was reverted in 11726.)

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#11742}
2016-02-24 13:22:40 +00:00
peah
8df5d4f15b Moved the AEC C code to be built using C++.
In order for the change to be reviewable, the
move was made into two steps consisting of the
first two patches in this CL.

Step 1 (patch set 1):
-Changed file types to use .cc
-Changed buildfiles to use the new files
-Changed C code inclusion to properly match the changed
 file formats (removed and added extern "C" declarations).
-Changed implicit void-> nonvoid casts that are
 illegal in C++ to be explicit.

Step 2 (patch set 2):
-Changed all the warnings reported when uploading the CL.
-The warnings about formatting of the assembly optimized
 code were not addressed though.

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#11727}
2016-02-23 22:35:03 +00:00
kjellander
e80f9d0218 Revert of Replace scoped_ptr with unique_ptr in webrtc/common_audio/ (patchset #4 id:60001 of https://codereview.webrtc.org/1712513002/ )
Reason for revert:
Breaks downstream compilation using webrtc/common_audio/real_fourier.h. Let's chat tomorrow on how to coordinate a re-land.

Original issue's description:
> Replace scoped_ptr with unique_ptr in webrtc/common_audio/
>
> BUG=webrtc:5520
>
> Committed: https://crrev.com/79d7a499c0c3e1de8f5ad1138236f0386701053f
> Cr-Commit-Position: refs/heads/master@{#11716}

TBR=henrik.lundin@webrtc.org,kwiberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#11726}
2016-02-23 21:33:39 +00:00
kwiberg
79d7a499c0 Replace scoped_ptr with unique_ptr in webrtc/common_audio/
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#11716}
2016-02-23 09:26:52 +00:00
Alejandro Luebs
18fcbcf48c Use VAD to get a better speech power estimation in the IntelligibilityEnhancer
R=henrik.lundin@webrtc.org, turaj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11713}
2016-02-22 23:57:45 +00:00
peah
253d8fa82c Simplified the function for detecting whether capture data is modified.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11704}
2016-02-22 10:00:13 +00:00
kwiberg
88788adcfd Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#11684}
2016-02-19 15:04:56 +00:00
Alejandro Luebs
4458d09ee4 Drop support for playing output through aplay in intelligibility_proc
It was hardly used, making the code more complex than needed and caused problems on iOS because it uses system.

BUG=webrtc:5549
R=kjellander@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11677}
2016-02-19 03:16:17 +00:00
kjellander@webrtc.org
66a99283be Roll chromium_revision 1d144ca..fa5d546 (375480:376142)
* Disable iOS warnings triggered by moving from ios_deployment_target 7.0 to 9.0
(see 1d144ca..fa5d546/build/common.gypi)
* Fix errors that will fail when MSVS 2015 is rolled in (coming soon).
* Start using sysroot for building on Linux since http://crbug.com/561584 has been fixed.

Change log: 1d144ca..fa5d546
Full diff: 1d144ca..fa5d546

Changed dependencies:
* src/third_party/libyuv: 903c91c..20343f4
* src/tools/gyp: 2f9ffdc..ed163ce
DEPS diff: 1d144ca..fa5d546/DEPS

No update to Clang.

TBR=
BUG=webrtc:5549
NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#11673}
2016-02-18 19:30:25 +00:00
Alejandro Luebs
32348192cc Fix and simplify the power estimation in the IntelligibilityEnhancer
R=henrik.lundin@webrtc.org, turaj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11663}
2016-02-18 04:04:25 +00:00
kwiberg
dabf07f477 Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/vad/
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#11657}
2016-02-17 15:59:51 +00:00
kwiberg
62eaacf5ee Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/test/
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#11653}
2016-02-17 14:39:13 +00:00
peah
a332e2d3af Added boilerplate code for being able to test the upcoming
AEC functionality.

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#11647}
2016-02-17 09:11:24 +00:00
kwiberg
85d8bb025a Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/transient/
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#11645}
2016-02-17 04:39:43 +00:00
peah
58cf5f14ec Changed order of events when synthesizing a call.
This is needed when synthesizing a call based on
48 kHz audio files as otherwise an error is
generated about the wrong sample rate is generated.
That error is in turned caused by the sample rate
being changed from the default 16 kHz
at the first Capture API call event.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11635}
2016-02-16 15:26:25 +00:00
peah
be61562bfb Moved the GainControlForNewAGC class to be a separate file.
Apart from being motivated in order to make the source files shorter
this is needed when separating the APM submodules structs into
separate files.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11611}
2016-02-14 00:40:53 +00:00
aluebs
73e2373af2 Fix negative shift exponent in WPDTree
BUG=webrtc:5510

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

Cr-Commit-Position: refs/heads/master@{#11585}
2016-02-11 19:03:04 +00:00
Alejandro Luebs
66d2481106 Fix division by zero errors in IntelligibilityEnhancer
BUG=webrtc:5509
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11584}
2016-02-11 18:37:23 +00:00
Alejandro Luebs
42d8aa77d8 Fix IntelligibilityEnhancerTest.TestRenderUpdate test
TBR=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11561}
2016-02-11 00:10:37 +00:00
aluebs
c466badd86 Using the NS noise estimate for the IE
Review URL: https://codereview.webrtc.org/1672343002

Cr-Commit-Position: refs/heads/master@{#11559}
2016-02-10 20:03:05 +00:00
jbauch
541f1869ca Cleanup temporary files created by tests.
This CL removes some temporary files created by OptionsFileTest and
TransientFileUtilsTest.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11554}
2016-02-10 17:10:00 +00:00
peah
1147b75b52 Moved buffering of farend into the EchoSubtraction method.
This makes sense since the buffered data is only used by
the echo subtraction method. Furthermore, it simplifies the
upcoming modifications to the echo subtraction method since
the way the buffering is done can then be specific for the
echo subtraction implementation used.

The change is bitexact and this was verified using a fairly
extensive bitexactness suite.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11547}
2016-02-10 11:55:38 +00:00
Alejandro Luebs
fa639f0bb3 Surface the noise estimate of the NS to be used by other components
R=henrik.lundin@webrtc.org, turaj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11541}
2016-02-09 19:24:51 +00:00
kjellander
78ddd733b0 Update path for audioproc_debug proto output.
This will make it align with protoc tools that use the relative
path from the project root to the files in the output path.
Having this, no hacks will need to be applied downstream.

TBR=henrik.lundin@webrtc.org
NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#11540}
2016-02-09 16:13:16 +00:00
peah
48fa27136a Made implicit casts in the echo canceller explicit.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11501}
2016-02-05 11:16:27 +00:00
kjellander
988d31eb9b Move gtest_prod_util.h out of webrtc/test tree.
This is needed because the target is defined in webrtc/common.gyp
and its current location crosses package boundaries when generating
projects for some build systems.

NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#11496}
2016-02-05 08:23:57 +00:00
conceptgenesis
3f70562bbb Fix WebRtc ninja x86 build using Visual Studio 2015 (set GYP_MSVS_VERSION=2015).
Visual Studio 2015 balks at the implicit truncation of values. Easily fixed with an explicit cast.

Fixed redefinition of CLOCKS_PER_SEC when using Visual Studio 2015 and the Windows 10 SDK. CLOCKS_PER_SEC is also defined in "<WIN10 SDK DIR>\include\10.0.10240.0\ucrt\time.h" and also has the value of 1000

Hiding snprintf definition if building with Visual Studio 2015

Fixed C4573 compiler complaint in audio_processing_impl_locking_unittest.cc.

BUG=webrtc:5183

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

Cr-Commit-Position: refs/heads/master@{#11434}
2016-01-30 22:40:52 +00:00
peah
ff63ed2888 Format changes achieved by running
clang-format -i -style=Chromium

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11427}
2016-01-29 15:46:18 +00:00
tommi
533a4e4882 Switch critical section locks out for atomic operations
BUG=chromium:581029

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

Cr-Commit-Position: refs/heads/master@{#11413}
2016-01-28 10:44:16 +00:00
minyue
691b8369ff Using buffered signal to calculate the level of echo cancellation.
The level of the error signal after linear echo cancellation was based on non-buffered signal while that of the near-end and far-end signal based on buffered signal. This discrepancy made the comparison of them unfair.

This CL is to make calculating the error level rely on the same buffering.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11408}
2016-01-27 23:44:59 +00:00
pbos
5ad935cb56 Remove mutable from rtc::CriticalSection members.
rtc::CriticalSection is now lockable from const methods and no longer
need to remain mutable.

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11367}
2016-01-25 11:52:53 +00:00
minyue
9846845da6 Calculate audio levels in AEC in time domain.
In AEC, audio levels are calculated in frequency domain. This makes the calculation dependent on FFT. We now make the calculation performed in time domain. The complexity is the same, but the dependence on FFT is removed.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11357}
2016-01-22 13:46:47 +00:00