Commit Graph

43 Commits

Author SHA1 Message Date
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
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
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
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
83ffe453ec Fix Chromium clang plugin warnings
NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2288153002
Cr-Commit-Position: refs/heads/master@{#13964}
2016-08-29 21:46:14 +00:00
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
7789fe7ab1 Added a protobuf field for the audio processing module to store the status of temporary experimental features that
are active in the module and its submodules.

BUG=webrtc:5778, webrtc:5777

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

Cr-Commit-Position: refs/heads/master@{#12371}
2016-04-15 08:19:47 +00:00
dc2242d351 Added a query function for whether submodules are enabled
that can be called from the render side without making APM
singlethreaded.

This CL is addressing the problems with high render-side
call duration that were triggered by the CL
https://codereview.webrtc.org/1844583003

BUG=webrtc:5736

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

Cr-Commit-Position: refs/heads/master@{#12266}
2016-04-06 16:31:07 +00:00
85fa7d5311 Move swap_queue.h to base/
This will let us use the SwapQueue as a message queue for the event log's output thread. See https://codereview.webrtc.org/1687703002/

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

Cr-Commit-Position: refs/heads/master@{#12113}
2016-03-24 08:51:59 +00:00
b58a158fce Removed the AudioProcessing dependency in EchoCancellerImpl.
This CL removes the dependency of AudioProcessing in
EchoCancellerImpl. It is breaking the public APM API by
having a different error code behavior so please review it
carefully. I made a comment about the API breaking change
in the code section of this CL.

BUG=webrtc:5337

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

Cr-Commit-Position: refs/heads/master@{#11998}
2016-03-15 16:34:28 +00:00
737f4b8d12 Removed the ProcessingComponent class
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11950}
2016-03-11 07:05:37 +00:00
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
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
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
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
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
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
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
6955870806 Convert channel counts to size_t.
IIRC, this was originally requested by ajm during review of the other size_t conversions I did over the past year, and I agreed it made sense, but wanted to do it separately since those changes were already gargantuan.

BUG=chromium:81439
TEST=none
R=henrik.lundin@webrtc.org, henrika@webrtc.org, kjellander@webrtc.org, minyue@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11229}
2016-01-13 00:26:55 +00:00
df3efa8c07 Introduced the new locking scheme
BUG=webrtc:5099

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

Cr-Commit-Position: refs/heads/master@{#10836}
2015-11-28 20:35:18 +00:00
81b9bfe685 Added a threadchecking scheme to APM that checks that the APM API calls are called from the correct threads. The actual threadcheckers were, however, removed and will be reintroduced in another upcoming CL.
BUG=webrtc:5099

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

Cr-Commit-Position: refs/heads/master@{#10817}
2015-11-27 10:47:36 +00:00
2446e5a2de Fixed the render queue item size preallocation and verification, moved constant declarations, removed redundant queue allocation
BUG=

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

Cr-Commit-Position: refs/heads/master@{#10689}
2015-11-18 14:11:18 +00:00
fa6228e221 Introduced the render sample queue for the aec and aecm.
BUG=webrtc:5099

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

Cr-Commit-Position: refs/heads/master@{#10662}
2015-11-17 00:27:50 +00:00
13b96ba90f Adding APM configuration in AEC dump.
The AEC dump was not self-contented enough in the sense that APM configuration is missing, and therefore, given an AEC dump, it is sometimes not clear how to reproduce problems.

This CL tries to address the problem.

Note that this cannot guarantee a perfect reproduction in all cases. Dumping from the middle of a call makes the initial states unknown and thus may make the result non-reproducible.

BUG=
TEST= 1. new dump in Chromium and unpack
      2. unpack old dump

R=andrew@webrtc.org, peah@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10155}
2015-10-02 22:39:27 +00:00
0f133b99c6 Rename APM Config ReportedDelay to DelayAgnostic
We use this Config struct for enabling/disabling the delay agnostic
AEC. This change renames it to DelayAgnostic for readability reasons.

NOTE: The logic is reversed in this CL. The old ReportedDelay config
turned DA-AEC off, while the new DelayAgnostic turns it on.

The old Config is kept in parallel with the new during a transition
period. This is to avoid problems with API breakages. During this
period, ReportedDelay is disabled or DelayAgnostic is enabled, DA-AEC
is engaged in APM.

BUG=webrtc:4651
R=bjornv@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9531}
2015-07-02 07:17:59 +00:00
441f634731 Re-land r9378 "Rename APM Config DelayCorrection to ExtendedFilter"
(This reverts commit 3fbf3f8841b5460503fb646eaedcb063620434a8.)

The original submission was reverted because it broke the Chrome build. This is fixed in patch set 2 of this change by keeping the old MediaConstraintsInterface string kExperimentalEchoCancellation. It will be removed once the Chrome code has been updated.

Original description:
"We use this Config struct for enabling/disabling Extended filter mode in AEC. This change renames it to ExtendedFilter for readability reasons. The corresponding media constraint is also renamed to kExtendedFilterEchoCancellation.

The old Config is kept in parallel with the new during a transition period. This is to avoid problems with API breakages. During this period, if any of the two Configs are enabled, the extended filter mode is engaged in APM. That is, the two Configs are combined with an "OR" operation.

This change also renames experimental_aec in AudioOptions to extended_filter_aec."

BUG=webrtc:4696
R=bjornv@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9401}
2015-06-09 14:03:23 +00:00
3fbf3f8841 Revert r9378 "Rename APM Config DelayCorrection to ExtendedFilter"
This reverts commit 5f4b7e2873864c61e2ad6d88679dcd5d321bfd16, since it
broke some of the build bots.

BUG=4696
TBR=bjornv@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9380}
2015-06-05 09:04:20 +00:00
5f4b7e2873 Rename APM Config DelayCorrection to ExtendedFilter
We use this Config struct for enabling/disabling Extended filter mode
in AEC. This change renames it to ExtendedFilter for readability
reasons. The corresponding media constraint is also renamed to
kExtendedFilterEchoCancellation.

The old Config is kept in parallel with the new during a transition
period. This is to avoid problems with API breakages. During this
period, if any of the two Configs are enabled, the extended filter
mode is engaged in APM. That is, the two Configs are combined with an
"OR" operation.

This change also renames experimental_aec in AudioOptions to extended_filter_aec.

BUG=4696
R=bjornv@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/54659004

Cr-Commit-Position: refs/heads/master@{#9378}
2015-06-05 07:55:40 +00:00
14665ff7d4 Roll chromium_revision e144d30..6fdb142 (318658:318841) + remove OVERRIDE macro
Clang version changed 223108:230914
Details: e144d30..6fdb142/tools/clang/scripts/update.sh

Removes the OVERRIDE macro defined in:
* webrtc/base/common.h
* webrtc/typedefs.h

The majority of the source changes were done by running this in src/:
perl -0pi -e "s/virtual\s([^({;]*(\([^({;]*\)[^({;]*))(OVERRIDE|override)/\1override/sg" `find {talk,webrtc} -name "*.h"  -o -name "*.cc*" -o -name "*.mm*"`

which converted all:
virtual Foo() OVERRIDE
functions to:
Foo() override

Then I manually edited:
* talk/media/webrtc/fakewebrtccommon.h
* webrtc/test/fake_common.h

Remaining uses of OVERRIDE was fixed by search+replace.

Manual edits were done to fix virtual destructors that were
overriding inherited ones.

Finally a build error related to the pure virtual definitions of
Read, Write and Rewind in common_types.h required a bit of
refactoring in:
* webrtc/common_types.cc
* webrtc/common_types.h
* webrtc/system_wrappers/interface/file_wrapper.h
* webrtc/system_wrappers/source/file_impl.cc

This roll should make it possible for us to finally re-enable deadlock
detection for TSan on the buildbots.

BUG=4106
R=pbos@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41069004

Cr-Commit-Position: refs/heads/master@{#8596}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8596 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-04 13:04:54 +00:00
b1786dbab0 audio_processing: Added a new AEC delay metric value that gives the amount of poor delays
To more easily determine if for example the AEC is not working properly one could monitor how often the estimated delay is out of bounds. With out of bounds we mean either being negative or too large, where both cases will break the AEC.

A new delay metric is added telling the user how often poor delay values were estimated. This is measured in percentage since last time the metrics were calculated.

All APIs have been updated with a third parameter with EchoCancellation::GetDelayMetrics() giving the option to exclude the new metric not to break existing code.

The new metric has been added to audio_processing_unittests with an additional protobuf member, and reference files accordingly updated.
voe_auto_test has not been updated to display the new metric.

BUG=4246
TESTED=audioproc on files
R=aluebs@webrtc.org, andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39739004

Cr-Commit-Position: refs/heads/master@{#8230}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8230 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-03 06:07:21 +00:00
e9d3760d5c AEC: Adds a reported_delay_enabled_ flag
Adds a feature to completely turn on or off buffer handling based on reported delay values. During startup, reported delays are controlled differently through, e.g., WEBRTC_UNTRUSTED_DELAY. By default, the feature is enabled giving the same output as before this change.

TESTED=trybots, modules_unittest
R=aluebs@webrtc.org, andrew@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12349005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5965 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-23 13:20:07 +00:00
ddbb8a2c24 Support arbitrary input/output rates and downmixing in AudioProcessing.
Select "processing" rates based on the input and output sampling rates.
Resample the input streams to those rates, and if necessary to the
output rate.

- Remove deprecated stream format APIs.
- Remove deprecated device sample rate APIs.
- Add a ChannelBuffer class to help manage deinterleaved channels.
- Clean up the splitting filter state.
- Add a unit test which verifies the output against known-working
native format output.

BUG=2894
R=aluebs@webrtc.org, bjornv@webrtc.org, xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/9919004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5959 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-22 21:00:04 +00:00
5964fe0f86 audio_processing: DestroyHandle() now returns void
The return value was not used anyhow and there is no proper action to be taken if we would have received an error. Hence, in line with issue441 we should return void upon free.

BUG=441
TESTED=trybots,modules_unittest
R=andrew@webrtc.org, aluebs@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12269004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5949 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-22 06:52:28 +00:00
56e4a05053 Remove ProcessingComponent's dependence on AudioProcessingImpl.
- Move needed accessors to AudioProcessing.
- Inject the crit directly as a dependency.
- Remove the now unneeded EchoCancellationImplWrapper.

BUG=2894
R=aluebs@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/9199004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5620 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-27 22:23:17 +00:00
6b1e21924a Move the Config DelayCorrection struct to audio_processing.h.
TBR=bjornv

Review URL: https://webrtc-codereview.appspot.com/2304005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4849 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 23:46:20 +00:00
1760a17b8e Add an extended filter mode to AEC.
Re-land: http://review.webrtc.org/2151007/
TBR=bjornv@webrtc.org

Original change description:
This mode extends the filter length from the current 48 ms to 128 ms.
It is runtime selectable which allows it to be enabled through
experiment. We reuse the DelayCorrection infrastructure to avoid having
to replumb everything up to libjingle.

Increases AEC complexity by ~50% on modern x86 CPUs.
Measurements (in percent of usage on one core):

Machine/CPU                                     Normal Extended
MacBook Retina (Early 2013),
Core i7 Ivy Bridge (2.7 GHz, hyperthreaded)     0.6%   0.9%

MacBook Air (Late 2010), Core 2 Duo (2.13 GHz)  1.4%   2.7%

Chromebook Pixel, Core i5 Ivy Bridge (1.8 GHz)  0.6%   1.0%

Samsung ARM Chromebook,
Samsung Exynos 5 Dual (1.7 GHz)                 3.2%   5.6%

The relative value is large of course but the absolute should be
acceptable in order to have a working AEC on some platforms.

Detailed changes to the algorithm:
- The filter length is changed from 48 to 128 ms. This comes with tuning
of several parameters: i) filter adaptation stepsize and error
threshold; ii) non-linear processing smoothing and overdrive.
- Option to ignore the reported delays on platforms which we deem
sufficiently unreliable. Currently this will be enabled in Chromium for
Mac.
- Faster startup times by removing the excessive "startup phase"
processing of reported delays.
- Much more conservative adjustments to the far-end read pointer. We
smooth the delay difference more heavily, and back off from the
difference more. Adjustments force a readaptation of the filter, so they
should be avoided except when really necessary.

Corresponds to these changes:
https://chromereviews.googleplex.com/9412014
https://chromereviews.googleplex.com/9514013
https://chromereviews.googleplex.com/9960013

BUG=454,827,1261

Review URL: https://webrtc-codereview.appspot.com/2295006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4848 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 23:17:38 +00:00
ce014d97cd Revert 4837 "Add an extended filter mode to AEC."
> Add an extended filter mode to AEC.
> 
> This mode extends the filter length from the current 48 ms to 128 ms.
> It is runtime selectable which allows it to be enabled through
> experiment. We reuse the DelayCorrection infrastructure to avoid having
> to replumb everything up to libjingle.
> 
> Increases AEC complexity by ~50% on modern x86 CPUs.
> Measurements (in percent of usage on one core):
> 
> Machine/CPU                                     Normal Extended
> MacBook Retina (Early 2013),
> Core i7 Ivy Bridge (2.7 GHz, hyperthreaded)     0.6%   0.9%
> 
> MacBook Air (Late 2010), Core 2 Duo (2.13 GHz)  1.4%   2.7%
> 
> Chromebook Pixel, Core i5 Ivy Bridge (1.8 GHz)  0.6%   1.0%
> 
> Samsung ARM Chromebook,
> Samsung Exynos 5 Dual (1.7 GHz)                 3.2%   5.6%
> 
> The relative value is large of course but the absolute should be
> acceptable in order to have a working AEC on some platforms.
> 
> Detailed changes to the algorithm:
> - The filter length is changed from 48 to 128 ms. This comes with tuning
> of several parameters: i) filter adaptation stepsize and error
> threshold; ii) non-linear processing smoothing and overdrive.
> - Option to ignore the reported delays on platforms which we deem
> sufficiently unreliable. Currently this will be enabled in Chromium for
> Mac.
> - Faster startup times by removing the excessive "startup phase"
> processing of reported delays.
> - Much more conservative adjustments to the far-end read pointer. We
> smooth the delay difference more heavily, and back off from the
> difference more. Adjustments force a readaptation of the filter, so they
> should be avoided except when really necessary.
> 
> Corresponds to these changes:
> https://chromereviews.googleplex.com/9412014
> https://chromereviews.googleplex.com/9514013
> https://chromereviews.googleplex.com/9960013
> 
> BUG=454,827,1261
> R=bjornv@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/2151007

TBR=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2296005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4839 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 12:27:27 +00:00
26e02f0ee4 Add an extended filter mode to AEC.
This mode extends the filter length from the current 48 ms to 128 ms.
It is runtime selectable which allows it to be enabled through
experiment. We reuse the DelayCorrection infrastructure to avoid having
to replumb everything up to libjingle.

Increases AEC complexity by ~50% on modern x86 CPUs.
Measurements (in percent of usage on one core):

Machine/CPU                                     Normal Extended
MacBook Retina (Early 2013),
Core i7 Ivy Bridge (2.7 GHz, hyperthreaded)     0.6%   0.9%

MacBook Air (Late 2010), Core 2 Duo (2.13 GHz)  1.4%   2.7%

Chromebook Pixel, Core i5 Ivy Bridge (1.8 GHz)  0.6%   1.0%

Samsung ARM Chromebook,
Samsung Exynos 5 Dual (1.7 GHz)                 3.2%   5.6%

The relative value is large of course but the absolute should be
acceptable in order to have a working AEC on some platforms.

Detailed changes to the algorithm:
- The filter length is changed from 48 to 128 ms. This comes with tuning
of several parameters: i) filter adaptation stepsize and error
threshold; ii) non-linear processing smoothing and overdrive.
- Option to ignore the reported delays on platforms which we deem
sufficiently unreliable. Currently this will be enabled in Chromium for
Mac.
- Faster startup times by removing the excessive "startup phase"
processing of reported delays.
- Much more conservative adjustments to the far-end read pointer. We
smooth the delay difference more heavily, and back off from the
difference more. Adjustments force a readaptation of the filter, so they
should be avoided except when really necessary.

Corresponds to these changes:
https://chromereviews.googleplex.com/9412014
https://chromereviews.googleplex.com/9514013
https://chromereviews.googleplex.com/9960013

BUG=454,827,1261
R=bjornv@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2151007

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4837 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 02:17:47 +00:00
9162080527 Fix some chromium-style warnings in webrtc/modules/audio_processing/
BUG=163
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1902004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4472 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-02 11:44:11 +00:00
61e596fc49 Add a Config class interface to AudioProcessing for passing options.
Pass the Config down to all AudioProcessing components.

Also add an EchoCancellationImplWrapper to optionally create different
EchoCancellationImpls.

BUG=2117
TBR=turaj@webrtc.org
TESTED=git try

Review URL: https://webrtc-codereview.appspot.com/1843004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4400 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-25 18:28:29 +00:00
91d11b3cdd Adds new AEC API to audio_processing.
One unit test added.
Tested with audioproc_unittest and trybots

TEST=none
BUG=none

Review URL: https://webrtc-codereview.appspot.com/1154004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3613 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-03-05 16:53:09 +00:00
6be1e934ad Properly error check calls to AudioProcessing.
Checks must be made with "!= 0", not "== -1". Additionally:
* Clean up the function calling into AudioProcessing.
* Remove the unused _noiseWarning.
* Make the other warnings bool.

BUG=chromium:178040

Review URL: https://webrtc-codereview.appspot.com/1147004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3590 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-03-01 18:47:28 +00:00
14b43beb7c Move src/ -> webrtc/
TBR=niklas.enbom@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/915006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2963 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-10-22 18:19:23 +00:00