aboutsummaryrefslogtreecommitdiff
path: root/webrtc/modules/audio_processing/aec/echo_cancellation.c
AgeCommit message (Collapse)Author
2015-12-18Moving FFT on farend signal to where it is used in AEC (bit exact).minyue
Currently, FFT is performance when AEC buffers farend signal. This has some drawbacks 1. memory inefficiency: two ring buffers are needed; 2. computation inefficiency: if ringbuffer gets wrapped around, some FFT computation will be wasted; 3. accessibility: the main AEC function looses accessibility to the time-domain signal. Therefore, this CL tries to buffer time domain data, which is buffered any way if a debugging macro is defined, and calculate the FFTs where they are actually used. BUG= Review URL: https://codereview.webrtc.org/1512573003 Cr-Commit-Position: refs/heads/master@{#11091}
2015-11-11Remove webrtc/modules/audio_processing/{aec,aecm,ns}/includeHenrik Kjellander
BUG=webrtc:5095 TESTED=git cl try -c --bot=android_compile_rel --bot=linux_compile_rel --bot=win_compile_rel --bot=mac_compile_rel --bot=ios_rel --bot=linux_gn_rel --bot=win_x64_gn_rel --bot=mac_x64_gn_rel --bot=android_gn_rel -m tryserver.webrtc R=henrik.lundin@webrtc.org Review URL: https://codereview.webrtc.org/1440523002 . Cr-Commit-Position: refs/heads/master@{#10608}
2015-11-10-Removed the indirect error message reporting in aec and aecm.peah
-Made the component error messages generic to be an unspecified error message. BUG=webrtc:5099 Review URL: https://codereview.webrtc.org/1404743003 Cr-Commit-Position: refs/heads/master@{#10570}
2015-08-24Update a ton of audio code to use size_t more correctly and in general reducePeter Kasting
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}
2015-07-02Rename APM Config ReportedDelay to DelayAgnostichenrik.lundin
We use this Config struct for enabling/disabling the delay agnostic AEC. This change renames it to DelayAgnostic for readability reasons. NOTE: The logic is reversed in this CL. The old ReportedDelay config turned DA-AEC off, while the new DelayAgnostic turns it on. The old Config is kept in parallel with the new during a transition period. This is to avoid problems with API breakages. During this period, ReportedDelay is disabled or DelayAgnostic is enabled, DA-AEC is engaged in APM. BUG=webrtc:4651 R=bjornv@webrtc.org, tommi@webrtc.org Review URL: https://codereview.webrtc.org/1211053006 Cr-Commit-Position: refs/heads/master@{#9531}
2015-06-18Reland "Revert "audio_processing/aec: make delay estimator aware of starving ↵Bjorn Volcker
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}
2015-06-16Revert "audio_processing/aec: make delay estimator aware of starving farend ↵Bjorn Volcker
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}
2015-06-16audio_processing/aec: make delay estimator aware of starving farend bufferBjorn Volcker
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}
2015-06-11Reformat existing code. There should be no functional effects.Peter Kasting
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}
2015-06-10audio_processing: Create now returns a pointer to the objectBjorn Volcker
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}
2015-06-09Re-land r9378 "Rename APM Config DelayCorrection to ExtendedFilter"Henrik Lundin
(This reverts commit 3fbf3f8841b5460503fb646eaedcb063620434a8.) The original submission was reverted because it broke the Chrome build. This is fixed in patch set 2 of this change by keeping the old MediaConstraintsInterface string kExperimentalEchoCancellation. It will be removed once the Chrome code has been updated. Original description: "We use this Config struct for enabling/disabling Extended filter mode in AEC. This change renames it to ExtendedFilter for readability reasons. The corresponding media constraint is also renamed to kExtendedFilterEchoCancellation. The old Config is kept in parallel with the new during a transition period. This is to avoid problems with API breakages. During this period, if any of the two Configs are enabled, the extended filter mode is engaged in APM. That is, the two Configs are combined with an "OR" operation. This change also renames experimental_aec in AudioOptions to extended_filter_aec." BUG=webrtc:4696 R=bjornv@webrtc.org, tommi@webrtc.org Review URL: https://codereview.webrtc.org/1151573021. Cr-Commit-Position: refs/heads/master@{#9401}
2015-06-05Revert r9378 "Rename APM Config DelayCorrection to ExtendedFilter"Henrik Lundin
This reverts commit 5f4b7e2873864c61e2ad6d88679dcd5d321bfd16, since it broke some of the build bots. BUG=4696 TBR=bjornv@webrtc.org Review URL: https://codereview.webrtc.org/1166463006 Cr-Commit-Position: refs/heads/master@{#9380}
2015-06-05Rename APM Config DelayCorrection to ExtendedFilterHenrik Lundin
We use this Config struct for enabling/disabling Extended filter mode in AEC. This change renames it to ExtendedFilter for readability reasons. The corresponding media constraint is also renamed to kExtendedFilterEchoCancellation. The old Config is kept in parallel with the new during a transition period. This is to avoid problems with API breakages. During this period, if any of the two Configs are enabled, the extended filter mode is engaged in APM. That is, the two Configs are combined with an "OR" operation. This change also renames experimental_aec in AudioOptions to extended_filter_aec. BUG=4696 R=bjornv@webrtc.org, tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/54659004 Cr-Commit-Position: refs/heads/master@{#9378}
2015-05-06audio_processing/aec: Do not scale target delay at startup when on AndroidBjorn Volcker
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}
2015-04-10Refactor audio_processing: Free functions return voidBjorn Volcker
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}
2015-02-03audio_processing: Added a new AEC delay metric value that gives the amount ↵bjornv@webrtc.org
of poor delays To more easily determine if for example the AEC is not working properly one could monitor how often the estimated delay is out of bounds. With out of bounds we mean either being negative or too large, where both cases will break the AEC. A new delay metric is added telling the user how often poor delay values were estimated. This is measured in percentage since last time the metrics were calculated. All APIs have been updated with a third parameter with EchoCancellation::GetDelayMetrics() giving the option to exclude the new metric not to break existing code. The new metric has been added to audio_processing_unittests with an additional protobuf member, and reference files accordingly updated. voe_auto_test has not been updated to display the new metric. BUG=4246 TESTED=audioproc on files R=aluebs@webrtc.org, andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/39739004 Cr-Commit-Position: refs/heads/master@{#8230} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8230 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-21Fix an unitialized variable warning.andrew@webrtc.org
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
2015-01-21Re-land "Support 48kHz in AEC"aluebs@webrtc.org
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
2015-01-20Revert 8080 "Support 48kHz in AEC"tina.legrand@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 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
2015-01-15Support 48kHz in AECaluebs@webrtc.org
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
2015-01-15Move ring_buffer to common_audio.andrew@webrtc.org
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
2014-12-18Rename _t struct types in audio_processing.pbos@webrtc.org
_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
2014-08-25Fix WEBRTC_AEC_DEBUG_DUMP (broken by int16->float conversion)kwiberg@webrtc.org
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
2014-08-11modules/audio_processing: Moves declaration of kDelayDiffOffsetSamplesbjornv@webrtc.org
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
2014-07-03EchoCancellationImpl::ProcessRenderAudio: Use float samples directlykwiberg@webrtc.org
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
2014-05-15Revert "Revert "Audio processing: Feed each processing step its choicemflodman@webrtc.org
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
2014-05-14Revert "Audio processing: Feed each processing step its choice of int or ↵mflodman@webrtc.org
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
2014-05-14Audio processing: Feed each processing step its choice of int or float datakwiberg@webrtc.org
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
2014-04-29AEC: Startup phase only runs if reported_delay_enabledbjornv@webrtc.org
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
2014-04-23AEC: Adds a reported_delay_enabled_ flagbjornv@webrtc.org
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
2013-10-15Compile out unused kMinTrustedDelayMs.andrew@webrtc.org
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
2013-10-08clang-format audio_processing/aec/*andrew@webrtc.org
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
2013-10-04Only declare kDelayDiffOffset when used.andrew@webrtc.org
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
2013-10-01Ensure adjusted "known delay" doesn't drop below zero.andrew@webrtc.org
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
2013-09-25Add an extended filter mode to AEC.andrew@webrtc.org
Re-land: http://review.webrtc.org/2151007/ TBR=bjornv@webrtc.org Original change description: This mode extends the filter length from the current 48 ms to 128 ms. It is runtime selectable which allows it to be enabled through experiment. We reuse the DelayCorrection infrastructure to avoid having to replumb everything up to libjingle. Increases AEC complexity by ~50% on modern x86 CPUs. Measurements (in percent of usage on one core): Machine/CPU Normal Extended MacBook Retina (Early 2013), Core i7 Ivy Bridge (2.7 GHz, hyperthreaded) 0.6% 0.9% MacBook Air (Late 2010), Core 2 Duo (2.13 GHz) 1.4% 2.7% Chromebook Pixel, Core i5 Ivy Bridge (1.8 GHz) 0.6% 1.0% Samsung ARM Chromebook, Samsung Exynos 5 Dual (1.7 GHz) 3.2% 5.6% The relative value is large of course but the absolute should be acceptable in order to have a working AEC on some platforms. Detailed changes to the algorithm: - The filter length is changed from 48 to 128 ms. This comes with tuning of several parameters: i) filter adaptation stepsize and error threshold; ii) non-linear processing smoothing and overdrive. - Option to ignore the reported delays on platforms which we deem sufficiently unreliable. Currently this will be enabled in Chromium for Mac. - Faster startup times by removing the excessive "startup phase" processing of reported delays. - Much more conservative adjustments to the far-end read pointer. We smooth the delay difference more heavily, and back off from the difference more. Adjustments force a readaptation of the filter, so they should be avoided except when really necessary. Corresponds to these changes: https://chromereviews.googleplex.com/9412014 https://chromereviews.googleplex.com/9514013 https://chromereviews.googleplex.com/9960013 BUG=454,827,1261 Review URL: https://webrtc-codereview.appspot.com/2295006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4848 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25Revert 4837 "Add an extended filter mode to AEC."asapersson@webrtc.org
> Add an extended filter mode to AEC. > > This mode extends the filter length from the current 48 ms to 128 ms. > It is runtime selectable which allows it to be enabled through > experiment. We reuse the DelayCorrection infrastructure to avoid having > to replumb everything up to libjingle. > > Increases AEC complexity by ~50% on modern x86 CPUs. > Measurements (in percent of usage on one core): > > Machine/CPU Normal Extended > MacBook Retina (Early 2013), > Core i7 Ivy Bridge (2.7 GHz, hyperthreaded) 0.6% 0.9% > > MacBook Air (Late 2010), Core 2 Duo (2.13 GHz) 1.4% 2.7% > > Chromebook Pixel, Core i5 Ivy Bridge (1.8 GHz) 0.6% 1.0% > > Samsung ARM Chromebook, > Samsung Exynos 5 Dual (1.7 GHz) 3.2% 5.6% > > The relative value is large of course but the absolute should be > acceptable in order to have a working AEC on some platforms. > > Detailed changes to the algorithm: > - The filter length is changed from 48 to 128 ms. This comes with tuning > of several parameters: i) filter adaptation stepsize and error > threshold; ii) non-linear processing smoothing and overdrive. > - Option to ignore the reported delays on platforms which we deem > sufficiently unreliable. Currently this will be enabled in Chromium for > Mac. > - Faster startup times by removing the excessive "startup phase" > processing of reported delays. > - Much more conservative adjustments to the far-end read pointer. We > smooth the delay difference more heavily, and back off from the > difference more. Adjustments force a readaptation of the filter, so they > should be avoided except when really necessary. > > Corresponds to these changes: > https://chromereviews.googleplex.com/9412014 > https://chromereviews.googleplex.com/9514013 > https://chromereviews.googleplex.com/9960013 > > BUG=454,827,1261 > R=bjornv@webrtc.org > > Review URL: https://webrtc-codereview.appspot.com/2151007 TBR=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2296005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4839 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25Add an extended filter mode to AEC.andrew@webrtc.org
This mode extends the filter length from the current 48 ms to 128 ms. It is runtime selectable which allows it to be enabled through experiment. We reuse the DelayCorrection infrastructure to avoid having to replumb everything up to libjingle. Increases AEC complexity by ~50% on modern x86 CPUs. Measurements (in percent of usage on one core): Machine/CPU Normal Extended MacBook Retina (Early 2013), Core i7 Ivy Bridge (2.7 GHz, hyperthreaded) 0.6% 0.9% MacBook Air (Late 2010), Core 2 Duo (2.13 GHz) 1.4% 2.7% Chromebook Pixel, Core i5 Ivy Bridge (1.8 GHz) 0.6% 1.0% Samsung ARM Chromebook, Samsung Exynos 5 Dual (1.7 GHz) 3.2% 5.6% The relative value is large of course but the absolute should be acceptable in order to have a working AEC on some platforms. Detailed changes to the algorithm: - The filter length is changed from 48 to 128 ms. This comes with tuning of several parameters: i) filter adaptation stepsize and error threshold; ii) non-linear processing smoothing and overdrive. - Option to ignore the reported delays on platforms which we deem sufficiently unreliable. Currently this will be enabled in Chromium for Mac. - Faster startup times by removing the excessive "startup phase" processing of reported delays. - Much more conservative adjustments to the far-end read pointer. We smooth the delay difference more heavily, and back off from the difference more. Adjustments force a readaptation of the filter, so they should be avoided except when really necessary. Corresponds to these changes: https://chromereviews.googleplex.com/9412014 https://chromereviews.googleplex.com/9514013 https://chromereviews.googleplex.com/9960013 BUG=454,827,1261 R=bjornv@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2151007 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4837 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-10WebRtc_Word32 -> int32_t in audio_processing/pbos@webrtc.org
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
2013-03-07Fix debug file buffer bug introduced in r3574.andrew@webrtc.org
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
2013-02-27AEC Refactoring:bjornv@webrtc.org
* 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
2013-02-27Refactor WebRtc_CreateBuffer to return the instance.andrew@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1140005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3574 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-02-20Refactor AEC: PowerLevelbjornv@webrtc.org
* 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
2013-02-20Added a pointer getter to the system_delay variable.bjornv@webrtc.org
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
2013-02-20Refactoring AEC: Added a SetConfigCore functionbjornv@webrtc.org
* 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
2013-02-20Moved out buffer handling to ProcessFrame()bjornv@webrtc.org
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
2013-02-20Removed unused get_config function. The configuration is already stored and ↵bjornv@webrtc.org
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
2013-02-19Added getter for far_time_buf in AEC. Only used in AEC debug dump.bjornv@webrtc.org
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
2013-02-19This refactoring CL moves the nlp_mode member value from aecpc_t to aec_t, ↵bjornv@webrtc.org
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
2013-02-19* Name changebjornv@webrtc.org
* 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
2013-02-15This refactoring CL contains an API to get low level echo metrics stats.bjornv@webrtc.org
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