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

Issue 2090583002: New module for the adaptive level controlling functionality in the audio processing module (Closed)

Created:
4 years, 6 months ago by peah-webrtc
Modified:
4 years, 4 months ago
CC:
webrtc-reviews_webrtc.org, interface-changes_webrtc.org, yujie_mao (webrtc), kwiberg-webrtc, Andrew MacDonald, hlundin-webrtc, tterriberry_mozilla.com, audio-team_agora.io, qiang.lu, niklas.enbom, minyue-webrtc, the sun, aluebs-webrtc, bjornv1, ehmaldonado_webrtc
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

New module for the adaptive level controlling functionality in the audio processing module NOTRY=true TBR=aluebs@webrtc.org BUG=webrtc:5920 Committed: https://crrev.com/ca4cac7e7494e7b5d60bda4b21b6a00592f8e1df Cr-Commit-Position: refs/heads/master@{#13333}

Patch Set 1 #

Patch Set 2 : Adding missing include #

Patch Set 3 : Changed downsampler coefficients #

Patch Set 4 : Corrected the level controller integration #

Patch Set 5 : Added complexity benchmarking performance unittest #

Patch Set 6 : Corrected the initial behavior for the peak level estimate, and ensured a nonzero minimum peak leve… #

Total comments: 184

Patch Set 7 : Functionality updates to improve robustness in noise-only scenarios #

Patch Set 8 : Partially applied the changes in response to reviewer comments #

Patch Set 9 : Changes in response to reviewer comments #

Patch Set 10 : Added missing checks for APM API call return values #

Patch Set 11 : Corrected an assignment error #

Total comments: 41

Patch Set 12 : Changes in response to reviewer comments #

Total comments: 4

Patch Set 13 : Added API method to obtain the latest applied gain #

Patch Set 14 : Added reporting of metrics #

Total comments: 8

Patch Set 15 : Added log-line that reports whether the level controller is explicitly activated/deactivated #

Patch Set 16 : Changes in response to reviewer comments #

Patch Set 17 : Corrected a wrong placement of the addition of the level controller experiment description string i… #

Patch Set 18 : Activated bitexactness tests with preliminary bitexactness test vectors #

Patch Set 19 : Corrected type for the average peak level metric #

Patch Set 20 : Adding missing initialization of the noise spectrum #

Patch Set 21 : Added proper initialization of the dc_level estimator #

Patch Set 22 : Corrected test vector for Android #

Patch Set 23 : Removed comma #

Patch Set 24 : Temporarily deactivated the level controller until the CL with the proper tuning has been landed #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+2113 lines, -12 lines) Patch
M webrtc/common.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_processing/BUILD.gn View 1 chunk +21 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing.gypi View 1 chunk +21 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_impl.h View 3 chunks +6 lines, -2 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 10 chunks +34 lines, -3 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_tests.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/include/audio_processing.h View 1 chunk +8 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/biquad_filter.h View 1 2 3 4 5 6 7 8 1 chunk +58 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/biquad_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +35 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/down_sampler.h View 1 2 3 4 5 6 7 8 1 chunk +40 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/down_sampler.cc View 1 2 3 4 5 6 7 8 1 chunk +101 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/gain_applier.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +40 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/gain_applier.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +143 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/gain_selector.h View 1 2 3 4 5 6 7 1 chunk +39 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/gain_selector.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +85 lines, -0 lines 0 comments Download
A + webrtc/modules/audio_processing/level_controller/lc_constants.h View 1 chunk +7 lines, -4 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/level_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +80 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/level_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +230 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/level_controller_complexity_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +345 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +122 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/noise_level_estimator.h View 1 2 3 4 5 6 7 8 1 chunk +37 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/noise_level_estimator.cc View 1 2 3 4 5 6 7 8 1 chunk +72 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.h View 1 2 3 4 5 6 7 8 1 chunk +40 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc View 1 2 3 4 5 6 7 8 1 chunk +68 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/peak_level_estimator.h View 1 2 3 4 5 6 7 8 1 chunk +36 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/peak_level_estimator.cc View 1 2 3 4 5 6 7 8 1 chunk +58 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h View 1 2 3 4 5 6 7 8 1 chunk +37 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.cc View 1 chunk +48 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/signal_classifier.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +65 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/level_controller/signal_classifier.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +166 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/logging/apm_data_dumper.h View 2 chunks +25 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/test/audio_processing_simulator.h View 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/modules/audio_processing/test/audio_processing_simulator.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/test/audioproc_float.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/test/debug_dump_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +24 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/test/process_test.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M webrtc/modules/modules.gyp View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M webrtc/webrtc_tests.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 4 comments Download

Dependent Patchsets:

Messages

Total messages: 64 (24 generated)
peah-webrtc
Hi, The level controller functionality is now reviewable. Please have a look! Best, Per
4 years, 6 months ago (2016-06-22 13:20:53 UTC) #2
peah-webrtc
On 2016/06/22 13:20:53, peah-webrtc wrote: > Hi, > The level controller functionality is now reviewable. ...
4 years, 6 months ago (2016-06-23 07:18:27 UTC) #3
peah-webrtc
+tina.legrand@ as an owner of webrtc/common.h
4 years, 6 months ago (2016-06-23 11:46:42 UTC) #5
tlegrand-webrtc
On 2016/06/23 11:46:42, peah-webrtc wrote: > +tina.legrand@ as an owner of webrtc/common.h LGTM for webrtc/common.h.
4 years, 6 months ago (2016-06-23 13:32:20 UTC) #6
hlundin-webrtc
Very nice work! I have a few (I lied...) comments. https://codereview.webrtc.org/2090583002/diff/100001/webrtc/modules/audio_processing/level_controller/biquad_filter.cc File webrtc/modules/audio_processing/level_controller/biquad_filter.cc (right): https://codereview.webrtc.org/2090583002/diff/100001/webrtc/modules/audio_processing/level_controller/biquad_filter.cc#newcode20 ...
4 years, 5 months ago (2016-06-27 11:21:17 UTC) #7
peah-webrtc
Thanks for the careful review and all the great comments! I have addressed them in ...
4 years, 5 months ago (2016-06-27 22:51:50 UTC) #8
aleloi
This looks very nice! I have learned a lot while reading. Here are some comments ...
4 years, 5 months ago (2016-06-28 09:35:52 UTC) #9
aleloi
https://codereview.webrtc.org/2090583002/diff/200001/webrtc/modules/audio_processing/level_controller/down_sampler.cc File webrtc/modules/audio_processing/level_controller/down_sampler.cc (right): https://codereview.webrtc.org/2090583002/diff/200001/webrtc/modules/audio_processing/level_controller/down_sampler.cc#newcode71 webrtc/modules/audio_processing/level_controller/down_sampler.cc:71: data_dumper_->DumpWav("lc_down_sampler_input", in, sample_rate_hz_, 1); On 2016/06/28 09:35:51, aleloi wrote: ...
4 years, 5 months ago (2016-06-28 09:40:01 UTC) #10
hlundin-webrtc
Wow. Much improve. Very better. https://codereview.webrtc.org/2090583002/diff/100001/webrtc/modules/audio_processing/level_controller/down_sampler.h File webrtc/modules/audio_processing/level_controller/down_sampler.h (right): https://codereview.webrtc.org/2090583002/diff/100001/webrtc/modules/audio_processing/level_controller/down_sampler.h#newcode27 webrtc/modules/audio_processing/level_controller/down_sampler.h:27: ~DownSampler(); On 2016/06/27 22:51:47, ...
4 years, 5 months ago (2016-06-28 11:29:01 UTC) #11
peah-webrtc
Thanks for the great comments! I have uploaded a patch with the changes done in ...
4 years, 5 months ago (2016-06-28 22:19:38 UTC) #12
peah-webrtc
Thanks for the great comments!!! I have uploaded a patch with the changes done in ...
4 years, 5 months ago (2016-06-28 22:21:17 UTC) #13
aluebs-webrtc
drive-by https://codereview.webrtc.org/2090583002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2090583002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode775 webrtc/modules/audio_processing/audio_processing_impl.cc:775: private_submodules_->level_controller->Process(ca); I am not sure how this component ...
4 years, 5 months ago (2016-06-28 22:45:02 UTC) #15
peah-webrtc
https://codereview.webrtc.org/2090583002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2090583002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode775 webrtc/modules/audio_processing/audio_processing_impl.cc:775: private_submodules_->level_controller->Process(ca); On 2016/06/28 22:45:02, aluebs-webrtc wrote: > I am ...
4 years, 5 months ago (2016-06-29 06:22:09 UTC) #16
hlundin-webrtc
A few nits, then I'm happy. https://codereview.webrtc.org/2090583002/diff/200001/webrtc/modules/audio_processing/level_controller/down_sampler.cc File webrtc/modules/audio_processing/level_controller/down_sampler.cc (right): https://codereview.webrtc.org/2090583002/diff/200001/webrtc/modules/audio_processing/level_controller/down_sampler.cc#newcode84 webrtc/modules/audio_processing/level_controller/down_sampler.cc:84: low_pass_filter_.Process(in, rtc::ArrayView<float>(x, in.size())); ...
4 years, 5 months ago (2016-06-29 08:56:28 UTC) #18
peah-webrtc
https://codereview.webrtc.org/2090583002/diff/200001/webrtc/modules/audio_processing/level_controller/down_sampler.cc File webrtc/modules/audio_processing/level_controller/down_sampler.cc (right): https://codereview.webrtc.org/2090583002/diff/200001/webrtc/modules/audio_processing/level_controller/down_sampler.cc#newcode84 webrtc/modules/audio_processing/level_controller/down_sampler.cc:84: low_pass_filter_.Process(in, rtc::ArrayView<float>(x, in.size())); On 2016/06/29 08:56:28, hlundin-webrtc wrote: > ...
4 years, 5 months ago (2016-06-29 09:13:53 UTC) #19
hlundin-webrtc
lgtm
4 years, 5 months ago (2016-06-29 09:24:57 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2090583002/370001
4 years, 5 months ago (2016-06-29 10:33:22 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_dbg on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_dbg/builds/14593)
4 years, 5 months ago (2016-06-29 10:48:35 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2090583002/410001
4 years, 5 months ago (2016-06-29 12:21:49 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_dbg on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_dbg/builds/14604)
4 years, 5 months ago (2016-06-29 12:30:00 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2090583002/430001
4 years, 5 months ago (2016-06-29 13:56:08 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_dbg on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_dbg/builds/14611)
4 years, 5 months ago (2016-06-29 14:03:25 UTC) #32
aleloi
LGTM! It looks very nice https://codereview.webrtc.org/2090583002/diff/200001/webrtc/modules/audio_processing/level_controller/down_sampler.h File webrtc/modules/audio_processing/level_controller/down_sampler.h (right): https://codereview.webrtc.org/2090583002/diff/200001/webrtc/modules/audio_processing/level_controller/down_sampler.h#newcode32 webrtc/modules/audio_processing/level_controller/down_sampler.h:32: int down_sampling_factor_; On 2016/06/28 ...
4 years, 5 months ago (2016-06-29 14:11:18 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2090583002/450001
4 years, 5 months ago (2016-06-29 15:30:37 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_dbg/builds/14621)
4 years, 5 months ago (2016-06-29 15:43:17 UTC) #39
aluebs-webrtc
https://codereview.webrtc.org/2090583002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2090583002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode775 webrtc/modules/audio_processing/audio_processing_impl.cc:775: private_submodules_->level_controller->Process(ca); On 2016/06/29 06:22:09, peah-webrtc wrote: > On 2016/06/28 ...
4 years, 5 months ago (2016-06-29 16:40:28 UTC) #40
peah-webrtc
https://codereview.webrtc.org/2090583002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2090583002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode775 webrtc/modules/audio_processing/audio_processing_impl.cc:775: private_submodules_->level_controller->Process(ca); On 2016/06/29 16:40:28, aluebs-webrtc wrote: > On 2016/06/29 ...
4 years, 5 months ago (2016-06-29 20:40:00 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2090583002/470001
4 years, 5 months ago (2016-06-29 21:06:22 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_dbg/builds/14637)
4 years, 5 months ago (2016-06-29 21:21:17 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2090583002/470001
4 years, 5 months ago (2016-06-29 21:54:19 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_dbg/builds/14640)
4 years, 5 months ago (2016-06-29 22:02:03 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2090583002/470001
4 years, 5 months ago (2016-06-29 22:24:01 UTC) #53
commit-bot: I haz the power
Committed patchset #24 (id:470001)
4 years, 5 months ago (2016-06-29 22:26:18 UTC) #55
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-06-29 22:26:23 UTC) #56
commit-bot: I haz the power
Patchset 24 (id:??) landed as https://crrev.com/ca4cac7e7494e7b5d60bda4b21b6a00592f8e1df Cr-Commit-Position: refs/heads/master@{#13333}
4 years, 5 months ago (2016-06-29 22:26:31 UTC) #58
kjellander_webrtc
Edward found an error in this CL. Can you fix? https://codereview.webrtc.org/2090583002/diff/470001/webrtc/webrtc_tests.gypi File webrtc/webrtc_tests.gypi (right): https://codereview.webrtc.org/2090583002/diff/470001/webrtc/webrtc_tests.gypi#newcode437 ...
4 years, 4 months ago (2016-08-17 15:21:19 UTC) #60
peah-webrtc
https://codereview.webrtc.org/2090583002/diff/470001/webrtc/webrtc_tests.gypi File webrtc/webrtc_tests.gypi (right): https://codereview.webrtc.org/2090583002/diff/470001/webrtc/webrtc_tests.gypi#newcode437 webrtc/webrtc_tests.gypi:437: 'modules/audio_processing/level_controller/level_controller_complexity_unittest.cc', On 2016/08/17 15:21:19, kjellander_webrtc wrote: > I failed ...
4 years, 4 months ago (2016-08-18 05:48:05 UTC) #61
peah-webrtc
https://codereview.webrtc.org/2090583002/diff/470001/webrtc/webrtc_tests.gypi File webrtc/webrtc_tests.gypi (right): https://codereview.webrtc.org/2090583002/diff/470001/webrtc/webrtc_tests.gypi#newcode437 webrtc/webrtc_tests.gypi:437: 'modules/audio_processing/level_controller/level_controller_complexity_unittest.cc', On 2016/08/18 05:48:05, peah-webrtc wrote: > On 2016/08/17 ...
4 years, 4 months ago (2016-08-18 06:40:08 UTC) #62
kjellander_webrtc
I posted my comment in the wrong file, but you figured it out anyway :) ...
4 years, 4 months ago (2016-08-18 07:25:29 UTC) #63
peah-webrtc
4 years, 4 months ago (2016-08-18 07:26:34 UTC) #64
Message was sent while issue was closed.
On 2016/08/18 07:25:29, kjellander_webrtc wrote:
> I posted my comment in the wrong file, but you figured it out anyway :)
> 
> https://codereview.webrtc.org/2090583002/diff/470001/webrtc/webrtc_tests.gypi
> File webrtc/webrtc_tests.gypi (right):
> 
>
https://codereview.webrtc.org/2090583002/diff/470001/webrtc/webrtc_tests.gypi...
> webrtc/webrtc_tests.gypi:437:
>
'modules/audio_processing/level_controller/level_controller_complexity_unittest.cc',
> On 2016/08/18 06:40:08, peah-webrtc wrote:
> > On 2016/08/18 05:48:05, peah-webrtc wrote:
> > > On 2016/08/17 15:21:19, kjellander_webrtc wrote:
> > > > I failed to spot this error. This line should have been added into
> > > > webrtc/modules/BUILD.gn in order to be in the same target as GYP
> > > > (modules_unittests).
> > > > Can you fix in a follow-up CL?
> > > 
> > > I can definitely do that.
> > > I'm not really sure what is incorrect though. Is there a special reason
why
> > this
> > > test should go into modules_unittests?
> > > 
> > > The CL https://codereview.webrtc.org/2178963002 added this test to
> > > webrtc/BUILD.gn where the other performance tests are defined and to me
that
> > > looks ok. But please correct me if I'm wrong!
> > > 
> > > 
> > > 
> > 
> > I think you meant the level_controller_unittest.cc file, right? That is
indeed
> > missing from modules/BUILD.gn. I'll add that in a new CL.
> 
> Oh, right. Sorry for posting the comment on the wrong line :P Confusing to say
> the least.

No worries! Thanks for finding this out!

Powered by Google App Engine
This is Rietveld 408576698