171 Commits

Author SHA1 Message Date
peah
44c8a373a5 Removed the file echo_cancellation_internal.h and moved
the file content to echo_cancellation.h.

The purpose of this CL is to simplify upcoming AEC algorithm
changes.

The changes should be bitexact.

BUG=webrtc:5298, webrtc:5201

Review-Url: https://codereview.webrtc.org/1947743004
Cr-Commit-Position: refs/heads/master@{#12638}
2016-05-05 20:34:35 +00:00
peah
3f08dc656d Introduced the new APM data logging functionality into the AEC echo_cancellation.* API layer.
BUG=webrtc:5298

Review-Url: https://codereview.webrtc.org/1952593002
Cr-Commit-Position: refs/heads/master@{#12635}
2016-05-05 10:04:05 +00:00
minyue
3815655541 Change aggregation window of aecDivergentFilterFraction to 1 second.
BUG=

Review-Url: https://codereview.webrtc.org/1942183002
Cr-Commit-Position: refs/heads/master@{#12617}
2016-05-03 21:42:50 +00:00
peah
7dd7ab5c51 Changed the name of the variable overdriveSm and removed the
state as an input to OverdriveAndSuppress in the AEC.

This CL is step towards simplifying the AEC code, making it more
modifiable and modular.

The changes should be bitexact.

BUG=webrtc:5201, webrtc:5298

Review-Url: https://codereview.webrtc.org/1939723002
Cr-Commit-Position: refs/heads/master@{#12616}
2016-05-03 21:08:17 +00:00
peah
b46083ed63 This CL introduces a new data logging functionality
to use for the APM. It allows simple and rapid
additions of exploratory data logpoints to use
during bug investigations and module performance
analysis.
The new data logging functionality is also in this CL
used to replace the existing data logging functionality
present in the AEC.

Additional information:
As there was an issue with that the build flag for
activating this feature was not present in all
compilation units that included the feature additional
changes were needed. A summary of the changes are
-The build files were modified to ensure that the
 logging build flag always is set to either 0 or 1
 for compilation units that include the feature.
-Build-time checks in the appropriate places were added
 to ensure that the above is fulfilled.
-The build object was added dynamically to the AEC state
 as a pointer to ensure that the size of that state is not
 dependent on whether the logging build flag is set or not.
-The constructor of the AEC class needed to be modified in
 order to construct the logging object. For this a destructor
 was also needed.
-An unused method without any declaration was removed in
 order to avoid any issues with the logging flag being set to
 0 or 1.

This CL will be immediately followed with an upcoming CL
that replaces the logging in echo_cancellation.cc with the
new functionality which will ensure that the  logging flag
is only used in one place within WebRTC, which in turn will
fully ensure that all compilation units that uses the feature
also have the flag properly set.

BUG=webrtc:5201, webrtc:5298

Review-Url: https://codereview.webrtc.org/1877713002
Cr-Commit-Position: refs/heads/master@{#12607}
2016-05-03 14:01:27 +00:00
kwiberg
4485ffb58d #include "webrtc/base/constructormagic.h" where appropriate
Any file that uses the RTC_DISALLOW_* macros should #include
"webrtc/base/constructormagic.h", but a shocking number of them don't.
This causes trouble when we try to wean files off of #including
scoped_ptr.h, since a bunch of files get their constructormagic macros
only from there.

Rather than fixing these errors one by one as they turn up, this CL
simply ensures that every file in the WebRTC tree that uses the
RTC_DISALLOW_* macros #includes "webrtc/base/constructormagic.h".

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12509}
2016-04-26 15:14:48 +00:00
minyue
2b6707826e Cleaning up AEC metrics.
Current implementation of AEC metrics does not read nicely. It messes up between a noise-removed calculation and a raw calculation.

I tried to clean it up, in which, I stick to the raw calculation since the noise-removed version can show some problem when the noise is overestimated.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12455}
2016-04-21 09:07:17 +00:00
peah
594a877f2d Cleaned up the EchoSuppression method in the AEC so that it
does not have to use the aec state as an input.

Furthermore, the debug dump output of e_fft was removed as
it is not really used in any analysis scripts.

BUG=webrtc:5298

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

Cr-Commit-Position: refs/heads/master@{#12387}
2016-04-16 11:04:04 +00:00
peah
0332c2db39 Added support in the AEC for refined filter adaptation.
The following algorithmic functionality was added:
-Add support for an exact regressor power to be computed
 which avoids the issue with the updating of the filter
 sometimes being unstable.
-Lowered the fixed step size of the adaptive filter to 0.05
 which significantly reduces the sensitivity of the
 adaptive filter to near-end noise, nonlinearities,
 doubletalk and the unmodelled echo path tail. It also
 reduces the tracking speed of the adaptive filter but the
 chosen value proved to give a sufficient tradeoff for the
 requirements on the adaptive filter.

To allow the new functionality to be selectively applied the following was done:
-A new Config was added for selectively activating the functionality.
-Functionality was added in the audioprocessing  and echocancellationimpl classes
 for passing the activation of the functionality down to the AEC algorithms.

To make the code for the introduction of the functionality clean,
the following refactoring was done:
-The selection of the step size was moved to a single place.
-The constant for the step size of the adaptive filter in extended filter mode was
 made local.
-The state variable storing the step-size was renamed to a more describing name.

When the new functionality is not activated, the changes
have been tested for bitexactness on Linux.

TBR=minyue@webrtc.org
BUG=webrtc:5778, webrtc:5777

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

Cr-Commit-Position: refs/heads/master@{#12384}
2016-04-15 18:23:36 +00:00
peah
21a395ddf7 Moved the aec_rdft*.c files to be build using C++
BUG=webrtc:5298
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#12346}
2016-04-13 14:53:57 +00:00
peah
bdb7af692f Changed the delay estimator to be built using C++
BUG=webrtc:5724
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#12336}
2016-04-12 21:47:46 +00:00
minyue
5045337133 Pulling AEC divergent filter fraction.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#12279}
2016-04-07 13:36:49 +00:00
minyue
e10fc3fb2d Adding fraction of filter divergence in AEC metrics.
With the current AEC algorithm, the divergence of the echo cancelling linear filter is a strong signal of non-transparency. During double talk, it can result in a ducking artifacts.

In this CL, a metric that tells the fraction of filter divergence is added. This can measure the severity of non-transparency.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12276}
2016-04-07 09:57:00 +00:00
peah
fc3ef3e5c1 Removed unused code and simplified the code for the AEC metrics
BUG=

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

Cr-Commit-Position: refs/heads/master@{#12258}
2016-04-06 09:28:32 +00:00
peah
faed4ab24b Revert of Moved ring-buffer related files from common_audio to audio_processing" (patchset #2 id:20001 of https://codereview.webrtc.org/1858123003/ )
Reason for revert:
Because of down-stream dependencies, this CL needs to be reverted.

The dependencies will be resolved and then the CL will be relanded.

Original issue's description:
> Revert "Revert of Moved ring-buffer related files from common_audio to audio_processing (patchset #8 id:150001 of https://codereview.webrtc.org/1846903004/ )"
>
> This reverts commit c54aad6ae07fe2a44a65be403386bd7d7d865e5b.
>
> BUG=webrtc:5724
> NOPRESUBMIT=true
>
> Committed: https://crrev.com/8864fe5e08f8d8711612526dee9a812adfcd3be1
> Cr-Commit-Position: refs/heads/master@{#12247}

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

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

Cr-Commit-Position: refs/heads/master@{#12248}
2016-04-05 21:57:55 +00:00
peah
8864fe5e08 Revert "Revert of Moved ring-buffer related files from common_audio to audio_processing (patchset #8 id:150001 of https://codereview.webrtc.org/1846903004/ )"
This reverts commit c54aad6ae07fe2a44a65be403386bd7d7d865e5b.

BUG=webrtc:5724
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#12247}
2016-04-05 21:42:51 +00:00
peah
c54aad6ae0 Revert of Moved ring-buffer related files from common_audio to audio_processing (patchset #8 id:150001 of https://codereview.webrtc.org/1846903004/ )
Reason for revert:
This CL caused a google3 breakage due to dependencies in Google3.

I will fix that, and reland.

Original issue's description:
> Moved ring-buffer related files from common_audio to audio_processing
>
> BUG=webrtc:5724
> NOPRESUBMIT=true
>
> Committed: https://crrev.com/711ccc8d96490f58cc3d7fd9207c19d4d881d4dc
> Cr-Commit-Position: refs/heads/master@{#12227}

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

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

Cr-Commit-Position: refs/heads/master@{#12232}
2016-04-05 07:02:35 +00:00
peah
6c393244b0 Revert of Moved the ringbuffer to be built using C++ (patchset #2 id:20001 of https://codereview.webrtc.org/1851873003/ )
Reason for revert:
This CL is dependent on the  CL https://codereview.webrtc.org/1846903004/ which caused a google3 breakage due to dependencies in Google3.

I will fix that, and reland this CL.

Original issue's description:
> Moved the ringbuffer to be built using C++
>
> BUG=webrtc:5724
>
> Committed: https://crrev.com/677e5774eaf287fa02f75fd5c8ad3f9ded9ed9c4
> Cr-Commit-Position: refs/heads/master@{#12230}

TBR=ivoc@webrtc.org,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:5724

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

Cr-Commit-Position: refs/heads/master@{#12231}
2016-04-05 07:00:50 +00:00
peah
677e5774ea Moved the ringbuffer to be built using C++
BUG=webrtc:5724

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

Cr-Commit-Position: refs/heads/master@{#12230}
2016-04-05 06:58:21 +00:00
peah
711ccc8d96 Moved ring-buffer related files from common_audio to audio_processing
BUG=webrtc:5724
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#12227}
2016-04-05 05:57:48 +00:00
minyue
84db6fa7f5 Adding BlockMeanCalculator for AEC.
This will improve the readability of AEC code.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12123}
2016-03-24 21:36:33 +00:00
minyue
6a85d3450c Fixing UpdateLevel function in AEC.
From an earlier CL, we start to feed UpdateLevel() with power instead of energy. I found that UpdateLevel() is still taking the input as energy and normalize it. This CL fixes this.

The earlier CL is
https://codereview.webrtc.org/1542573002/

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12084}
2016-03-22 09:15:01 +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
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
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
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
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
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
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
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
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
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
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
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
Peter Boström
e2976c87f7 Remove DISABLED_ON_ macros.
Macro incorrectly displays DISABLED_ON_ANDROID in test names for
parameterized tests under --gtest_list_tests, causing tests to be
disabled on all platforms since they contain the DISABLED_ prefix rather
than their expanded variants.

This expands the macro variants to inline if they're disabled or not,
and removes building some tests under configurations where they should
fail, instead of building them but disabling them by default.

The change also removes gtest_disable.h as an unused include from many
other files.

BUG=webrtc:5387, webrtc:5400
R=kjellander@webrtc.org, phoglund@webrtc.org
TBR=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11150}
2016-01-04 21:44:16 +00:00
minyue
92594a30ce Moving FFT on farend signal to where it is used in AEC (bit exact).
Currently, FFT is performance when AEC buffers farend signal. This has some drawbacks
1. memory inefficiency: two ring buffers are needed;
2. computation inefficiency: if ringbuffer gets wrapped around, some FFT computation will be wasted;
3. accessibility: the main AEC function looses accessibility to the time-domain signal.

Therefore, this CL tries to buffer time domain data, which is buffered any way if a debugging macro is defined, and calculate the FFTs where they are actually used.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11091}
2015-12-18 23:31:19 +00:00
peah
0bc176b99b Further refactored the echo suppressor code:
-Extended the InverseFft function to be more generally
 applicable.
-Included the previous external extra scaling into the
 preexisting InverseFft call.
-Moved the updating of aec->delayEstCtr to where it is
 actually used.
-Refactored the output production and comfort noise
 addition using the InverseFft function.
-Removed the if-statements checking the value of the
 constant flagHbandCn as any value different from 1 would
 crash the program. Also removed the constant

The changes have been tested for bitexactness.

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#11054}
2015-12-16 16:11:24 +00:00
peah
99b1a32146 Retyped the frequency estimate of the comfort noise for the higher band to harmonize the AEC code.
-Changed the type for the frequency estimate of the comfort noise for the
 higher band to be a two dimensional float array instead of a complex_t array.
 This makes sense since all the other frequency estimate (apart from the
 coherence) use this format and doing this change allows bundling the
 IFFT operations into using the InverseFFT method.
-Moved the memset of the frequency estimate of the comfort noise to where it is used and made it conditional so that it is only performed when used.
-Harmonized the if-statements for when the frequency estimate of the comfort noise is computed in the different optimized ComfortNoise computation methods.

The changes have been tested for bitexactness.

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#11050}
2015-12-16 14:07:33 +00:00
peah
48bf2382d9 Some further minor bitexact APM echo suppressor refactoring
-Moved memsets to where their variables are used.
-Removed redundant.
-Changed a pointer scalar to be accessed in pointer notation rather than
 in array notation.

The change has been tested for bitexactness.

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#10963}
2015-12-10 05:24:56 +00:00
peah
b14f00113e Some minor (bitexact) AEC echo suppressor refactoring
-Moved filter reset from the echo suppression
 into the echo subtraction code where it belongs
 (the echo subtractor should own its filter reset).
-Moved the selection between using the microphone sinal and
 the echo subtractor output down to the lowest level in the
 EchoSuppression function. This makes sense as that selection
 was very hidden in an unrelated sub-sub-function call and
 as the selection is critical for what the AEC outputs.

The changes have been tested for bitexactness.

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#10956}
2015-12-09 19:07:27 +00:00
peah
afeb43897a Moved code into the lowest level of EchoSuppression
to simplify future refactoring and development.

In more detail:
1) Moved the updating of eBuf from the EchoSubtraction method
   to the EchoSuppression method as it is only used in the latter.
2) Moved the computation of efw and dfw from the SubbandCoherence method
   as those are actually the analysis filterbank computation that is not
   directly related to the coherence.
3) As a consequence of 2) 3 functions needed to be replaced by the
   generic function pointer scheme used in WebRTCAec as they have
   optimized versions for SSE2 and NEON (which before were local to each
   of the aec_core*.c files.

Motivation:
Apart from making sense from a logical point of view, the changes will
a) Allow eBuf stored in half the size on the state.
b) Allow simpler switching between using the the microphone signal
   and echo subtractor output in the echo suppressor.
c) Allow further refactoring that move all the changes to eBuf to one method
   (currently those are happening in at least 4 different methods.

Drawbacks:
i) dfw is moved to EchoSuppression which increases the stack usage for that
 method. This will, however, be improved once further refactoring can be done.

The changes have been tested for bitexactness on Linux using a quite extensive dataset.

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#10954}
2015-12-09 16:50:29 +00:00
peah
7e43138c08 -Removed the state as an input to the FilterAdaptation function.
-Renamed the TimeToFrequency and FrequencyToTime functions.
-Moved the windowing from the TimeToFrequency function.
-Simplified the EchoSubtraction function.

Note that the aec state is still an input to the EchoSubtraction function, and it currently needs to be that in order to support the output of the debug file. The longer-term goal is, however, to order the state into substates. This will simplify the parameter lists to the EchoCancellation function as well as replace the aec state as a parameter

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#10830}
2015-11-27 23:24:32 +00:00
peah
54eb5e2e9a Removed the aec state as an input parameter to the FilterFar function.
BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#10787}
2015-11-25 15:43:20 +00:00
peah
d860523112 First part of the preparatory work before the actual work for solving the ducking problem starts.
This works aims to:
-More clearly separate the functionalities in the AEC.
-Make the inputs and outputs to functions more clear (currently the state struct is often passed as a parameter to the functions and the functions use members of the state both as inputs and outputs, which reduces the readability of the code and makes it difficult to change/refactor.

What is done in this CL:
-Most of what belongs to the echo subtraction functionality has been moved to a separate function.
-The NonLinearProcessing function has been renamed to EchoSuppressor which I think is more appropriate.
-Part of the code was replaced by a call to the TimeToFrequency function (which was also suggested by an existing todo).
-For consistency, a function FrequencyToTime doing the opposite of TimeToFrequency was added and part of the code was moved to that.
-The ScaleErrorSignal function was changed to no longer have the state as an input parameter. This entailed also changing the corresponding assembly optimized files accordingly.

Testing:
-The changes have been tested for bitexactness on Linux using a fairly extensive test.
-All the unittests pass on linux.

BUG=webrtc:5201

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

Cr-Commit-Position: refs/heads/master@{#10764}
2015-11-24 07:05:49 +00:00
Henrik Kjellander
9b72af94cd Remove webrtc/modules/audio_processing/{aec,aecm,ns}/include
BUG=webrtc:5095
TESTED=git cl try -c --bot=android_compile_rel --bot=linux_compile_rel --bot=win_compile_rel --bot=mac_compile_rel --bot=ios_rel --bot=linux_gn_rel --bot=win_x64_gn_rel --bot=mac_x64_gn_rel --bot=android_gn_rel -m tryserver.webrtc
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10608}
2015-11-11 19:16:28 +00:00
peah
c12be3984f -Removed the indirect error message reporting in aec and aecm.
-Made the component error messages generic to be an unspecified error message.

BUG=webrtc:5099

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

Cr-Commit-Position: refs/heads/master@{#10570}
2015-11-10 07:53:53 +00:00
Henrik Kjellander
98f53510b2 system_wrappers: rename interface -> include
BUG=webrtc:5095
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10438}
2015-10-28 17:17:50 +00:00
peah
fc9dd1710d Added boundary check for array access as a short-term way of fixing the bug of out-of-bounds reads into the array
BUG=chromium:529527, chromium:529552

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

Cr-Commit-Position: refs/heads/master@{#9930}
2015-09-14 13:54:03 +00:00