Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Issue 1180423006: audio_processing/aec: make delay estimator aware of starving farend buffer (Closed)

Created:
5 years, 6 months ago by bjornv1
Modified:
5 years, 6 months ago
Reviewers:
hlundin-webrtc
CC:
webrtc-reviews_webrtc.org, Andrew MacDonald, tterriberry_mozilla.com, hlundin-webrtc, kwiberg-webrtc, aluebs-webrtc
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

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 Committed: https://chromium.googlesource.com/external/webrtc/+/9002cc426dab7a576f5247f45ba888cd081a39f0

Patch Set 1 #

Total comments: 5

Patch Set 2 : Clarified comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -42 lines) Patch
M webrtc/modules/audio_processing/aec/aec_core.c View 1 4 chunks +29 lines, -36 lines 0 comments Download
M webrtc/modules/audio_processing/aec/echo_cancellation.c View 2 chunks +2 lines, -6 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
bjornv1
Henrik, I'd really appreciate if you could take a look at this before I go ...
5 years, 6 months ago (2015-06-16 12:50:21 UTC) #2
hlundin-webrtc
lgtm with two comments. https://codereview.webrtc.org/1180423006/diff/1/webrtc/modules/audio_processing/aec/aec_core.c File webrtc/modules/audio_processing/aec/aec_core.c (right): https://codereview.webrtc.org/1180423006/diff/1/webrtc/modules/audio_processing/aec/aec_core.c#newcode861 webrtc/modules/audio_processing/aec/aec_core.c:861: WebRtc_MoveReadPtr(self->far_buf_windowed, elements); If I understand ...
5 years, 6 months ago (2015-06-16 20:14:38 UTC) #3
bjornv1
Committed patchset #2 (id:20001) manually as 9002cc426dab7a576f5247f45ba888cd081a39f0 (presubmit successful).
5 years, 6 months ago (2015-06-16 20:30:01 UTC) #4
bjornv1
https://codereview.webrtc.org/1180423006/diff/1/webrtc/modules/audio_processing/aec/aec_core.c File webrtc/modules/audio_processing/aec/aec_core.c (right): https://codereview.webrtc.org/1180423006/diff/1/webrtc/modules/audio_processing/aec/aec_core.c#newcode861 webrtc/modules/audio_processing/aec/aec_core.c:861: WebRtc_MoveReadPtr(self->far_buf_windowed, elements); On 2015/06/16 20:14:38, hlundin-webrtc wrote: > If ...
5 years, 6 months ago (2015-06-16 20:30:06 UTC) #5
hlundin-webrtc
5 years, 6 months ago (2015-06-16 20:32:30 UTC) #6
Message was sent while issue was closed.
https://codereview.webrtc.org/1180423006/diff/1/webrtc/modules/audio_processi...
File webrtc/modules/audio_processing/aec/aec_core.c (right):

https://codereview.webrtc.org/1180423006/diff/1/webrtc/modules/audio_processi...
webrtc/modules/audio_processing/aec/aec_core.c:861:
WebRtc_MoveReadPtr(self->far_buf_windowed, elements);
On 2015/06/16 20:30:05, bjornv1 wrote:
> On 2015/06/16 20:14:38, hlundin-webrtc wrote:
> > If I understand it correctly, WebRtc_MoveReadPtr returns the number of
> elements
> > the pointer was moved, which may differ from the input |elements|. Is there
> any
> > point in verifying that all returned the same value?
> 
> Yes, you're right, though all these buffers are constructed with the same
size,
> hence if one of them "breaks", they all do. We could add asserts for sure to
> catch such an event. I'll commit without assert and add it in a second CL if
you
> insist.

I think it is fine the way it is. Don't bother with the asserts.

Powered by Google App Engine
This is Rietveld 408576698