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

Issue 2678423005: Finalization of the first version of EchoCanceller 3 (Closed)

Created:
3 years, 10 months ago by peah-webrtc
Modified:
3 years, 10 months ago
Reviewers:
ivoc, hlundin-webrtc, aleloi
CC:
webrtc-reviews_webrtc.org, peah-webrtc, Andrew MacDonald, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, kwiberg-webrtc, minyue-webrtc, the sun, aluebs-webrtc, bjornv1
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Finalization of the first version of EchoCanceller 3 This CL adds the remaining code for the first version of EchoCanceller3. TBR=aleloi@webrtc.org BUG=webrtc:6018 Review-Url: https://codereview.webrtc.org/2678423005 Cr-Commit-Position: refs/heads/master@{#16801} Committed: https://chromium.googlesource.com/external/webrtc/+/522d71bf3605e99f4a2b5fd253d5ccd171575e7d

Patch Set 1 #

Total comments: 280

Patch Set 2 : Many further changes #

Patch Set 3 : Added missing DCHECKS and a comment #

Patch Set 4 : Refactored the residual echo estimation code #

Patch Set 5 : Fixed failing unittest #

Total comments: 124

Patch Set 6 : Changes in response to reviewer comments #

Total comments: 122

Patch Set 7 : Changes in response to reviewer comments, as well as an update to the output selector behavior #

Patch Set 8 : Tuning for switching between the subtractor output and the capture input, and for the amount of sup… #

Patch Set 9 : Corrected the unittest for the OutputSelector #

Patch Set 10 : Rebase #

Total comments: 6

Patch Set 11 : Changes in response to reviewer comments #

Patch Set 12 : Fixed compilation error #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+6668 lines, -270 lines) Patch
M webrtc/modules/audio_processing/BUILD.gn View 1 2 chunks +55 lines, -5 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h View 1 2 3 4 5 1 chunk +115 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc View 1 2 3 4 5 1 chunk +309 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc View 1 2 3 4 5 1 chunk +219 lines, -0 lines 0 comments Download
A + webrtc/modules/audio_processing/aec3/aec3_common.h View 1 2 3 4 5 6 3 chunks +18 lines, -3 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/aec3_common.cc View 1 1 chunk +27 lines, -0 lines 0 comments Download
D webrtc/modules/audio_processing/aec3/aec3_constants.h View 1 1 chunk +0 lines, -68 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/aec3_fft.h View 1 2 3 4 5 1 chunk +60 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/aec3_fft.cc View 1 2 3 4 5 1 chunk +42 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/aec3_fft_unittest.cc View 1 2 3 4 5 6 1 chunk +211 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/aec_state.h View 1 2 3 4 5 6 1 chunk +127 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/aec_state.cc View 1 2 3 4 5 6 1 chunk +162 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/aec_state_unittest.cc View 1 2 3 4 1 chunk +276 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/block_framer.h View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec3/block_framer_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec3/block_processor.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec3/block_processor_unittest.cc View 1 2 3 4 5 6 2 chunks +3 lines, -1 line 0 comments Download
A webrtc/modules/audio_processing/aec3/comfort_noise_generator.h View 1 2 3 4 5 1 chunk +68 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc View 1 2 3 4 5 1 chunk +208 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc View 1 2 3 4 5 1 chunk +119 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/decimator_by_4.h View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec3/decimator_by_4_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec3/echo_canceller3.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +11 lines, -14 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/echo_canceller3_unittest.cc View 1 2 3 4 5 6 16 chunks +55 lines, -31 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/echo_path_variability.h View 1 chunk +1 line, -2 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/echo_path_variability.cc View 1 1 chunk +18 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/echo_path_variability_unittest.cc View 1 chunk +39 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/echo_remover.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +200 lines, -22 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/echo_remover_unittest.cc View 1 2 3 4 5 6 7 chunks +74 lines, -7 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/erl_estimator.h View 1 2 3 4 5 6 1 chunk +43 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/erl_estimator.cc View 1 2 3 4 5 6 1 chunk +63 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/erl_estimator_unittest.cc View 1 1 chunk +70 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/erle_estimator.h View 1 2 3 4 5 6 1 chunk +44 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/erle_estimator.cc View 1 2 3 4 5 6 1 chunk +65 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/erle_estimator_unittest.cc View 1 1 chunk +66 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/fft_buffer.h View 1 2 3 4 5 1 chunk +70 lines, -0 lines 2 comments Download
A webrtc/modules/audio_processing/aec3/fft_buffer.cc View 1 1 chunk +72 lines, -0 lines 3 comments Download
A webrtc/modules/audio_processing/aec3/fft_buffer_unittest.cc View 1 1 chunk +76 lines, -0 lines 5 comments Download
A webrtc/modules/audio_processing/aec3/fft_data.h View 1 2 3 4 5 1 chunk +98 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/fft_data_unittest.cc View 1 1 chunk +163 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/frame_blocker.h View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec3/frame_blocker.cc View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec3/frame_blocker_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
A webrtc/modules/audio_processing/aec3/main_filter_update_gain.h View 1 1 chunk +56 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +117 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/main_filter_update_gain_unittest.cc View 1 1 chunk +287 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/matched_filter.h View 1 2 3 4 5 3 chunks +28 lines, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec3/matched_filter.cc View 1 2 3 4 5 6 5 chunks +148 lines, -64 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator_unittest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc View 1 2 3 4 5 6 7 chunks +61 lines, -10 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/mock/mock_render_delay_buffer.h View 1 1 chunk +1 line, -1 line 0 comments Download
A webrtc/modules/audio_processing/aec3/output_selector.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +41 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/output_selector.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +72 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/output_selector_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +71 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/power_echo_model.h View 1 2 3 4 5 1 chunk +61 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/power_echo_model.cc View 1 2 3 4 5 1 chunk +111 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/power_echo_model_unittest.cc View 1 2 3 4 5 1 chunk +133 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/render_delay_buffer.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec3/render_delay_buffer_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec3/render_delay_controller.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_processing/aec3/render_delay_controller_unittest.cc View 1 5 chunks +9 lines, -8 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/render_signal_analyzer.h View 1 1 chunk +54 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/render_signal_analyzer.cc View 1 1 chunk +66 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/render_signal_analyzer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +123 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/residual_echo_estimator.h View 1 2 3 4 5 1 chunk +52 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc View 1 2 3 4 5 6 7 1 chunk +215 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/residual_echo_estimator_unittest.cc View 1 2 3 4 5 1 chunk +87 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.h View 1 1 chunk +39 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.cc View 1 2 3 4 5 6 1 chunk +60 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/shadow_filter_update_gain_unittest.cc View 1 1 chunk +187 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/subtractor.h View 1 2 3 4 5 6 1 chunk +79 lines, -0 lines 1 comment Download
A webrtc/modules/audio_processing/aec3/subtractor.cc View 1 2 3 4 5 6 1 chunk +117 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/subtractor_output.h View 1 1 chunk +44 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/subtractor_unittest.cc View 1 2 3 4 5 6 1 chunk +175 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/suppression_filter.h View 1 2 3 4 5 1 chunk +43 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/suppression_filter.cc View 1 2 3 4 5 6 1 chunk +178 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/suppression_filter_unittest.cc View 1 2 3 4 5 1 chunk +180 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/suppression_gain.h View 1 2 3 4 5 1 chunk +64 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/suppression_gain.cc View 1 2 3 4 5 6 7 1 chunk +282 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc View 1 2 3 4 5 1 chunk +148 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_impl.cc View 1 3 chunks +14 lines, -15 lines 0 comments Download

Messages

Total messages: 73 (41 generated)
peah-webrtc
Hi, Here is the final of the CLs for landing the first version of AEC3. ...
3 years, 10 months ago (2017-02-08 15:04:41 UTC) #7
aleloi
The first few comments of a probably very long sequence. https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_processing/aec3/echo_remover.cc File webrtc/modules/audio_processing/aec3/echo_remover.cc (right): https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_processing/aec3/echo_remover.cc#newcode172 ...
3 years, 10 months ago (2017-02-09 17:02:59 UTC) #8
ivoc
First comments about the scary set pt.1, it was surprisingly a lot less scary than ...
3 years, 10 months ago (2017-02-10 13:52:35 UTC) #9
aleloi
And yet another portion of comments. Getting there! https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_processing/aec3/echo_remover.cc File webrtc/modules/audio_processing/aec3/echo_remover.cc (right): https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_processing/aec3/echo_remover.cc#newcode18 webrtc/modules/audio_processing/aec3/echo_remover.cc:18: #include ...
3 years, 10 months ago (2017-02-13 16:44:51 UTC) #11
hlundin-webrtc
First round of comments on my batch of files. I still haven't looked at hadow_filter_update_gain_unittest.cc. ...
3 years, 10 months ago (2017-02-13 21:37:01 UTC) #12
peah-webrtc
Thanks for the great comments! Here is the next update to the CL. https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc File ...
3 years, 10 months ago (2017-02-20 07:37:19 UTC) #13
peah-webrtc
Added a minor patch which fixes the failing memcheck test.
3 years, 10 months ago (2017-02-20 08:52:50 UTC) #14
peah-webrtc
Added refactoring of the residual echo estimation code.
3 years, 10 months ago (2017-02-20 23:29:07 UTC) #15
hlundin-webrtc
Some comments on the files that I have now re-reviewed. LG in general. I will ...
3 years, 10 months ago (2017-02-21 09:40:04 UTC) #23
hlundin-webrtc
I took a look at the files that seemed to have had no reviews so ...
3 years, 10 months ago (2017-02-21 16:34:03 UTC) #24
ivoc
https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_processing/aec3/aec_state.cc File webrtc/modules/audio_processing/aec3/aec_state.cc (right): https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_processing/aec3/aec_state.cc#newcode29 webrtc/modules/audio_processing/aec3/aec_state.cc:29: const float kX2Min = 44015068.0f / 1000.f; On 2017/02/20 ...
3 years, 10 months ago (2017-02-21 17:26:02 UTC) #25
peah-webrtc
Thanks again for the comments! I've uploaded a patch with changes in response to those. ...
3 years, 10 months ago (2017-02-21 23:00:42 UTC) #26
hlundin-webrtc
Getting close now! New batch of comments, all of them minor or nits. https://codereview.webrtc.org/2678423005/diff/160001/webrtc/modules/audio_processing/aec3/aec3_fft_unittest.cc File ...
3 years, 10 months ago (2017-02-22 15:24:07 UTC) #27
aleloi
A few comments, more coming later. https://codereview.webrtc.org/2678423005/diff/180001/webrtc/modules/audio_processing/BUILD.gn File webrtc/modules/audio_processing/BUILD.gn (right): https://codereview.webrtc.org/2678423005/diff/180001/webrtc/modules/audio_processing/BUILD.gn#newcode90 webrtc/modules/audio_processing/BUILD.gn:90: "aec3/suppression_gain.h", I guess ...
3 years, 10 months ago (2017-02-22 16:20:31 UTC) #28
ivoc
https://codereview.webrtc.org/2678423005/diff/160001/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h File webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h (right): https://codereview.webrtc.org/2678423005/diff/160001/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h#newcode24 webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h:24: #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" On 2017/02/21 23:00:40, peah-webrtc wrote: > On ...
3 years, 10 months ago (2017-02-22 17:08:13 UTC) #29
hlundin-webrtc
Comments for echo_canceller3_unittest.cc. https://codereview.webrtc.org/2678423005/diff/180001/webrtc/modules/audio_processing/aec3/echo_canceller3_unittest.cc File webrtc/modules/audio_processing/aec3/echo_canceller3_unittest.cc (right): https://codereview.webrtc.org/2678423005/diff/180001/webrtc/modules/audio_processing/aec3/echo_canceller3_unittest.cc#newcode609 webrtc/modules/audio_processing/aec3/echo_canceller3_unittest.cc:609: void OptionalRenderBandSplit() { OptionalRenderBandSplit looks exactly ...
3 years, 10 months ago (2017-02-22 20:54:16 UTC) #30
hlundin-webrtc
Comments for Subtractor. https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_processing/aec3/subtractor.h File webrtc/modules/audio_processing/aec3/subtractor.h (right): https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_processing/aec3/subtractor.h#newcode52 webrtc/modules/audio_processing/aec3/subtractor.h:52: return std::max(kMainFilterLength, kShadowFilterLength); On 2017/02/20 07:37:19, ...
3 years, 10 months ago (2017-02-22 21:17:29 UTC) #31
hlundin-webrtc
Comments for Subtractor.
3 years, 10 months ago (2017-02-22 21:17:32 UTC) #32
peah-webrtc
Hi, Thanks for the comments! I've uploaded a new patch with the changes in response ...
3 years, 10 months ago (2017-02-22 23:51:40 UTC) #33
hlundin-webrtc
I did not look at the following files: aec_state_unittest.cc comfort_noise_generator* echo_remover* fft_data* matched_filter.{h,cc} matcher_filter_unittest.cc All ...
3 years, 10 months ago (2017-02-23 07:42:09 UTC) #38
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/2678423005/240001
3 years, 10 months ago (2017-02-23 09:02:57 UTC) #44
hlundin-webrtc
The tuning in PS8-9 LGTM.
3 years, 10 months ago (2017-02-23 09:12:00 UTC) #48
ivoc
On 2017/02/23 09:12:00, hlundin-webrtc wrote: > The tuning in PS8-9 LGTM. LGTM. I didn't look ...
3 years, 10 months ago (2017-02-23 10:33:50 UTC) #51
aleloi
A few comments more. https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_processing/aec3/echo_remover.cc File webrtc/modules/audio_processing/aec3/echo_remover.cc (right): https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_processing/aec3/echo_remover.cc#newcode35 webrtc/modules/audio_processing/aec3/echo_remover.cc:35: #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" On 2017/02/20 07:37:16, ...
3 years, 10 months ago (2017-02-23 10:56:45 UTC) #52
peah-webrtc
Hi, Thanks for the feedback! I've uploaded a new patch. PTAL https://codereview.webrtc.org/2678423005/diff/160001/webrtc/modules/audio_processing/aec3/suppression_gain.cc File webrtc/modules/audio_processing/aec3/suppression_gain.cc (right): ...
3 years, 10 months ago (2017-02-23 11:18:33 UTC) #53
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/2678423005/300001
3 years, 10 months ago (2017-02-23 11:59:58 UTC) #61
commit-bot: I haz the power
Try jobs failed on following builders: ios32_sim_ios9_dbg on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/ios32_sim_ios9_dbg/builds/1795)
3 years, 10 months ago (2017-02-23 12:06:31 UTC) #63
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/2678423005/300001
3 years, 10 months ago (2017-02-23 12:23:44 UTC) #65
commit-bot: I haz the power
Try jobs failed on following builders: ios32_sim_ios9_dbg on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/ios32_sim_ios9_dbg/builds/1801)
3 years, 10 months ago (2017-02-23 12:37:28 UTC) #67
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/2678423005/300001
3 years, 10 months ago (2017-02-23 13:13:17 UTC) #69
commit-bot: I haz the power
Committed patchset #12 (id:300001) as https://chromium.googlesource.com/external/webrtc/+/522d71bf3605e99f4a2b5fd253d5ccd171575e7d
3 years, 10 months ago (2017-02-23 13:16:34 UTC) #72
aleloi
3 years, 10 months ago (2017-02-23 15:16:01 UTC) #73
Message was sent while issue was closed.
A few comments more.

https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_proc...
File webrtc/modules/audio_processing/aec3/subtractor.h (right):

https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_proc...
webrtc/modules/audio_processing/aec3/subtractor.h:48: std::vector<size_t>
NumBlocksInRenderSums() const;
On 2017/02/20 07:37:19, peah-webrtc wrote:
> On 2017/02/13 16:44:51, aleloi wrote:
> > This could probably be a constexpr function if the return type is changed
from
> > std::vector and the filter length constants are constexpr.
> 
> That makes sense. This should be changed, but I prefer to keep that for
another
> CL.
> 
> If the current tuning holds, the shadow and main filters are equally long,
which
> means that they should be applied and updated jointly. Then this method will
be
> changed as well.
> 
> WDYT?

sgtm

https://codereview.webrtc.org/2678423005/diff/70001/webrtc/modules/audio_proc...
webrtc/modules/audio_processing/aec3/subtractor.h:52: return
std::max(kMainFilterLength, kShadowFilterLength);
On 2017/02/22 21:17:28, hlundin-webrtc wrote:
> On 2017/02/20 07:37:19, peah-webrtc wrote:
> > On 2017/02/13 16:44:51, aleloi wrote:
> > > Can be a constexpr function if the constants are costexpr.
> > 
> > Not fully sure how I can make the constants constexpr. Either way I try, I
get
> > different errors. Do you have any suggestion on how to accomplish that?
> 
> You will have to make them static constexpr. Then you should be able to  make
> the function constexpr too, I believe.

Acknowledged.

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
File webrtc/modules/audio_processing/aec3/fft_buffer.cc (right):

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec3/fft_buffer.cc:56: // Pre-compute and cachec
the spectral sums.
cachec -> cache

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec3/fft_buffer.cc:58:
spectrum_buffer_[position_].end(), spectral_sums_[0].begin());
Does this caching really save time? I profiled something similar recently where
3 frames were added (instead of 12), and there was no noticeable improvement.
Code would be a little simpler if all calculation is done in the loop.

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec3/fft_buffer.cc:63: 
IMO readability improvement (optional): compute the position by

position = position_;
for j=1..:
  position = (condition) ? position + 1 : 0;
  // spectrum update


Alternatively update the position inside the loop header:

for (position = ..., j=...; condition; ++j, position = ...)

pro: scope of 'position' limited to loop.
con: more syntactic overhead.

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
File webrtc/modules/audio_processing/aec3/fft_buffer.h (right):

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec3/fft_buffer.h:28: // sums in the call to
SpectralSum.
Comment about the vector seemed unclear to me. Suggested rewording: "vector
contains values |num_ffts| that the SpectralSum method of the created instance
will support."

That didn't sound perfect either.

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec3/fft_buffer.h:44: // Returns the sum of the
spectrums for a certain number of FFTs.
Suggestion: change comment to "Returns the sum of the spectrums of the
|num_ffts| most recent FFTs."

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
File webrtc/modules/audio_processing/aec3/fft_buffer_unittest.cc (right):

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec3/fft_buffer_unittest.cc:27:
EXPECT_DEATH(FftBuffer(Aec3Optimization::kNone, 1, std::vector<size_t>(2, 1)),
This
FftBuffer(Aec3Optimization::kNone, 1, {1, 1})

saves reading/thinking time :)

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec3/fft_buffer_unittest.cc:32:
EXPECT_DEATH(FftBuffer(Aec3Optimization::kNone, 1, std::vector<size_t>()),
Same here.

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec3/fft_buffer_unittest.cc:38: TEST(FftBuffer,
FeasibleNumberOfFftsInSum) {
Perhaps 
Feasible -> InFeasible
?
Otherwise naming inconsistent with the two test names above.

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec3/fft_buffer_unittest.cc:39:
EXPECT_DEATH(FftBuffer(Aec3Optimization::kNone, 1, std::vector<size_t>(1, 2)),
And here.

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec3/fft_buffer_unittest.cc:49:
std::vector<size_t>(1, kBufferSize));
vector<...>(...) --> {kBufferSize}

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
File webrtc/modules/audio_processing/aec3/subtractor.h (right):

https://codereview.webrtc.org/2678423005/diff/300001/webrtc/modules/audio_pro...
webrtc/modules/audio_processing/aec3/subtractor.h:63: const size_t
kMainFilterSizePartitions = 12;
Here's how to make it constexpr:

* declare/define as 'static constexpr size_t ... = 12' here in the .h file
* make sure the compiler allocates memory by writing 'constexpr size_t
Subtractor:...' in the .cc file.

Powered by Google App Engine
This is Rietveld 408576698