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

Issue 1581183005: Cleaning up AEC metrics. (Closed)

Created:
4 years, 11 months ago by minyue-webrtc
Modified:
4 years, 7 months ago
CC:
webrtc-reviews_webrtc.org, Andrew MacDonald, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, kwiberg-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

Cleaning up AEC metrics. Current implementation of AEC metrics does not read nicely. It messes up between a noise-removed calculation and a raw calculation. I tried to clean it up, in which, I stick to the raw calculation since the noise-removed version can show some problem when the noise is overestimated. BUG= Committed: https://crrev.com/2b6707826e4c73662c4196f5c999fee3f13538ba Cr-Commit-Position: refs/heads/master@{#12455}

Patch Set 1 #

Total comments: 11

Patch Set 2 : rebasing #

Patch Set 3 : adding protect over division #

Total comments: 28

Patch Set 4 : improve the calculation #

Total comments: 8

Patch Set 5 : rebasing #

Patch Set 6 : renaming a function #

Total comments: 12

Patch Set 7 : revising comment #

Total comments: 15
Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -87 lines) Patch
M webrtc/modules/audio_processing/aec/aec_core.h View 1 2 3 1 chunk +2 lines, -2 lines 1 comment Download
M webrtc/modules/audio_processing/aec/aec_core.cc View 1 2 3 4 5 6 4 chunks +45 lines, -85 lines 14 comments Download

Messages

Total messages: 35 (7 generated)
minyue-webrtc
Hi Per and Tina, I tried to clean up the AEC metrics calculation. There is ...
4 years, 11 months ago (2016-01-14 12:30:21 UTC) #3
minyue-webrtc
On 2016/01/14 12:30:21, minyue-webrtc wrote: > Hi Per and Tina, > > I tried to ...
4 years, 11 months ago (2016-01-14 13:37:18 UTC) #4
peah-webrtc
https://codereview.webrtc.org/1581183005/diff/1/webrtc/modules/audio_processing/aec/aec_core.c File webrtc/modules/audio_processing/aec/aec_core.c (right): https://codereview.webrtc.org/1581183005/diff/1/webrtc/modules/audio_processing/aec/aec_core.c#newcode332 webrtc/modules/audio_processing/aec/aec_core.c:332: metric->counter++; This increase should handle wraparounds. I know this ...
4 years, 11 months ago (2016-01-15 06:52:20 UTC) #5
peah-webrtc
On 2016/01/14 13:37:18, minyue-webrtc wrote: > On 2016/01/14 12:30:21, minyue-webrtc wrote: > > Hi Per ...
4 years, 11 months ago (2016-01-15 06:56:12 UTC) #6
minyue-webrtc
https://codereview.webrtc.org/1581183005/diff/1/webrtc/modules/audio_processing/aec/aec_core.c File webrtc/modules/audio_processing/aec/aec_core.c (right): https://codereview.webrtc.org/1581183005/diff/1/webrtc/modules/audio_processing/aec/aec_core.c#newcode680 webrtc/modules/audio_processing/aec/aec_core.c:680: UpdateMetric(&aec->erl, 10 * (float)log10(1e-10f + On 2016/01/15 06:52:20, peah-webrtc ...
4 years, 11 months ago (2016-01-15 10:24:50 UTC) #7
minyue-webrtc
Hi, After some rebasing, this CL is ready for review again. To recapitulate what this ...
4 years, 8 months ago (2016-04-13 12:48:34 UTC) #8
tlegrand-webrtc
First set of review comments from me. I think the new way of calculating the ...
4 years, 8 months ago (2016-04-13 14:33:31 UTC) #9
peah-webrtc
https://codereview.webrtc.org/1581183005/diff/1/webrtc/modules/audio_processing/aec/aec_core.c File webrtc/modules/audio_processing/aec/aec_core.c (right): https://codereview.webrtc.org/1581183005/diff/1/webrtc/modules/audio_processing/aec/aec_core.c#newcode332 webrtc/modules/audio_processing/aec/aec_core.c:332: metric->counter++; On 2016/04/13 14:33:31, tlegrand-webrtc wrote: > On 2016/01/15 ...
4 years, 8 months ago (2016-04-14 13:46:11 UTC) #11
kwiberg-webrtc
https://codereview.webrtc.org/1581183005/diff/1/webrtc/modules/audio_processing/aec/aec_core.c File webrtc/modules/audio_processing/aec/aec_core.c (right): https://codereview.webrtc.org/1581183005/diff/1/webrtc/modules/audio_processing/aec/aec_core.c#newcode332 webrtc/modules/audio_processing/aec/aec_core.c:332: metric->counter++; On 2016/04/14 13:46:10, peah-webrtc wrote: > On 2016/04/13 ...
4 years, 8 months ago (2016-04-14 14:01:47 UTC) #13
minyue-webrtc
https://codereview.webrtc.org/1581183005/diff/40001/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1581183005/diff/40001/webrtc/modules/audio_processing/aec/aec_core.cc#newcode373 webrtc/modules/audio_processing/aec/aec_core.cc:373: static void UpdateMetric(Stats* metric, float nomin, float denom) { ...
4 years, 8 months ago (2016-04-14 14:11:12 UTC) #14
peah-webrtc
https://codereview.webrtc.org/1581183005/diff/40001/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1581183005/diff/40001/webrtc/modules/audio_processing/aec/aec_core.cc#newcode373 webrtc/modules/audio_processing/aec/aec_core.cc:373: static void UpdateMetric(Stats* metric, float nomin, float denom) { ...
4 years, 8 months ago (2016-04-15 10:46:37 UTC) #15
minyue-webrtc
Hi, To make the handling of divisor being zero, or a/b resulting in infinity etc, ...
4 years, 8 months ago (2016-04-18 10:56:25 UTC) #16
peah-webrtc
https://codereview.webrtc.org/1581183005/diff/80001/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1581183005/diff/80001/webrtc/modules/audio_processing/aec/aec_core.cc#newcode374 webrtc/modules/audio_processing/aec/aec_core.cc:374: static void UpdateMetric(Stats* metric, float numerator, float denominator) { ...
4 years, 8 months ago (2016-04-19 07:03:37 UTC) #17
minyue-webrtc
https://codereview.webrtc.org/1581183005/diff/80001/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1581183005/diff/80001/webrtc/modules/audio_processing/aec/aec_core.cc#newcode381 webrtc/modules/audio_processing/aec/aec_core.cc:381: metric->instant = 10.0 * (log_numerator - log_denominator); On 2016/04/19 ...
4 years, 8 months ago (2016-04-19 07:21:06 UTC) #18
peah-webrtc
https://codereview.webrtc.org/1581183005/diff/80001/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1581183005/diff/80001/webrtc/modules/audio_processing/aec/aec_core.cc#newcode381 webrtc/modules/audio_processing/aec/aec_core.cc:381: metric->instant = 10.0 * (log_numerator - log_denominator); On 2016/04/19 ...
4 years, 8 months ago (2016-04-19 10:48:34 UTC) #19
minyue-webrtc
On 2016/04/19 10:48:34, peah-webrtc wrote: > https://codereview.webrtc.org/1581183005/diff/80001/webrtc/modules/audio_processing/aec/aec_core.cc > File webrtc/modules/audio_processing/aec/aec_core.cc (right): > > https://codereview.webrtc.org/1581183005/diff/80001/webrtc/modules/audio_processing/aec/aec_core.cc#newcode381 > ...
4 years, 8 months ago (2016-04-20 11:47:17 UTC) #20
peah-webrtc
https://codereview.webrtc.org/1581183005/diff/120001/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1581183005/diff/120001/webrtc/modules/audio_processing/aec/aec_core.cc#newcode369 webrtc/modules/audio_processing/aec/aec_core.cc:369: // Update metric with 10 * log10(numerator / denominator), ...
4 years, 8 months ago (2016-04-20 13:57:41 UTC) #21
minyue-webrtc
Thanks for the feedback! I revised the commenting. https://codereview.webrtc.org/1581183005/diff/120001/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1581183005/diff/120001/webrtc/modules/audio_processing/aec/aec_core.cc#newcode369 webrtc/modules/audio_processing/aec/aec_core.cc:369: // ...
4 years, 8 months ago (2016-04-20 14:30:04 UTC) #22
peah-webrtc
On 2016/04/20 14:30:04, minyue-webrtc wrote: > Thanks for the feedback! I revised the commenting. > ...
4 years, 8 months ago (2016-04-21 07:55:38 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1581183005/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1581183005/140001
4 years, 8 months ago (2016-04-21 07:57:24 UTC) #25
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 8 months ago (2016-04-21 09:07:13 UTC) #27
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/2b6707826e4c73662c4196f5c999fee3f13538ba Cr-Commit-Position: refs/heads/master@{#12455}
4 years, 8 months ago (2016-04-21 09:07:24 UTC) #29
tlegrand-webrtc
On 2016/04/21 09:07:24, commit-bot: I haz the power wrote: > Patchset 7 (id:??) landed as ...
4 years, 8 months ago (2016-04-25 13:04:37 UTC) #30
tlegrand-webrtc
Comments after the fact. https://codereview.webrtc.org/1581183005/diff/140001/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1581183005/diff/140001/webrtc/modules/audio_processing/aec/aec_core.cc#newcode373 webrtc/modules/audio_processing/aec/aec_core.cc:373: RTC_CHECK(numerator >= 0); Why isn't ...
4 years, 8 months ago (2016-04-25 13:09:57 UTC) #31
minyue-webrtc
On 2016/04/25 13:04:37, tlegrand-webrtc wrote: > On 2016/04/21 09:07:24, commit-bot: I haz the power wrote: ...
4 years, 8 months ago (2016-04-25 13:12:59 UTC) #32
kwiberg-webrtc
https://codereview.webrtc.org/1581183005/diff/140001/webrtc/modules/audio_processing/aec/aec_core.cc File webrtc/modules/audio_processing/aec/aec_core.cc (right): https://codereview.webrtc.org/1581183005/diff/140001/webrtc/modules/audio_processing/aec/aec_core.cc#newcode373 webrtc/modules/audio_processing/aec/aec_core.cc:373: RTC_CHECK(numerator >= 0); On 2016/04/25 13:09:56, tlegrand-webrtc wrote: > ...
4 years, 8 months ago (2016-04-25 13:23:58 UTC) #33
minyue-webrtc
Thanks for the comments. I wrote some answers. I think I can make a separate ...
4 years, 8 months ago (2016-04-25 13:26:56 UTC) #34
tlegrand-webrtc
4 years, 7 months ago (2016-04-28 08:17:31 UTC) #35
Message was sent while issue was closed.
Thanks Minyue! Fixing naming on variables can definitiely be done in a follow-up
CL. If you think the log10(a)-log10(b) brings more value than log10(a/b), I'm
fine with that too.

https://codereview.webrtc.org/1581183005/diff/140001/webrtc/modules/audio_pro...
File webrtc/modules/audio_processing/aec/aec_core.cc (right):

https://codereview.webrtc.org/1581183005/diff/140001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec/aec_core.cc:373: RTC_CHECK(numerator >= 0);
On 2016/04/25 13:26:56, minyue-webrtc wrote:
> On 2016/04/25 13:09:56, tlegrand-webrtc wrote:
> > Why isn't numerator =  0 allowed?
> 
> It is allowed, isn't it?

Right, my mistake. I was thinking 0 wouldn't be allowed for the denominator and
confused myself. But I realize now that 0 should be (and is) allowed for both.

https://codereview.webrtc.org/1581183005/diff/140001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec/aec_core.cc:377: const float log_denominator
= log10(denominator + 1e-10f);
On 2016/04/25 13:26:56, minyue-webrtc wrote:
> On 2016/04/25 13:09:56, tlegrand-webrtc wrote:
> > Which is more computational complex, log10 or division? I'm thinking log10
is
> > more expensive, but I'm not sure. If it is, we are wasting cycles here, just
> to
> > get aroung the division with 0, right?
> 
> Per also asked about this. My reasoning was that it is not only to avoid
> dividing by zero, but also to avoid overflow. Say if a/b results in infinity
(b
> does not need to be zero), it does not mean that log(a/b) is infinity. So log
a
> - log b has a better representability.

Acknowledged.

https://codereview.webrtc.org/1581183005/diff/140001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec/aec_core.cc:380: // Max.
On 2016/04/25 13:26:56, minyue-webrtc wrote:
> On 2016/04/25 13:09:56, tlegrand-webrtc wrote:
> > This comment doesn't add any value. Same with "Min." below.
> 
> I agree. I'd like to make a separate CL, which may refactor hicounter etc. as
> well.

Acknowledged.

https://codereview.webrtc.org/1581183005/diff/140001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec/aec_core.cc:395: // Upper mean.
On 2016/04/25 13:26:56, minyue-webrtc wrote:
> On 2016/04/25 13:09:56, tlegrand-webrtc wrote:
> > hicounter, hisum and himean doesn't follow the naming convention. Should be
on
> > the format hi_counter, but I'd like to see something more descriptive than
> "hi".
> 
> True, this will need to refactor other part of AEC. We may better do it in a
> separate CL.

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698