• Home
  • History
  • Annotate
  • only in /external/webrtc/webrtc/modules/audio_processing/aec/
History log of /external/webrtc/webrtc/modules/audio_processing/aec/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7358fda399c8a3dccaf0120bb9cee89807c640bf 25-Oct-2017 Dan Willemsen <dwillemsen@google.com> Convert to Android.bp

See build/soong/README.md for more information.

Test: mmma external/webrtc
Change-Id: I821fe8af5da246c7d93c2caee2b7e262a2c0ef53
ndroid.bp
ndroid.mk
c3f927f4f51767b2c9d861a2086e5581adf916c7 25-Oct-2017 Dan Willemsen <dwillemsen@google.com> Remove unused gnustl webrtc variants

These aren't being used, and were complicating the makefiles.

Test: cs/webrtc gnustl
Change-Id: I256bc9da8e0dc89a11fda6a941a9cb43b8c0bb20
ndroid.mk
107cb5291b6836ccff8ac0b0915524f0adda794e 10-Aug-2017 Chih-Hung Hsieh <chh@google.com> Suppress non-critical warnings in webrtc.

* We should enable those warnings after fixing the upstream source code.

Bug: 64487164
Test: build with WITH_TIDY=1
Change-Id: I306b4eb26fc8729f21cab4d5b82c9e3b59d8db3e
ndroid.mk
11d9a8be40885866879f28786f333c575ef1dce5 09-Jun-2017 Yifan Hong <elsk@google.com> Move all libwebrtc* to vendor image.

Native tests are not moved. Tests include:
webrtc_apm_process_test
webrtc_isac_test
webrtc_apm_unit_test

Test: mma -j
Test: m -j -k BOARD_VNDK_VERSION=current has no errors for webrtc

Bug: 62489821

Merged-In: I013303de263866cbf368f3f89327c5357f9cecdb
Change-Id: I013303de263866cbf368f3f89327c5357f9cecdb
(cherry picked from commit 8df7e85368569b7cd0afc1ce231b8b3a0ab49333)
ndroid.mk
4e188dd3746eaf342d32e5f666de0e63480f7412 12-Feb-2016 Chih-Hung Hsieh <chh@google.com> Suppress unused-parameter warnings.

Suppress warnings until upstream can fix them.

BUG: 27074506
Change-Id: If7e6f190100fba025d25d2634d1c9a657cc24854
ndroid.mk
daef292e03c8d7d32e650495612f336c1830013a 15-Jan-2016 Alex Luebs <aluebs@google.com> Merge upstream SHA 04cb763

* git merge 04cb763
* See all upstream changes since the previous merge in branch aosp/upstream-master: git diff cb3f9bd..04cb763
* Modify webrtc/.gitignore to keep *.mk files.
* Removed old files from *.mk files:
- thread.cc
- thread_posix.cc
* Add new files to *.mk files:
- event_tracer.cc
* Android relevant upstream changes:
- Make Beamforming dynamically settable for Android platform builds
- Remove additional channel constraints when Beamforming is enabled in AudioProcessing
- Use an explicit identifier in Config

Change-Id: I384a4e8f6982c31c5bc70eef521bb2d90800b9a4
e2976c87f7ba627fa1e1246f0ccfb34b4b9f3a73 04-Jan-2016 Peter Boström <pbos@webrtc.org> 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}
ystem_delay_unittest.cc
92594a30ce02aed75f8a2a9f21e5b8c5c4e5f199 19-Dec-2015 minyue <minyue@webrtc.org> 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}
ec_core.c
ec_core_internal.h
cho_cancellation.c
0bc176b99b770f2fa3dd94d54553ab635df6930d 16-Dec-2015 peah <peah@webrtc.org> 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}
ec_core.c
ec_core_mips.c
99b1a32146fcc63e52fd45484958d7c8c4cf0061 16-Dec-2015 peah <peah@webrtc.org> 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}
ec_core.c
ec_core_internal.h
ec_core_mips.c
48bf2382d98871727894c3f4f501cd34a9e1e20b 10-Dec-2015 peah <peah@webrtc.org> 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}
ec_core.c
b14f00113ed054a94f406fb58348e2cedf098cc0 09-Dec-2015 peah <peah@webrtc.org> 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}
ec_core.c
ec_core_internal.h
ec_core_neon.c
ec_core_sse2.c
afeb43897a5c72ddef73e7f6de5feea799b827a5 09-Dec-2015 peah <peah@webrtc.org> 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}
ec_core.c
ec_core_internal.h
ec_core_neon.c
ec_core_sse2.c
7e43138c0890bd99f627fa061b122c8d5716a99d 28-Nov-2015 peah <peah@webrtc.org> -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}
ec_core.c
ec_core_internal.h
ec_core_mips.c
ec_core_neon.c
ec_core_sse2.c
675d4373f87b2468a334f2ed48bfa4e6946d80f1 05-Nov-2015 Chih-Hung Hsieh <chh@google.com> WIP: Changes after merge commit 'cb3f9bd'

Changes after "git merge cb3f9bd"

* git mv old Android.mk from src/ to webrtc/
* Remove old unused files in src/*.
* Modify webrtc/.gitignore to keep *.mk files.
* Copy old files from master, lost in auto-merge.
src/modules/audio_processing/test/unit_test.cc
src/modules/audio_coding/codecs/isac/fix/test/{Android.mk,kenny.c}
to webrtc, but most of the old test code do not compile with new
webrtc API and are commented out.
* Move src/modules/audio_processing/test/android/apmtest/jni/*.mk to
webrtc/... but the Android.mk files does not work.
Commented out its build target.
* Changes to Android.mk files:
* Change references of src/ to webrtc/.
* Fix include path
* Fix source file list, remove old non-existing files,
add new source files to resolve link errors.
* Add new Android.mk files to build some new static libraries
to link into current Android webrtc .so files.
* Remove unnecessary LOCAL_SHARED_LIBRARIES in Android.mk files
that build static libraries.
* Remove old unnecessary clang workarounds like
-Wno-tautological-pointer-compare
-no-integrated-as
* Fix include path of debug.pb.h in some source files.
* Add -DWEBRTC_POSIX in android-webrtc.mk
* Manually merge Android specific changes in
src/typedefs.h to webrtc/typedefs.h
* Fix trivial syntax error in scoped_ptr.h, calling static_assert.
* Use -std=c++0x in webrtc/system_wrappers/source/Android.mk
* #undef getchaar in spreadsort.hpp
* Verified and not to carry old Android hacks from src/... to webrtc/...
src/system_wrappers/source/android/cpu-features.c
src/modules/interface/module.h
src/modules/audio_coding/codecs/isac/fix/source/filters_neon.c
src/system_wrappers/source/trace_posix.cc
src/typedefs.h

More pathes from Alex Luebs:
* Use new unit test kenny.cc.
Delete old kenny.cc.
Comment out unessential code in kenny.cc to fix link error for now.
* Replace old unit test files with new ones in
webrtc/modules/audio_processing/Android.mk.
Delete old audio_processing/test/unit_test.cc.
* Fix compilation errors in
webrtc/modules/audio_processing/test/audio_processing_unittest.cc

Change-Id: I7bbf776eeb9dcfa21a82dd1f2dec378235cbbc3e
ndroid.mk
54eb5e2e9ae91e9ad6dcb297de7b918ebe706d5f 25-Nov-2015 peah <peah@webrtc.org> 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}
ec_core.c
ec_core_internal.h
ec_core_mips.c
ec_core_neon.c
ec_core_sse2.c
d860523112263f9c8f29b95658c89215fbd95a16 24-Nov-2015 peah <peah@webrtc.org> 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}
ec_core.c
ec_core_internal.h
ec_core_mips.c
ec_core_neon.c
ec_core_sse2.c
9b72af94cd61782ada88f777b07854daf9657bb2 11-Nov-2015 Henrik Kjellander <kjellander@webrtc.org> 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}
cho_cancellation.c
cho_cancellation.h
cho_cancellation_unittest.cc
nclude/echo_cancellation.h
ystem_delay_unittest.cc
c12be3984ff49f202f873f8ecd83f0e5b9cb36c9 10-Nov-2015 peah <peah@webrtc.org> -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}
cho_cancellation.c
cho_cancellation_internal.h
nclude/echo_cancellation.h
98f53510b222f71fdd8b799b2f33737ceeb28c61 28-Oct-2015 Henrik Kjellander <kjellander@webrtc.org> 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}
ec_core.c
ec_rdft.c
fc9dd1710d1e9f52846931cabed97134393d0b82 14-Sep-2015 peah <peah@webrtc.org> 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}
ec_core.c
9e69abf85eeae8b6e23170c189cf5dd155771a51 28-Aug-2015 peah <peah@webrtc.org> Added logging using the raw variant of the new aec logging macros

Replaced the wav file dumping functionality in aec_core.c with the newly added corresponding macros

Added macros for logging of AEC internal data

BUG=

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

Cr-Commit-Position: refs/heads/master@{#9808}
ec_core.c
ec_core_internal.h
dce40cf804019a9898b6ab8d8262466b697c56e0 24-Aug-2015 Peter Kasting <pkasting@google.com> Update a ton of audio code to use size_t more correctly and in general reduce
use of int16_t/uint16_t.

This is the upshot of a recommendation by henrik.lundin and kwiberg on an original small change ( https://webrtc-codereview.appspot.com/42569004/#ps1 ) to stop using int16_t just because values could fit in it, and is similar in nature to a previous "mass change to use size_t more" ( https://webrtc-codereview.appspot.com/23129004/ ) which also needed to be split up for review but to land all at once, since, like adding "const", such changes tend to cause a lot of transitive effects.

This was be reviewed and approved in pieces:
https://codereview.webrtc.org/1224093003
https://codereview.webrtc.org/1224123002
https://codereview.webrtc.org/1224163002
https://codereview.webrtc.org/1225133003
https://codereview.webrtc.org/1225173002
https://codereview.webrtc.org/1227163003
https://codereview.webrtc.org/1227203003
https://codereview.webrtc.org/1227213002
https://codereview.webrtc.org/1227893002
https://codereview.webrtc.org/1228793004
https://codereview.webrtc.org/1228803003
https://codereview.webrtc.org/1228823002
https://codereview.webrtc.org/1228823003
https://codereview.webrtc.org/1228843002
https://codereview.webrtc.org/1230693002
https://codereview.webrtc.org/1231713002

The change is being landed as TBR to all the folks who reviewed the above.

BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, pbos@webrtc.org
TBR=aluebs, andrew, asapersson, henrika, hlundin, jan.skoglund, kwiberg, minyue, pbos, pthatcher

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

Cr-Commit-Position: refs/heads/master@{#9768}
ec_core.c
ec_core.h
ec_core_internal.h
ec_resampler.c
ec_resampler.h
cho_cancellation.c
nclude/echo_cancellation.h
ystem_delay_unittest.cc
0f133b99c655cbdb347b4a71ac872c071532189f 02-Jul-2015 henrik.lundin <henrik.lundin@webrtc.org> 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}
ec_core.c
ec_core.h
ec_core_internal.h
cho_cancellation.c
ystem_delay_unittest.cc
7101269c61267879b1cc028c2cccc963c2680a17 18-Jun-2015 Bjorn Volcker <bjornv@webrtc.org> Reland "Revert "audio_processing/aec: make delay estimator aware of starving farend buffer""

Original review at https://codereview.webrtc.org/1180423006

SystemDelayTests was not updated w.r.t. extended_filter mode and some tests were disabled on Android since DA-AEC is automatically set.
All tests have now been updated for both extended_filter mode as well as DA-AEC, hence are now enabled on Android.

Also
* Moves default settings of extended_filter and DA-AEC form Init() to Create() to avoid unintentional loss of state during a reset.
* Fixes a potential bug of starting from scratch in extended_filter mode + DA-AEC.

This reverts commit 01c9b012e9171c813ace9e405c32fc75f4262bf6.

BUG=
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9458}
ec_core.c
cho_cancellation.c
ystem_delay_unittest.cc
01c9b012e9171c813ace9e405c32fc75f4262bf6 16-Jun-2015 Bjorn Volcker <bjornv@chromium.org> Revert "audio_processing/aec: make delay estimator aware of starving farend buffer"

The code only affects DA-AEC, but since DA-AEC is the default AEC if run on Android tests failed. Reverting to fix that test.

This reverts commit 9002cc426dab7a576f5247f45ba888cd081a39f0.

BUG=
TBR=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9453}
ec_core.c
cho_cancellation.c
9002cc426dab7a576f5247f45ba888cd081a39f0 16-Jun-2015 Bjorn Volcker <bjornv@chromium.org> audio_processing/aec: make delay estimator aware of starving farend buffer

We've seen that if we get a buffer underrun followed by a sudden buffer build up the DA-AEC can't really catch up even though it should be possible to estimate the upcoming difference. We have a feature for this already, but that is only used in the regular AEC. This CL turns that feature on also for DA-AEC.

- Adds a helper function MoveFarReadPtrWithoutSystemDelayUpdate()
- Only apply conservative correction for positive delays, where we can put the AEC into a non-causal state
- Stuff the farend buffer if we don't have enough data to process w.r.t. to current nearend buffer.
- Always run delay estimation based on reported delays to catch buffer starvation.

BUG=
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9452}
ec_core.c
cho_cancellation.c
728d9037c016c01295177fa700fc7927f0bb80bb 11-Jun-2015 Peter Kasting <pkasting@google.com> Reformat existing code. There should be no functional effects.

This includes changes like:
* Attempt to break lines at better positions
* Use "override" in more places, don't use "virtual" with it
* Use {} where the body is more than one line
* Make declaration and definition arg names match
* Eliminate unused code
* EXPECT_EQ(expected, actual) (but use (actual, expected) for e.g. _GT)
* Correct #include order
* Use anonymous namespaces in preference to "static" for file-scoping
* Eliminate unnecessary casts
* Update reference code in comments of ARM assembly sources to match actual current C code
* Fix indenting to be more style-guide compliant
* Use arraysize() in more places
* Use bool instead of int for "boolean" values (0/1)
* Shorten and simplify code
* Spaces around operators
* 80 column limit
* Use const more consistently
* Space goes after '*' in type name, not before
* Remove unnecessary return values
* Use "(var == const)", not "(const == var)"
* Spelling
* Prefer true, typed constants to "enum hack" constants
* Avoid "virtual" on non-overridden functions
* ASSERT(x == y) -> ASSERT_EQ(y, x)

BUG=none
R=andrew@webrtc.org, asapersson@webrtc.org, henrika@webrtc.org, juberti@webrtc.org, kjellander@webrtc.org, kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9420}
ec_resampler.c
cho_cancellation.c
9345e86551a0e59e77dfee6eed3e2fe2a833b269 10-Jun-2015 Bjorn Volcker <bjornv@webrtc.org> audio_processing: Create now returns a pointer to the object

Affects
* NS
* AGC
* AEC

BUG=441
TESTED=locally on Linux and trybots
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9411}
ec_core.c
ec_core.h
ec_resampler.c
ec_resampler.h
cho_cancellation.c
cho_cancellation_unittest.cc
nclude/echo_cancellation.h
ystem_delay_unittest.cc
441f6347311bcf2079435c3888d67e1fb321f9f8 09-Jun-2015 Henrik Lundin <henrik.lundin@webrtc.org> 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}
ec_core.c
ec_core.h
cho_cancellation.c
3fbf3f8841b5460503fb646eaedcb063620434a8 05-Jun-2015 Henrik Lundin <henrik.lundin@webrtc.org> 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}
ec_core.c
ec_core.h
cho_cancellation.c
5f4b7e2873864c61e2ad6d88679dcd5d321bfd16 05-Jun-2015 Henrik Lundin <henrik.lundin@webrtc.org> 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}
ec_core.c
ec_core.h
cho_cancellation.c
7dbc076f347d2558b3a2b7cd4ade58f39be17912 05-Jun-2015 Bjorn Volcker <bjornv@webrtc.org> audio_processing/aec: Turn SignalBasedDelayCorrection to after 15 seconds

The delay agnostic AEC uses a signal based delay correction method to adjust buffer synchronization between loudspeaker and microphone. On Mac in particular we have seen deviations in UMA stats that point towards an echo already at startup. This is likely due to an early and incorrect correction based on poor audio data.
By waiting 15 seconds before we turn on the ability to correct we can avoid a majority of these.
The reported delay values are in general accurate enough and relying on them in the beginning is fine. The value 15 seconds is chosen because we have seen from UMA data that a significant amount of calls tend to end before 15 seconds when being in the UseDelayAgnosticAEC Finch experiment.

We turn this "feature" on for all platforms but Android, where the reported system delays are inaccurate and we want to take action as soon as possible.
In addition, the set of "good" delay values has been increased from 25% to 75% of the filter length.

BUG=webrtc:3504
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9376}
ec_core.c
ec_core_internal.h
cb7f8ce2df7564546936d3041a96ccc86a90f988 20-May-2015 Andrew MacDonald <andrew@webrtc.org> Clear ARM NEON flag

Merge WEBRTC_ARCH_ARM64_NEON and WEBRTC_ARCH_ARM_NEON into one
WEBRTC_HAS_NEON.
Replace WEBRTC_DETECT_ARM_NEON by WEBRTC_DETECT_NEON.
Replace WEBRTC_ARCH_ARM by WEBRTC_ARCH_ARM64 for arm64 cpu.

BUG=4002
R=andrew@webrtc.org, jridges@masque.com, kjellander@webrtc.org

Change-Id: I870a4d0682b80633b671c9aab733153f6d95a980

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

Cr-Commit-Position: refs/heads/master@{#9228}
ec_core.c
ec_core.h
ec_core_neon.c
ec_rdft.c
ec_rdft.h
1ff218fac3c0410ef30a9185b58b7a7b0e49efdd 06-May-2015 Bjorn Volcker <bjornv@webrtc.org> audio_processing/aec: Do not scale target delay at startup when on Android

When running AEC in extended_filter mode there is no startup phase to evaluate the reported system delay values.
Instead we simply use the first value and scale by two to avoid over compensating when synchronizing render and capture.
We don't need to be too accurate since we have extended the filter length.

On Android we use fixed (measured) reported delay values.
There is no need to be extra conservative here, because that is already built-in in the measured value.
In fact, the difference between devices is large and with such an extra conservative approach the true delay can not be caught by the filter length.
With this change we can improve performance on some devices.

BUG=4472
TESTED=offline on recordings from various devices
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9144}
cho_cancellation.c
3cfa756f371ffdcc0369d745e9832cfff55861ba 29-Apr-2015 Bjorn Volcker <bjornv@chromium.org> audio_processing/aec: Fixes an incorrect sampling rate multiplier when processing in 48 kHz

In AEC a fixed fft size is used, but processing can in the lower band be in either 8 or 16 kHz.
Therefore we need a multiplier/rate factor to, for example, map frequency bands in Hz to frequency bins.

The multiplier/rate factor can only be either 1 or 2, but when 48 kHz support was added it was assigned 3.

BUG=crbug.com/482424
R=aluebs@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9117}
ec_core.c
f6a99e63b6e18d3b3db25e0059a4979743046f31 10-Apr-2015 Bjorn Volcker <bjornv@chromium.org> Refactor audio_processing: Free functions return void

There is no point in returning an error when Free() fails. In fact it can only happen if we have a null pointer as object. There is further no place where the return value is used.

Affected components are
- aec
- aecm
- agc
- ns

BUG=441
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8966}
ec_core.c
ec_core.h
ec_resampler.c
ec_resampler.h
cho_cancellation.c
cho_cancellation_unittest.cc
nclude/echo_cancellation.h
ystem_delay_unittest.cc
bf395c1fc0a29b54fac4b6f6e9f6c117762faa15 25-Mar-2015 Bjorn Volcker <bjornv@webrtc.org> Add WebRTC Media Constraint to force using Delay Agnostic AEC on Android

If built-in Echo Cancellation is available on a device it is automatically enabled. The reason is that it in most cases performs better than the WebRTC software echo control for mobile. The drawback is that we can not develop, test and rollout the delay agnostic AEC (DA-AEC) on Android as for desktops.

This CL includes
- adding a media constraint to enable/disable DA-AEC.
- automatically turning on echo cancellation if DA-AEC is enabled.
- a fix in the AEC that enables delay estimation when DA-AEC is enabled, but delay metrics is disabled.
- sets the Config struct ReportedDelay, which controls DA-AEC internally in the AEC.

The test code to verify that it works in AppRTCDemo can be found here:
https://webrtc-codereview.appspot.com/50479004/

BUG=4472
TESTED=locally on N7, N6, Android One
R=glaznev@webrtc.org, perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8861}
ec_core.c
d7a212e8b9c76b7c6eaefc6a432b2422b3fe0ab9 05-Mar-2015 bjornv@webrtc.org <bjornv@webrtc.org> audio_processing/aec: Increased delay metrics aggregation window to five seconds

The known clients (GetStats and UMA histogram in Chrome) use at least 5 second aggregation window. There is no particular value in calculating the metrics more often.

The CL also includes a small refactoring moving a declaration inside an if statement.

BUG=2994
TEST=N/A
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8619}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8619 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
976c0f304376e6a5ca1156430f3e7083c4eb6b6f 02-Mar-2015 bjornv@webrtc.org <bjornv@webrtc.org> audio_processing/aec: NEON code should not be invoked if it is detectable, but is not NEON

There exist devices with runtime checks for NEON, but where the device is not NEON. One such device is Tegra2 on which currently NEON code is running.

This fix adds a missing feature check when initializing the AEC.

BUG=4304
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8559}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8559 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_rdft.c
cc64a9cc4fcc7df95cee0fc069b8924c3fb196ce 05-Feb-2015 bjornv@webrtc.org <bjornv@webrtc.org> voice_engine: Updates GetEcDelayMetrics() w.r.t. new metric

As of r8230 (https://webrtc-codereview.appspot.com/39739004/) a new Echo Delay Metric was added calculating the fraction of poor values that may cause the AEC to fail. There are currently two methods for GetDelayMetrics() in webrtc::AutioProcessing and one is deprecated.

This CL updates
- GetEcDelayMetrics()
- voe_auto_test
- talk/media/(fake)webrtcvoiceengine

BUG=N/A
TESTED=locally and trybots
R=pbos@webrtc.org, tina.legrand@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8251}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8251 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
b1786dbab00dd66a9e59a68414e85b2b2615a24f 03-Feb-2015 bjornv@webrtc.org <bjornv@webrtc.org> 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
ec_core.c
ec_core.h
ec_core_internal.h
cho_cancellation.c
nclude/echo_cancellation.h
5614cf16e71e59e4785deca05249d9a06f746d66 27-Jan-2015 bjornv@webrtc.org <bjornv@webrtc.org> audio_processing: Use fixed aggregation window in delay metrics

Previously, the delay estimate history was reset every time the metrics were pulled. This required all clients to be on the same thread and make use of one call.

Now we use a fixed aggregation window of one second and when a client pulls the metrics you get the latest value.
Under certain circumstances like tests you would like to have the aggregation window set to the recording length. We therefore turn on the fixed aggregation window after the first call.

BUG=2994
TESTED=locally on Mac and trybots
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8170}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8170 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core_internal.h
70117a83d464fa650b9fe68644cd253456e34958 27-Jan-2015 bjornv@webrtc.org <bjornv@webrtc.org> AEC: Implements a new function for calculating delay metrics

Two new member variables have been added and the code for calculating the delay metrics have been moved to a function.

BUG=2994
TESTED=locally on Mac and trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8163 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core_internal.h
e65d9d974c192907b43f994ef98e4fd0b93d9ae1 21-Jan-2015 andrew@webrtc.org <andrew@webrtc.org> Fix an unitialized variable warning.

R=andrew@webrtc.org

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

Patch from Sebastien Marchand <sebmarchand@chromium.org>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8118 4adac7df-926f-26a2-2b94-8c16560cd09d
cho_cancellation.c
c78d81ae895510edc217d1598d9111e3c8987b09 21-Jan-2015 aluebs@webrtc.org <aluebs@webrtc.org> Re-land "Support 48kHz in AEC"

Doing something similar for the band 16-24kHz to what is done for the band 8-16kHz. The only difference is that there is no comfort noise added in this band. Could not test how this sounds because there are no aecdumps with 48kHz sample rate as nfar as I know.
Tested for 32kHz sample rate and the output is bitexact with how it was before this CL.

Original: https://webrtc-codereview.appspot.com/28319004/
Reverted: https://webrtc-codereview.appspot.com/33949004/

BUG=webrtc:3146
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8116 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
ec_core_internal.h
ec_core_mips.c
cho_cancellation.c
nclude/echo_cancellation.h
ystem_delay_unittest.cc
ee0c100d5495cd8c440b767a7852532afbbcefb2 20-Jan-2015 tina.legrand@webrtc.org <tina.legrand@webrtc.org> Revert 8080 "Support 48kHz in AEC"

> Support 48kHz in AEC
>
> Doing something similar for the band 16-24kHz to what is done for the band 8-16kHz. The only difference is that there is no comfort noise added in this band. Could not test how this sounds because there are no aecdumps with 48kHz sample rate as nfar as I know.
> Tested for 32kHz sample rate and the output is bitexact with how it was before this CL.
>
> BUG=webrtc:3146
> R=andrew@webrtc.org
>
> Review URL: https://webrtc-codereview.appspot.com/28319004

TBR=aluebs@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8100 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
ec_core_internal.h
ec_core_mips.c
cho_cancellation.c
nclude/echo_cancellation.h
ystem_delay_unittest.cc
64d3c4b9ac862c682d297851083f81942a035652 15-Jan-2015 aluebs@webrtc.org <aluebs@webrtc.org> Support 48kHz in AEC

Doing something similar for the band 16-24kHz to what is done for the band 8-16kHz. The only difference is that there is no comfort noise added in this band. Could not test how this sounds because there are no aecdumps with 48kHz sample rate as nfar as I know.
Tested for 32kHz sample rate and the output is bitexact with how it was before this CL.

BUG=webrtc:3146
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8080 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
ec_core_internal.h
ec_core_mips.c
cho_cancellation.c
nclude/echo_cancellation.h
ystem_delay_unittest.cc
6b6301588ef2d7b5f5d442aa95bef442a43ead53 15-Jan-2015 andrew@webrtc.org <andrew@webrtc.org> Move ring_buffer to common_audio.

In preparation for adding a C++ wrapper in common_audio. Also, change
the return type of Init to void and call it from Create.

R=aluebs@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8068 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core_internal.h
cho_cancellation.c
cho_cancellation_internal.h
bac00121208659b48a965882ab85a4ae1257a026 02-Jan-2015 bjornv@webrtc.org <bjornv@webrtc.org> Extend delay estimation window in AEC to 500 ms on all platforms

On non-Android the delay estimator in audio_processing/aec has solely been used for logging purposes. The maximum possible observed delay has been 236 ms. We have seen longer delays for which the delay estimate at best ends up at 236 ms, but can also be 'random'. reported delays are clamped to 500 ms.
This cl extends the delay estimation window to match that.

BUG=4086, 3504, 4113
TESTED=locally on Linux and trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7989 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_internal.h
3a70625caf816c6506b09f5a574fae4f8cb37386 01-Jan-2015 bjornv@webrtc.org <bjornv@webrtc.org> audio_processing: Added back ATTRIBUTE_UNUSED lost in r7877

BUG=N/A
TESTED=Now it builds with aec_debug_dump=1 on Mac
TBR=pbos@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7986 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
f832a6d0903179914c1dbda2a43172206d9e1daa 18-Dec-2014 pbos@webrtc.org <pbos@webrtc.org> Remove _t from function pointer typedefs.

_t are reserved in POSIX.

R=bjornv@webrtc.org
BUG=162

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7947 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core_internal.h
ec_rdft.c
ec_rdft.h
e468bc9e604213054e5fc73431ee127ebe0211a8 18-Dec-2014 pbos@webrtc.org <pbos@webrtc.org> Rename _t struct types in audio_processing.

_t names are reserved in POSIX.

R=bjornv@webrtc.org
BUG=162

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7943 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_resampler.c
cho_cancellation.c
cho_cancellation_internal.h
ystem_delay_unittest.cc
5f162c8509c48a15294b1fec98a36583a5f41304 11-Dec-2014 pbos@webrtc.org <pbos@webrtc.org> Merge AEC changes.

R=bjornv@webrtc.org
BUG=

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7877 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core_internal.h
ec_core_neon.c
a56a2c57cf6f91322fe417c846373c045599db61 26-Nov-2014 andrew@webrtc.org <andrew@webrtc.org> Enabling building with NEON on ARM64

This patch enables NEON on ARM64 platform. Passed building both on
Android ARMv7 and Android ARM64.

BUG=3580
R=andrew@webrtc.org, jridges@masque.com

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

Patch from Zhongwei Yao <zhongwei.yao@arm.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7751 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_neon.c
f5b56fbc412f33a1f6e4d024726281cd34ff05ed 17-Nov-2014 pbos@webrtc.org <pbos@webrtc.org> Annotate COMPILE_ASSERT with __attribute__((unused)).

Also renames UNUSED -> ATTRIBUTE_UNUSED to be able to use this when
building peerconnection_jni.cc which apparently has this defined to
something else.

R=kjellander@webrtc.org
TBR=mflodman@webrtc.org
BUG=4018

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7711 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
a3ed713dad5ccad03e2f5d775081143babd19097 31-Oct-2014 andrew@webrtc.org <andrew@webrtc.org> Add a WavReader counterpart to WavWriter.

Don't bother with a C interface as we currently have no need to call
this from C code. The first use will be in the audioproc tool.

R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7585 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core_internal.h
db75a66b0fa7f3a734206aa339ca598924c48d42 30-Sep-2014 andrew@webrtc.org <andrew@webrtc.org> Minor code change to fix some warnings in MIPS build.

R=andrew@webrtc.org, bjornv@webrtc.org, kwiberg@webrtc.org

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

Patch from Ljubomir Papuga <lpapuga@mips.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7339 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_mips.c
ec_rdft_mips.c
c75f607042374e99b8b894d3e8e434543f5df4d9 16-Sep-2014 bjornv@webrtc.org <bjornv@webrtc.org> audio_processing/aec: Ported NEON optimizations of SubbandCoherence() and its sub-functions to SSE2

These optimizations were originally committed in r6860, but reverted in r6861, since it broke a bitexactness test (ApmTest.Process) in modules_unittests. That test has now been updated in r7149, hence this CL now pass the test.

BUG=3767
TESTED=manually on linux and trybots
TBR=aluebs@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7189 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_sse2.c
7bb2586c553d0f839b0c417327cfd2eab634e45b 15-Sep-2014 bjornv@webrtc.org <bjornv@webrtc.org> audio_processing: Correct sample rate in aec_debug_dump

When writing to wav files in the low level flag aec_debug_dump incorrect sample rates were used for recordings using rates from 32 kHz and above. This since internally inside the AEC we process the data using 16 kHz. Any upper band is processed and combined later on.

This CL adds the correct sample rate to the recording.

BUG=3359
TESTED=locally on 44.1 kHz recordings on Linux
R=aluebs@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7182 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
a22485eaf02a9756035739b0ad00a3bb7ac3e67d 29-Aug-2014 andrew@webrtc.org <andrew@webrtc.org> MIPS optimizations for AEC audio processing module

Added new optimizations for MIPS that were removed in r6797.
For more information about this see https://code.google.com/p/webrtc/source/detail?r=6797

R=andrew@webrtc.org, djordje.pesut@imgtec.com

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

Patch from Ljubomir Papuga <ljubomir.papuga@mips.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7010 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_rdft_mips.c
047a46f8b49e7100d7727377c89f109542125b9c 26-Aug-2014 pbos@webrtc.org <pbos@webrtc.org> Remove Android.mk build files.

These files are generally not maintained and break, some contain files
that don't exist anymore and do not build anymore. If we need to add
some of these back we should really set up a bot for them.

R=andrew@webrtc.org, glaznev@webrtc.org, henrike@webrtc.org
BUG=

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6974 4adac7df-926f-26a2-2b94-8c16560cd09d
ndroid.mk
584cd8da4bbfe26a31dc10c2bdbef08fad29a5ff 25-Aug-2014 kwiberg@webrtc.org <kwiberg@webrtc.org> Fix WEBRTC_AEC_DEBUG_DUMP (broken by int16->float conversion)

And in the process, make it dump WAV files instead of raw PCM.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6959 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core_internal.h
cho_cancellation.c
cho_cancellation_internal.h
71d9572e9c7a28b9045644f4e418673b9f49c04f 19-Aug-2014 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Minor bug fix and cosmetic changes in AEC MIPS optimizations.

Minor bug fix in WebRtcAec_FilterAdaptation_mips, which did not manifest with
gcc 4.7.2, but it did with version 4.9.0. While there, also made some cosmetic
changes to comply with Chromium coding style.

R=andrew@webrtc.org

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

Patch from Ljubomir Papuga <lpapuga@mips.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6931 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_mips.c
a1ad844229ba1618047afc81eb8cfbbba1d08b93 18-Aug-2014 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Precompute the AEC FFT tables, rather than initializing at run-time.

These global arrays are shared amongst all AEC instances, and were at
serious risk of data races. A Chromium TSAN bot recently caught this.

Also move the function pointer selection for optimization to
create-time. (Ideally this would only be done once.)

BUG=chromium:404133,1503
R=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6922 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_rdft.c
ec_rdft.h
820f8e9ca7dddeef909cadb9411264942fba9dcb 11-Aug-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> modules/audio_processing: Moves declaration of kDelayDiffOffsetSamples

audio_processing did not compile when aec_untrusted_delay_for_testing=1 was set. The constant kDelayDiffOffsetSamples was declared only for Mac when WEBRTC_UNTRUSTED_DELAY was automatically turned on.

Moving the declaration outside the ifdef makes it build with the flag on for any platform.

BUG=3673
TESTED=locally and trybots
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6866 4adac7df-926f-26a2-2b94-8c16560cd09d
cho_cancellation.c
96d8b0e69f34f9ab29248eefbb55c4d698752144 11-Aug-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Revert 6860 "SSE2 version of SubbandCoherence()"

> SSE2 version of SubbandCoherence()
>
> The performance gain on a x86 laptop (Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz)
> reported by audioproc is ~3.3%
>
> The output is bit exact.
>
> R=bjornv@webrtc.org, cd@webrtc.org
>
> Review URL: https://webrtc-codereview.appspot.com/18779004
>
> Patch from Scott LaVarnway <slavarnw@gmail.com>.

TBR=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6861 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_sse2.c
0db82f337fd07fff9ecf6eeea70a1301142e795d 11-Aug-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> SSE2 version of SubbandCoherence()

The performance gain on a x86 laptop (Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz)
reported by audioproc is ~3.3%

The output is bit exact.

R=bjornv@webrtc.org, cd@webrtc.org

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

Patch from Scott LaVarnway <slavarnw@gmail.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6860 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_sse2.c
fdbe1442c5b3add3bf395660211350ca2c32de7a 29-Jul-2014 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Use C functions in aec for MIPS

With GCC 4.9, the MIPS NDK toolchain has been changed to only support 16 spregs by default - the even-numbered ones. This has been changed to support the R6 MIPS architecture. While the old behaviour could be restored by adding "-modd-spreg", this would come with a performance hit because the kernel would emulate odd-numbered spregs and missing R2 instructions.
As a result of this change, the functions removed in this CL no longer compile as there are no longer enough spregs for the compiler to assign. So we are removing these functions and they will use the C implementation until the MIPS code is rewritten.

R=andrew@webrtc.org, ljubomir.papuga@gmail.com, pasko@chromium.org

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

Patch from Fabrice de Gans-Riberi <fdegans@chromium.org>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6797 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_rdft_mips.c
5bde66e9130b76c241e093bf823820cd1a3e9c0b 10-Jul-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> audio_processing: Updates aec_core_sse2.c with changes made to aec_common.h

The change of definitions moved to aec_common.h was done in CL17839005.

BUG=3131
TBR=kwiberg@webrtc.org
TESTED=builds locally

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6648 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_sse2.c
555fc78f2702b0c79b25837b852c61aafe87fdd3 10-Jul-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Neon version of SubbandCoherence()

The performance gain on a Nexus 7 reported by audioproc is ~1.4%

The output is NOT bit exact. Any difference seen is +-1.

BUG=3131
R=bjornv@webrtc.org, cd@webrtc.org

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

Patch from Scott LaVarnway <slavarnw@gmail.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6647 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_common.h
ec_core.c
ec_core_internal.h
ec_core_neon.c
ec_rdft.h
ac800c8004c718a87aa46e0795f3f654e29245f9 10-Jul-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Neon version of rftbsub_128()

The performance gain on a Nexus 7 reported by audioproc is ~4.5%

The output is bit exact.

BUG=3131
TESTED=trybots and manually
R=bjornv@webrtc.org, cd@webrtc.org

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

Patch from Scott LaVarnway <slavarnw@gmail.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6646 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_rdft_neon.c
e55641d4f70024118a0af989fbf46a77ccd1a241 08-Jul-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Neon version of rftfsub_128()

The performance gain on a Nexus 7 reported by audioproc is ~3.3%

The output is bit exact.

BUG=3131
TESTED=trybots and manually on N7
R=bjornv@webrtc.org, cd@webrtc.org

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

Patch from Scott LaVarnway <slavarnw@gmail.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6628 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_rdft_neon.c
38214d53db5f19228b38424700db8b90cf8b0234 03-Jul-2014 kwiberg@webrtc.org <kwiberg@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> EchoCancellationImpl::ProcessRenderAudio: Use float samples directly

This patch lets EchoCancellationImpl::ProcessRenderAudio ask the given
AudioBuffer for float sample data directly, instead of asking for
int16 samples and then converting manually.

Since EchoCancellationImpl::ProcessRenderAudio takes a const
AudioBuffer*, it was necessary to add some const accessors for float
data to AudioBuffer.

R=aluebs@webrtc.org, andrew@webrtc.org, bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6590 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_resampler.c
ec_resampler.h
cho_cancellation.c
nclude/echo_cancellation.h
ystem_delay_unittest.cc
6d21ddca5fd89a0b2b49d90bc671783cea0a73b7 01-Jul-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> audio_processing/aec: Refactors NonLinearProcessing to prepare for NEON optimizations

Puts functionality necessary to calculate sub-band coherences into a function.

BUG=3131
TESTED=trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6570 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core_internal.h
59adb1dcd70c81ba7133dcad15518098cb856eda 30-Jun-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Neon version of cftmdl_128()

The performance gain on a Nexus 7 reported by audioproc is ~2.3

The output is bit exact.

R=bjornv@webrtc.org

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

Patch from Scott LaVarnway <slavarnw@gmail.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6568 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_rdft_neon.c
cd9b90ab539859034f0ffcac63b65e5939fb883e 30-Jun-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Neon version of cft1st_128()

The performance gain on a Nexus 7 reported by audioproc is ~2%

See comments regarding the output.

R=bjornv@webrtc.org, cd@webrtc.org

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

Patch from Scott LaVarnway <slavarnw@gmail.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6564 4adac7df-926f-26a2-2b94-8c16560cd09d
ndroid.mk
ec_rdft.c
ec_rdft.h
ec_rdft_neon.c
d5075bdbb52b8b7d990d2b342e785b1942210e88 25-Jun-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Neon version of FilterFar()

The performance gain on a Nexus 7 reported by audioproc is ~3.5%.

The output is bit exact.

BUG=3131
TESTED=verified performance manually, passed trybots
R=bjornv@webrtc.org, cd@webrtc.org, kwiberg@webrtc.org

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

Patch from Scott LaVarnway <slavarnw@gmail.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6535 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_neon.c
04fbc38c4a3361a22f08a73218a45a189460beeb 24-Jun-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Neon version of ScaleErrorSignal()

The performance gain on a Nexus 7 reported by audioproc is ~4.7%

The output is NOT bit exact. Any difference seen is +-1.

BUG=3131
R=bjornv@webrtc.org, cd@webrtc.org

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

Patch from Scott LaVarnway <slavarnw@gmail.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6529 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_neon.c
f6d37de466e53d2e5e8c1d6c90e3134f9f1925e6 24-Jun-2014 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Fix array declarations in aec_core.c

Was causing warnings in Chromium such as:

warning C4742: 'WebRtcAec_overDriveCurve' has different alignment in 'E:\src\buildbot\build\slave\fake_slave\build\src\third_party\webrtc\modules\audio_processing\aec\aec_core_sse2.c' and 'E:\src\buildbot\build\slave\fake_slave\build\src\third_party\webrtc\modules\audio_processing\aec\aec_core.c': 4 and 16
warning C4744: 'WebRtcAec_overDriveCurve' has different type in 'E:\src\buildbot\build\slave\fake_slave\build\src\third_party\webrtc\modules\audio_processing\aec\aec_core_sse2.c' and 'E:\src\buildbot\build\slave\fake_slave\build\src\third_party\webrtc\modules\audio_processing\aec\aec_core.c': 'array (260 bytes)' and '__declspec(align(16)) array (260 bytes)'
warning C4742: 'WebRtcAec_weightCurve' has different alignment in 'E:\src\buildbot\build\slave\fake_slave\build\src\third_party\webrtc\modules\audio_processing\aec\aec_core_sse2.c' and 'E:\src\buildbot\build\slave\fake_slave\build\src\third_party\webrtc\modules\audio_processing\aec\aec_core.c': 4 and 16
warning C4744: 'WebRtcAec_weightCurve' has different type in 'E:\src\buildbot\build\slave\fake_slave\build\src\third_party\webrtc\modules\audio_processing\aec\aec_core_sse2.c' and 'E:\src\buildbot\build\slave\fake_slave\build\src\third_party\webrtc\modules\audio_processing\aec\aec_core.c': 'array (260 bytes)' and '__declspec(align(16)) array (260 bytes)'

BUG=https://code.google.com/p/chromium/issues/detail?id=336620
R=andrew@webrtc.org, cd@webrtc.org

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

Patch from Sebastien Marchand <sebmarchand@chromium.org>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6525 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_sse2.c
b6ebe7580677a773bbe32b89d3cf01aff2e5b528 23-Jun-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Disables tests that breaks Android bots

BUG=
TBR=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6520 4adac7df-926f-26a2-2b94-8c16560cd09d
ystem_delay_unittest.cc
5c3f4e3b0fc0be281409402a0fc392ba02b4b1d5 19-Jun-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Fixes and re-enables tests disabled on Android

Several tests were disabled in r6325 and r6326. Also, see issue 3445. This CL fixes the remaining four of the audio_processing related ones. Affects the tests:
- SystemDelayTest.CorrectDelayAfterStableBufferBuildUp
- SystemDelayTest.CorrectDelayDuringDrift
- SystemDelayTest.ShouldRecoverAfterGlitch
- ApmTest.EchoCancellationReportsCorrectDelays

The tests assumes reported delays are used, which now is explicitly set.

BUG=3445
TESTED=trybots
R=aluebs@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6489 4adac7df-926f-26a2-2b94-8c16560cd09d
ystem_delay_unittest.cc
b947d954a5ae35208fa2203edd41af407ece50e2 18-Jun-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Neon version of FilterAdaptation()

The performance gain on a Nexus 7 reported by audioproc is ~5.2%.

The output is bit exact.

Measured total of 15% speed gain on N7 compared to C.

R=bjornv@webrtc.org, cd@webrtc.org

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

Patch from Scott LaVarnway <slavarnw@gmail.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6480 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_neon.c
af6f02f7bd7e593ec6cc686643d606e697634d66 13-Jun-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Neon version of OverdriveAndSuppress()

audioproc reports the average frame time going from 279us to 255us with the test data used.

the output does not match the c version, but the difference seen is +-1.

Performance gain on Nexus7: 8.8%

BUG=3131
TESTED=trybots and manually
R=bjornv@webrtc.org, cd@webrtc.org

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

Patch from Scott LaVarnway <slavarnw@gmail.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6433 4adac7df-926f-26a2-2b94-8c16560cd09d
ndroid.mk
ec_core.c
ec_core.h
ec_core_neon.c
b51d3ea593abd645adba72f59d479564ed01276e 05-Jun-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Revert 6341 "Fixes and enables SystemDelayTests."

> Fixes and enables SystemDelayTests.
>
> The root cause for failure was that the delay handling of reported delays was bypassed on Android, whereas the tests assumes that part of AEC to be run.
> This CL checks if it is in use.
>
> BUG=3445
> R=kwiberg@webrtc.org
>
> Review URL: https://webrtc-codereview.appspot.com/12689005

TBR=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6343 4adac7df-926f-26a2-2b94-8c16560cd09d
ystem_delay_unittest.cc
1f971b57883e2b47299de4c4f90376b26fa35360 05-Jun-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Fixes and enables SystemDelayTests.

The root cause for failure was that the delay handling of reported delays was bypassed on Android, whereas the tests assumes that part of AEC to be run.
This CL checks if it is in use.

BUG=3445
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6341 4adac7df-926f-26a2-2b94-8c16560cd09d
ystem_delay_unittest.cc
147f4fe3c0ba331b1324bc829a0ab7ff523700b5 04-Jun-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Disables SystemDelayTest.CorrectDelayDuringDrift on Android

Should have been part of https://webrtc-codereview.appspot.com/19629004/

BUG=3445
R=henrik.lundin@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6326 4adac7df-926f-26a2-2b94-8c16560cd09d
ystem_delay_unittest.cc
b616e1211f9973af0c2b24cb4c5b470a6dfafc83 04-Jun-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Disables some modules_unittests on Android.

BUG=3445
R=henrik.lundin@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6325 4adac7df-926f-26a2-2b94-8c16560cd09d
ystem_delay_unittest.cc
f15c14be2220795093345e0e012f39200113a21c 28-May-2014 kwiberg@webrtc.org <kwiberg@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Echo canceler: Saturate output to guarantee it'll be in the allowed range

r6138 (https://webrtc-codereview.appspot.com/18399005/) somewhat
ill-advisedly removed the saturation step at the end of
aec_core.c:NonLinearProcessing(); this patch restores it.

BUG=
R=andrew@webrtc.org, bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6263 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
d5da25063c46678f50882da5c1bad21ca3cfe271 15-May-2014 mflodman@webrtc.org <mflodman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Revert "Revert "Audio processing: Feed each processing step its choice
of int or float data"

This reverts commit 6142.

R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6172 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
nclude/echo_cancellation.h
ystem_delay_unittest.cc
b1a66d166c137aef483b1a24540b00b0d45bdf27 14-May-2014 mflodman@webrtc.org <mflodman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Revert "Audio processing: Feed each processing step its choice of int or float data"

This reverts r6138.

tbr=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6142 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
nclude/echo_cancellation.h
ystem_delay_unittest.cc
934a265a47f71f06fea5878bd50ddcc629ca455a 14-May-2014 kwiberg@webrtc.org <kwiberg@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Audio processing: Feed each processing step its choice of int or float data

Each audio processing step is given a pointer to an AudioBuffer, where
it can read and write int data. This patch adds corresponding
AudioBuffer methods to read and write float data; the buffer will
automatically convert the stored data between int and float as
necessary.

This patch also modifies the echo cancellation step to make use of the
new methods (it was already using floats internally; now it doesn't
have to convert from and to ints anymore).

(The reference data to the ApmTest.Process test had to be modified
slightly; this is because the echo canceller no longer unnecessarily
converts float data to int and then immediately back to float for each
iteration in the loop in EchoCancellationImpl::ProcessCaptureAudio.)

BUG=
R=aluebs@webrtc.org, andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6138 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
nclude/echo_cancellation.h
ystem_delay_unittest.cc
924e81f797084e9a4e650ae66f42a5189868ebc9 12-May-2014 kwiberg@webrtc.org <kwiberg@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Echo cancellation functions docs: Follow style guide w.r.t. placement of *

The style guide says to use "void* x", not void *x", and the code in
these files already do so, but the comments do not. Fix that.

Also, in the interest of reducing eye strain, I fixed the vertical
alignment in a small number of cases.

BUG=
R=aluebs@webrtc.org, andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6101 4adac7df-926f-26a2-2b94-8c16560cd09d
nclude/echo_cancellation.h
059488f2ea1e7968f6ce68a17cf803af1a8e14dc 29-Apr-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> AEC: Startup phase only runs if reported_delay_enabled

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6005 4adac7df-926f-26a2-2b94-8c16560cd09d
cho_cancellation.c
494aa0e93df24b98fc5d67dea8b89b5325680fd7 28-Apr-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> AEC: Moved delay buffer size enums from aec_core.h to aec_core_internal.h

These enums are noly used internally in aec_core.c and it makes more sense to put them in aec_core_internal.h

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5995 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.h
ec_core_internal.h
e9d3760d5cd0f4bb1821897dc995dcbe3cfdccaa 23-Apr-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> 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
ec_core.c
ec_core.h
ec_core_internal.h
cho_cancellation.c
240eec3cd4b86dbb64e3c4a9cac0153a08fc9e77 03-Apr-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Delay Estimator: Minor refactoring and added a setter function.

* Replaced the lookahead input parameter at Create() with a setter. This makes it slightly more user friendly.
* Changed the buffer shifting in SoftReset... to become more readable.

TESTED=trybots, modules_unittests
R=aluebs@webrtc.org, andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5836 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
28e83d1a566c9efedbff391b94962624b5675a50 24-Mar-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> DelayEstimator: Updates delay_quality and adds soft reset.

These changes are currently not used in webrtc/ but helps in using the delay estimator.
* The last_delay_quality() is updated with respect to robust_validation and changed to return float.
* Tests are updated wtih respect to above.
* Adds the possibility to make a soft reset based on external circumstances like a known delay shift has been made.
* The soft reset change the lookahead dynamically. An API to ask for current lookahead has been added as well.

BUG=N/A
TESTED=trybots, modules_unittest
R=aluebs@webrtc.org, andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5761 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
0117d1c48c698de58889e72ee15772654000277c 03-Mar-2014 pbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Fix compilation errors under clang 3.5.

Enables building tip-of-tree clang which introduces new warnings that
cause compilation errors in our code base (-Werror).

BUG=
R=andrew@webrtc.org, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5630 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
c0907eff42079cb53c4ee28cb47a8e495ab06b37 21-Feb-2014 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> MIPS optimizations for AEC audio processing module

The resulting output streams obtained by testing with audioproc test application
are bit-exact with generic C code output streams.

Performance gain achieved:
- mips32 ~ 17%
- mips32r2 ~ 20%
- mipsdsp & mipsdspr2 ~ 21%

R=andrew@webrtc.org

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

Patch from Ljubomir Papuga <lpapuga@mips.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5591 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
ec_core_internal.h
ec_core_mips.c
ec_rdft.c
ec_rdft.h
ec_rdft_mips.c
754de528b7b89d9512e160eefe9be6c6f55e60ab 23-Jan-2014 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Fix array declarations in aec_rdft.h.

Was causing warnings in Chromium such as:
warning C4742: 'rdft_wk2i' has different alignment in
'webrtc\modules\audio_processing\aec\aec_rdft_sse2.c' and
'webrtc\modules\audio_processing\aec\aec_rdft.c': 4 and 16

BUG=chromium:336620
R=cduvivier@google.com

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5419 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_rdft.h
bbd47fc5b5f3ad03a11453cedc8d9d7e5bfd2ad4 13-Jan-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Enables robust delay validation in AEC delay logging.

* Explicitly disabled robust validation in AECM.
* Updated audio_processing_unittests for using robust delay validation in AEC.
* Updated output_data_float.pb (not needed for Android nor fixed point, since AECM is untouched).

BUG=None
TESTED=modules_unittests, trybots
R=aluebs@webrtc.org, andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5368 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
b0ed8f8a084211d2abc34b8e8c322a9c200c8257 22-Nov-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Don't reset the AEC filter in extended mode.

I don't believe I've witnessed this "feature" ever provide a benefit,
and have now collected some evidence of its harm when using the
extended filter mode. It can cause erroneous resets in two cases:

1. Some preprocessing noise suppression is enabled in the system (i.e.
"audio enhancements") that push the noise floor very low, possibly to
zero. If the filter is non-zero this condition can be triggered very
easily, and erroneously.

2. Non-zero energy in the filter before the peak impulse response can
cause a slight (and harmless) "pre-echo" in the error signal. This
becomes more significant as the peak is set further back in the filter.
This effect can cause needless resets during echo onsets.

In short, this isn't a great criterion for filter reset and has the
potential to cause serious harm. Ideally we would remove it entirely,
but in the interests of safety, can start with the extended mode.

BUG=1261
R=aluebs@webrtc.org, bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5159 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
89b1e688ca273335c7e7764a183a98c20033a6bc 18-Oct-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Minor comment fix after clang reformat.

TBR=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4996 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_resampler.c
c2e471d8b3eb4c77e11e5c1f065a165fa86eb69d 15-Oct-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Compile out unused kMinTrustedDelayMs.

TBR=niklas.enbom@webrtc.org
TESTED=trybots

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4963 4adac7df-926f-26a2-2b94-8c16560cd09d
cho_cancellation.c
13b2d4659380675871e2a232bd3a0b8dbbc35a7a 09-Oct-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> clang-format audio_processing/aec/*

TBR=bjornv
TESTED=trybots

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4944 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
ec_core_internal.h
ec_core_sse2.c
ec_rdft.c
ec_rdft.h
ec_rdft_sse2.c
ec_resampler.c
ec_resampler.h
cho_cancellation.c
nclude/echo_cancellation.h
ystem_delay_unittest.cc
acb00505b6624712669f92b181e234099c76ecae 04-Oct-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Only declare kDelayDiffOffset when used.

And remove the redundant Windows block.

R=hans@chromium.org, niklas.enbom@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4922 4adac7df-926f-26a2-2b94-8c16560cd09d
cho_cancellation.c
8e2f9bce710befcbd0ac3608fc0f983db01203db 01-Oct-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Ensure adjusted "known delay" doesn't drop below zero.

The untrusted delay mode provides an option to reduce the "known delay"
parameter passed down to the core AEC. This is necessary to handle the
very low latencies observed with the Chromium audio backend on Mac.

Prior to this change, it was possible to pass a negative value. The AEC
produced good output in practice, but it turned out this tripped a
heretofore unnoticed assert in ProcessBlock().

This change avoids the assert, and maintains the good output across a
set of Mac recordings. Bit-exact in some cases, and in the remaining,
quickly converging to identical output.

The assert was hit on the last webrtc roll in Chromium in
content_browsertests on Mac.

Corresponds to:
https://chromereviews.googleplex.com/9960013

TBR=bjornv
TESTED=Verified locally that "content_browsertests
--gtest_filter=WebrtcBrowserTest.*"" passes.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4886 4adac7df-926f-26a2-2b94-8c16560cd09d
cho_cancellation.c
1760a17b8e176f38bcc203bd0afbc9c59df9b502 26-Sep-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> 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
ec_core.c
ec_core.h
ec_core_internal.h
ec_core_sse2.c
cho_cancellation.c
cho_cancellation_internal.h
ystem_delay_unittest.cc
3e7703640fbc3c402f9ae7925dca697714ceddb9 26-Sep-2013 niklas.enbom@webrtc.org <niklas.enbom@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Remove unused constants, so chrome can enable a warning for that. Patch from thakis@

R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4844 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ce014d97cd9bcc893ce60897227e8a5147d8741c 25-Sep-2013 asapersson@webrtc.org <asapersson@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> 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
ec_core.c
ec_core.h
ec_core_internal.h
ec_core_sse2.c
cho_cancellation.c
cho_cancellation_internal.h
ystem_delay_unittest.cc
26e02f0ee44735697d575e35d2e5f3cd43dde512 25-Sep-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> 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
ec_core.c
ec_core.h
ec_core_internal.h
ec_core_sse2.c
cho_cancellation.c
cho_cancellation_internal.h
ystem_delay_unittest.cc
12dc1a38ca54a000e4fecfbc6d41138b895c9ca5 05-Aug-2013 pbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Switch C++-style C headers with their C equivalents.

The C++ headers define the C functions within the std:: namespace, but
we mainly don't use the std:: namespace for C functions. Therefore we
should include the C headers.

BUG=1833
R=tommi@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4486 4adac7df-926f-26a2-2b94-8c16560cd09d
cho_cancellation_unittest.cc
0a4ca8f0bb5f438944d9e12166faeab2140f185e 31-Jul-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Move internal aec_core defines out of header.

TBR=turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4440 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.h
ec_core_internal.h
7fad4b8c9f1e9a6e3de9962fb74d4953b4f1bb03 28-May-2013 pbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Include files from webrtc/.. paths in audio_processing/

BUG=1662
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4116 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_sse2.c
ec_rdft.c
ec_rdft_sse2.c
ec_resampler.c
ec_resampler.h
b7192b82476d00384fdc153e6a09a6ac53cef67b 10-Apr-2013 pbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> WebRtc_Word32 -> int32_t in audio_processing/

BUG=314

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3809 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core_internal.h
cho_cancellation.c
nclude/echo_cancellation.h
52b57cc0d5ae9b79c26c88c644ab18fef5b693b3 07-Mar-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Fix debug file buffer bug introduced in r3574.

This correctly uses int16_t rather than float. Only affects the debug
file buffer, not the production code path.

TBR=bjornv

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3626 4adac7df-926f-26a2-2b94-8c16560cd09d
cho_cancellation.c
7f95732fe2a05a39da7533db0145614a17042aa8 05-Mar-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> AEC Refactoring: Removes lint warning

Changed inlude order.

TBR=andrew@webrtc.org
TEST=none
BUG=none

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3604 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_internal.h
132c15de307390fce2dbfc09a071bac5e24d2d70 27-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> AEC Refactoring:

* Adds pointer to low level AecCore struct.
* Adds a simple unit test of this new call.

Tested with audioproc_unittest, trybots

TEST=none
BUG=none

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3577 4adac7df-926f-26a2-2b94-8c16560cd09d
cho_cancellation.c
cho_cancellation_unittest.cc
nclude/echo_cancellation.h
91f325586d5e43b13782fe9aa29c14697dc16470 27-Feb-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Refactor WebRtc_CreateBuffer to return the instance.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3574 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
cho_cancellation.c
9fbd9ca84915e76f86d988bfa653006aa761ec80 26-Feb-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Force a memcpy directly from the AEC ring buffer.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3570 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
9ae1354e250bebaba295048e1cb47a74d33bf8e0 25-Feb-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Refactor ring_buffer interface, add a feature and a test.

* Add a RingBuffer typedef.
* Add the ability to force a memcpy by passing a null ptr. In some cases,
we know we want a memcpy. This allows us to skip a potential
intermediate memcpy.
* Add a stress test.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3567 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core_internal.h
cho_cancellation_internal.h
60f83131e482f6ff63968bf8b3bc811f00d5c875 21-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> AEC refactoring: Moved typedefs to _internal.h

* This was actually part of r3553
* Tested with audioproc_unittest, trybots

TBR=andrew@webrtc.org
TEST=none
BUG=none

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3556 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.h
ec_core_internal.h
56a9ec30e9f760c201a4b8f52af1acba6a727ea5 20-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Refactoring AEC: AecCore struct made private

* Added aec_core_internal.h for private variables.
* Moved aec_t struct to aec_core_internal.h
* Name change aec_t -> AecCore
* Moved additional declarations to aec_core_internal.h
* Tested with audioproc_unittest and trybots

TEST=none
BUG=none

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3553 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
ec_core_internal.h
ec_core_sse2.c
cho_cancellation_internal.h
71e91f3b64f97a3aedd82b02a16d7baef37c77a5 20-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Refactor AEC: PowerLevel

* Style changes
* Tested with audioproc_unittest and trybots

TEST=none
BUG=none

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3551 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
4d1cfae6225acfc10c742cfc80c86e83167c1b55 20-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Added a pointer getter to the system_delay variable.
Tested with audioproc_unittest, trybots

TEST=None
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3549 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
ystem_delay_unittest.cc
47b274de44b688cc50ec27cd402a83ccded1c39b 20-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Refactoring AEC: Added a SetConfigCore function

* Configuraion parameters now passed down the AEC Core struct.
* Tested with audioproc_unittest and on trybots.

TEST=none
BUG=none

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3548 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
nclude/echo_cancellation.h
716fd90ff298e08051192ffbd92e9821120ff213 20-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Moved out buffer handling to ProcessFrame()

Tested with audioproc_unittest, trybots and verified bit exactness on recording data base.

TEST=none
BUG=none

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3547 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
ee7202f7a45118779f11209fb091a785dbaeb207 20-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Removed unused get_config function. The configuration is already stored and handled in the audio processing module, so there is no need for this functionality.

Tested with audioproc_unittest and on trybots.

TEST=none
BUG=none

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3546 4adac7df-926f-26a2-2b94-8c16560cd09d
cho_cancellation.c
nclude/echo_cancellation.h
0a480cbe4d573e665270cb5b4d4e6d36d0ef9572 19-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Added getter for far_time_buf in AEC. Only used in AEC debug dump.

TEST=audioproc_unittest, trybots
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3539 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
5fc829200c451ac1033523a7ceaf2d9c5289c51d 19-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> This refactoring CL moves the nlp_mode member value from aecpc_t to aec_t, since it it never used at that level. Further, I removed two suppression variables by depending on nlp_mode directly.

TEST=audioproc_unittest, trybots
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3538 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
cho_cancellation_internal.h
cea70f40551b4095d3a9f62d0710de26a9b5b7db 19-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> * Name change
* Removed WebRtcAec_ function name prepending on private function.

TEST=audioproc_unittest, trybots
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3537 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
b4cd342eb98408eafc62f819fb521277ef3d3caf 15-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> This refactoring CL contains an API to get low level echo metrics stats.

TEST=audioproc_unittest, trybots
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3523 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
nclude/echo_cancellation.h
21a2fc902d37fb9607698dc0770c477b149163fe 15-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> This Cl includes
* A getter for echo_state
* Style changes, such as changes to int where appropriate

TEST=audioproc_unittest, trybots
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3522 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
nclude/echo_cancellation.h
325f62513734f9301f47bf656f94a99a1e4a21ac 15-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Moved the actual calculations to aec_core to avoid passing up low level members.

TEST=audioproc_unittest, trybots
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3521 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
cho_cancellation.c
6f6acd9f803c980ae1c3115145e506f0dfa1277e 14-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Duplicated sampling frequency multiplier to aecpc_t struct to avoid a getter.

TEST=audioproc_unittest, trybots
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3517 4adac7df-926f-26a2-2b94-8c16560cd09d
cho_cancellation.c
cho_cancellation_internal.h
7267ffde56f13fbcdd71c04ae6aad1d7390a05ae 14-Feb-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Moved debug file handling to aec_core from echo_cancellation.c. This removes dependency on low level member variables.

TEST=audioproc_unittest, trybots
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3515 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
cho_cancellation.c
7ded92b71e439f22f8f0b948452e7c19822163c7 30-Jan-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Re-committing r3428

TBR=ajm
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3436 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
e12b1b562c3b3d661e78fe6636eecdc37726fec9 29-Jan-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Revert 3428
> Delay estimator wrapper API changes. This should finalize the changes to delay estimator making it work for multi-probe.
>
> The changes are summarized here:
>
> delay_estimator.*
> -----------------
> Replaced assert() with correct error check. This is consistent with previous versions of the delay_estimator, i.e., to check for valid parameters where they are actually used and not high up in a wrapper layer.
>
> delay_estimator_internal.h
> --------------------------
> Pulled out the far-end part of DelayEstimator struct and put it in DelayEstimatorFarend. The only common parameter is spectrum_size, which we store in both and thereby avoiding having a Farend pointer in DelayEstimator.
>
> delay_estimator_wrapper.*
> -------------------------
> Added and updated descriptions. From Free(), Create(), Init() the far-end parts have been put in separate Farend versions. Same goes for the Process() which now has an AddFarSpectrum() version.
> The flow of calls should be something like (in pseudo-code)
>
> far* = CreateFarend(history_size)
> near* = Create(far, lookahead)
> InitFarend(far)
> Init(near)
> while call ongoing
> AddFarSpectrum(far, far_spectrum)
> Process(near, near_spectrum)
> end while
> Free(near)
> FreeFarend(far)
>
> delay_estimator_unittest.cc
> ---------------------------
> Added farend support setting up calls as mentioned above.
>
> aecm_core.*
> -----------
> Cleaned up some lint warnings.
> Added delay_estimator_farend pointer. Called Create(), Init() and Free() in above mentioned order.
> If AddFarSpectrumFix() was not successfully done, we end and return -1. This is what we would have done for Process().
>
> aec_core.*
> ----------
> Cleaned up some lint warnings.
> Added delay_estimator_farend pointer. Calls in proper order. Since we only use the delay estimator for logging there is no error handling. We only call Process() if AddFarSpectrum() was successful though.
>
> TEST=audioproc_unittest, trybots
> BUG=None
>
> Review URL: https://webrtc-codereview.appspot.com/1076006

TBR=bjornv@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1062008

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3429 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
61ec7daa57969564e23b5b596a1a2538f6a65c6f 29-Jan-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Delay estimator wrapper API changes. This should finalize the changes to delay estimator making it work for multi-probe.

The changes are summarized here:

delay_estimator.*
-----------------
Replaced assert() with correct error check. This is consistent with previous versions of the delay_estimator, i.e., to check for valid parameters where they are actually used and not high up in a wrapper layer.

delay_estimator_internal.h
--------------------------
Pulled out the far-end part of DelayEstimator struct and put it in DelayEstimatorFarend. The only common parameter is spectrum_size, which we store in both and thereby avoiding having a Farend pointer in DelayEstimator.

delay_estimator_wrapper.*
-------------------------
Added and updated descriptions. From Free(), Create(), Init() the far-end parts have been put in separate Farend versions. Same goes for the Process() which now has an AddFarSpectrum() version.
The flow of calls should be something like (in pseudo-code)

far* = CreateFarend(history_size)
near* = Create(far, lookahead)
InitFarend(far)
Init(near)
while call ongoing
AddFarSpectrum(far, far_spectrum)
Process(near, near_spectrum)
end while
Free(near)
FreeFarend(far)

delay_estimator_unittest.cc
---------------------------
Added farend support setting up calls as mentioned above.

aecm_core.*
-----------
Cleaned up some lint warnings.
Added delay_estimator_farend pointer. Called Create(), Init() and Free() in above mentioned order.
If AddFarSpectrumFix() was not successfully done, we end and return -1. This is what we would have done for Process().

aec_core.*
----------
Cleaned up some lint warnings.
Added delay_estimator_farend pointer. Calls in proper order. Since we only use the delay estimator for logging there is no error handling. We only call Process() if AddFarSpectrum() was successful though.

TEST=audioproc_unittest, trybots
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3428 4adac7df-926f-26a2-2b94-8c16560cd09d
ec_core.c
ec_core.h
f3adba499ea3c809bcde26681753c485a531bbb1 15-Nov-2012 leozwang@webrtc.org <leozwang@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Add Android include path so that header files can follow google style

BUG=1011
TEST=bot
Review URL: https://webrtc-codereview.appspot.com/930018

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3107 4adac7df-926f-26a2-2b94-8c16560cd09d
ndroid.mk
ec_core.c
14b43beb7ce4440b30dcea31196de5b4a529cb6b 22-Oct-2012 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> 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
ndroid.mk
ec_core.c
ec_core.h
ec_core_sse2.c
ec_rdft.c
ec_rdft.h
ec_rdft_sse2.c
ec_resampler.c
ec_resampler.h
cho_cancellation.c
cho_cancellation_internal.h
nclude/echo_cancellation.h
ystem_delay_unittest.cc