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

Issue 1963493003: Moved the AEC echo suppression gain computation code to a separate method (Closed)

Created:
4 years, 7 months ago by peah-webrtc
Modified:
4 years, 7 months ago
Reviewers:
ivoc, kwiberg-webrtc
CC:
webrtc-reviews_webrtc.org, Andrew MacDonald, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, kwiberg-webrtc, minyue-webrtc, the sun, aluebs-webrtc, bjornv1
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Moved the AEC echo suppression gain computation code to a separate method. This CL will be followed by other CLs that simplify this method and break out the state specific to this computation into a separate substate. The changes are bitexact. BUG=webrtc:5201, webrtc:5298 Committed: https://crrev.com/9bbf89bca1d722cf5d1c4b3e98517c7c3f71d3e3 Cr-Commit-Position: refs/heads/master@{#12712}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -77 lines) Patch
M webrtc/modules/audio_processing/aec/aec_core.cc View 1 4 chunks +87 lines, -77 lines 0 comments Download

Messages

Total messages: 18 (7 generated)
peah-webrtc
4 years, 7 months ago (2016-05-09 11:41:29 UTC) #3
ivoc
Nice! LGTM with one question. https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processing/aec/aec_core.cc#newcode1031 webrtc/modules/audio_processing/aec/aec_core.cc:1031: memcpy(hNl, cohde, sizeof(hNl[0]) * ...
4 years, 7 months ago (2016-05-12 10:42:43 UTC) #4
peah-webrtc
On 2016/05/12 10:42:43, ivoc wrote: > Nice! LGTM with one question. > > https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processing/aec/aec_core.cc > ...
4 years, 7 months ago (2016-05-12 10:49:52 UTC) #5
peah-webrtc
https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processing/aec/aec_core.cc#newcode1031 webrtc/modules/audio_processing/aec/aec_core.cc:1031: memcpy(hNl, cohde, sizeof(hNl[0]) * PART_LEN1); On 2016/05/12 10:42:43, ivoc ...
4 years, 7 months ago (2016-05-12 11:07:51 UTC) #6
ivoc
https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processing/aec/aec_core.cc#newcode1031 webrtc/modules/audio_processing/aec/aec_core.cc:1031: memcpy(hNl, cohde, sizeof(hNl[0]) * PART_LEN1); On 2016/05/12 11:07:50, peah-webrtc ...
4 years, 7 months ago (2016-05-12 11:19:39 UTC) #7
kwiberg-webrtc
https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processing/aec/aec_core.cc#newcode1031 webrtc/modules/audio_processing/aec/aec_core.cc:1031: memcpy(hNl, cohde, sizeof(hNl[0]) * PART_LEN1); On 2016/05/12 11:19:39, ivoc ...
4 years, 7 months ago (2016-05-12 11:29:58 UTC) #8
peah-webrtc
https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processing/aec/aec_core.cc#newcode1031 webrtc/modules/audio_processing/aec/aec_core.cc:1031: memcpy(hNl, cohde, sizeof(hNl[0]) * PART_LEN1); On 2016/05/12 11:29:58, kwiberg-webrtc ...
4 years, 7 months ago (2016-05-13 04:05:47 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1963493003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1963493003/20001
4 years, 7 months ago (2016-05-13 05:05:16 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-13 06:08:09 UTC) #14
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/9bbf89bca1d722cf5d1c4b3e98517c7c3f71d3e3 Cr-Commit-Position: refs/heads/master@{#12712}
4 years, 7 months ago (2016-05-13 06:08:17 UTC) #16
kwiberg-webrtc
4 years, 7 months ago (2016-05-13 06:23:09 UTC) #18
Message was sent while issue was closed.
https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processi...
File webrtc/modules/audio_processing/aec/aec_core.cc (right):

https://codereview.webrtc.org/1963493003/diff/1/webrtc/modules/audio_processi...
webrtc/modules/audio_processing/aec/aec_core.cc:1031: memcpy(hNl, cohde,
sizeof(hNl[0]) * PART_LEN1);
On 2016/05/13 04:05:47, peah-webrtc wrote:
> On 2016/05/12 11:29:58, kwiberg-webrtc wrote:
> > On 2016/05/12 11:19:39, ivoc wrote:
> > > On 2016/05/12 11:07:50, peah-webrtc wrote:
> > > > On 2016/05/12 10:42:43, ivoc wrote:
> > > > > Is this better than sizeof(hNl), or does that not work with the new
> > > structure?
> > > > 
> > > > No, I would have preferred the previous way to do it, but the compiler
> > > > complained so I needed to change the memcpy call to be like this. I
think
> > the
> > > > difference may be that the compiler only has access to a pointer to the
> > matrix
> > > > in this case, while it in the former case had full access to the actual
> > > variable
> > > > declaration.
> > > 
> > > I see, that makes sense, thanks.
> > 
> > It'll work if you pass a reference to the array as an argument. Passing just
> the
> > array like you do here is equivalent to passing a pointer, for historical
> > reasons.
> > 
> > The syntax for passing a reference to an array is a wee bit awkward because
> you
> > need extra parentheses: T (&array)[N].
> > 
> > Side note: Since this code is C++ now, you can use std::copy instead of
> memcpy.
> > Once they are arrays, you ought to be able to write e.g.
> > 
> >   std::copy(std::begin(cohde), std::end(cohde), std::begin(hNl));
> 
> Thanks! The ::copy approach is definitely much nicer than the memcpy. Will
adopt
> that asap :-)

Do note that while it's specialized for trivial types, IIRC it uses memmove
rather than memcpy since it can't assume nonoverlapping source and target
arrays. So in really really performance-critical situations, memcpy is still a
valid choice. In this case the ease-of-use seems like a good trade-off, though.

Powered by Google App Engine
This is Rietveld 408576698