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

Issue 2692333002: Optionally disable APM limiter in AudioMixer. (Closed)

Created:
3 years, 10 months ago by aleloi
Modified:
3 years, 10 months ago
Reviewers:
ivoc, hlundin-webrtc
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, hlundin-webrtc
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Optionally disable APM limiter in AudioMixer. The APM limiter is a component for keeping the audio from clipping by smoothly reducing the amplitude of the audio samples. It can be rather expensive because of band-splitting & merging. Also, experiments indicate that it is of questionable benefit (adding several sources of human speech almost never cause clipping). To optionally disable the limiter, this CL does some refactoring on the (quite large) AudioMixerImpl. Functionality related to actual addition of frames and handling AudioFrame meta-data (sample_rate, num_channels, samples_per_channel, time_stamp, elapsed_time_ms) is broken out in a new sub-component called FrameCombiner. The FrameCombiner is initialized with a 'use_limiter' flag. To create a mixer without using the APM limiter Inside of FrameCombiner, the meta-data handling and the audio sample addition are kept divided from each other. This also fixes a few minor GN issues so that warnings do not have to be suppressed. BUG=webrtc:7167 Review-Url: https://codereview.webrtc.org/2692333002 Cr-Commit-Position: refs/heads/master@{#16742} Committed: https://chromium.googlesource.com/external/webrtc/+/24899e58ecb10157fea418d80022b938c0f806a9

Patch Set 1 : Deprecated old factory method. #

Total comments: 35

Patch Set 2 : Mini-change: participant -> source and for each loop. #

Total comments: 28

Patch Set 3 : Fix int <-> size_t conversion warning. #

Total comments: 6

Patch Set 4 : UpdateFrame to initialize data in AudioFrame. #

Total comments: 3

Patch Set 5 : Fix int16_t <-> size_t compilation warnings. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+465 lines, -182 lines) Patch
M webrtc/modules/audio_mixer/BUILD.gn View 1 2 3 chunks +5 lines, -11 lines 0 comments Download
M webrtc/modules/audio_mixer/audio_mixer_impl.h View 1 5 chunks +15 lines, -13 lines 0 comments Download
M webrtc/modules/audio_mixer/audio_mixer_impl.cc View 1 5 chunks +17 lines, -139 lines 0 comments Download
M webrtc/modules/audio_mixer/audio_mixer_impl_unittest.cc View 1 2 3 4 14 chunks +70 lines, -19 lines 0 comments Download
A webrtc/modules/audio_mixer/frame_combiner.h View 1 1 chunk +54 lines, -0 lines 0 comments Download
A webrtc/modules/audio_mixer/frame_combiner.cc View 1 2 1 chunk +172 lines, -0 lines 0 comments Download
A webrtc/modules/audio_mixer/frame_combiner_unittest.cc View 1 2 3 4 1 chunk +132 lines, -0 lines 0 comments Download

Messages

Total messages: 63 (49 generated)
aleloi
PTAL!
3 years, 10 months ago (2017-02-15 12:44:13 UTC) #18
ivoc
Nice change! See some comments below. https://codereview.webrtc.org/2692333002/diff/100001/webrtc/modules/audio_mixer/audio_mixer_impl.h File webrtc/modules/audio_mixer/audio_mixer_impl.h (right): https://codereview.webrtc.org/2692333002/diff/100001/webrtc/modules/audio_mixer/audio_mixer_impl.h#newcode21 webrtc/modules/audio_mixer/audio_mixer_impl.h:21: #include "webrtc/modules/audio_mixer/frame_combiner.h" Since ...
3 years, 10 months ago (2017-02-15 16:58:47 UTC) #23
aleloi
Thanks for the comments, I've uploaded a new patch! https://codereview.webrtc.org/2692333002/diff/100001/webrtc/modules/audio_mixer/audio_mixer_impl.h File webrtc/modules/audio_mixer/audio_mixer_impl.h (right): https://codereview.webrtc.org/2692333002/diff/100001/webrtc/modules/audio_mixer/audio_mixer_impl.h#newcode21 webrtc/modules/audio_mixer/audio_mixer_impl.h:21: ...
3 years, 10 months ago (2017-02-16 14:01:36 UTC) #24
hlundin-webrtc
Nice. See some comments inline. Also, I'm missing frame_combiner_unittests.cc... https://codereview.webrtc.org/2692333002/diff/140001/webrtc/modules/audio_mixer/audio_mixer_impl_unittest.cc File webrtc/modules/audio_mixer/audio_mixer_impl_unittest.cc (right): https://codereview.webrtc.org/2692333002/diff/140001/webrtc/modules/audio_mixer/audio_mixer_impl_unittest.cc#newcode501 webrtc/modules/audio_mixer/audio_mixer_impl_unittest.cc:501: ...
3 years, 10 months ago (2017-02-17 11:04:13 UTC) #31
aleloi
Thanks for the comments! I've uploaded a new patch addressing the comments. It also includes ...
3 years, 10 months ago (2017-02-20 10:41:34 UTC) #37
hlundin-webrtc
LGTM with a few comments/questions. https://codereview.webrtc.org/2692333002/diff/140001/webrtc/modules/audio_mixer/frame_combiner.cc File webrtc/modules/audio_mixer/frame_combiner.cc (right): https://codereview.webrtc.org/2692333002/diff/140001/webrtc/modules/audio_mixer/frame_combiner.cc#newcode94 webrtc/modules/audio_mixer/frame_combiner.cc:94: RTC_DCHECK_EQ(kSamplesPerChannel, frame->samples_per_channel_); On 2017/02/20 ...
3 years, 10 months ago (2017-02-20 14:16:32 UTC) #46
aleloi
https://codereview.webrtc.org/2692333002/diff/200001/webrtc/modules/audio_mixer/frame_combiner.cc File webrtc/modules/audio_mixer/frame_combiner.cc (right): https://codereview.webrtc.org/2692333002/diff/200001/webrtc/modules/audio_mixer/frame_combiner.cc#newcode50 webrtc/modules/audio_mixer/frame_combiner.cc:50: const auto check_no_error = [](int x) { On 2017/02/20 ...
3 years, 10 months ago (2017-02-20 15:21:38 UTC) #47
hlundin-webrtc
Still LGTM. https://codereview.webrtc.org/2692333002/diff/200001/webrtc/modules/audio_mixer/frame_combiner.cc File webrtc/modules/audio_mixer/frame_combiner.cc (right): https://codereview.webrtc.org/2692333002/diff/200001/webrtc/modules/audio_mixer/frame_combiner.cc#newcode50 webrtc/modules/audio_mixer/frame_combiner.cc:50: const auto check_no_error = [](int x) { ...
3 years, 10 months ago (2017-02-21 08:33:26 UTC) #48
ivoc
lgtm with one remaining question. https://codereview.webrtc.org/2692333002/diff/100001/webrtc/modules/audio_mixer/audio_mixer_impl.h File webrtc/modules/audio_mixer/audio_mixer_impl.h (right): https://codereview.webrtc.org/2692333002/diff/100001/webrtc/modules/audio_mixer/audio_mixer_impl.h#newcode21 webrtc/modules/audio_mixer/audio_mixer_impl.h:21: #include "webrtc/modules/audio_mixer/frame_combiner.h" On 2017/02/16 ...
3 years, 10 months ago (2017-02-21 09:59:16 UTC) #49
aleloi
https://codereview.webrtc.org/2692333002/diff/220001/webrtc/modules/audio_mixer/frame_combiner_unittest.cc File webrtc/modules/audio_mixer/frame_combiner_unittest.cc (right): https://codereview.webrtc.org/2692333002/diff/220001/webrtc/modules/audio_mixer/frame_combiner_unittest.cc#newcode113 webrtc/modules/audio_mixer/frame_combiner_unittest.cc:113: std::iota(frame1.data_, frame1.data_ + number_of_channels * rate / 100, On ...
3 years, 10 months ago (2017-02-21 10:16:57 UTC) #52
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/2692333002/240001
3 years, 10 months ago (2017-02-21 10:16:57 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: win_x64_rel on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/win_x64_rel/builds/22915)
3 years, 10 months ago (2017-02-21 10:28:07 UTC) #55
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/2692333002/260001
3 years, 10 months ago (2017-02-21 11:33:36 UTC) #58
commit-bot: I haz the power
3 years, 10 months ago (2017-02-21 13:06:35 UTC) #63
Message was sent while issue was closed.
Committed patchset #5 (id:260001) as
https://chromium.googlesource.com/external/webrtc/+/24899e58ecb10157fea418d80...

Powered by Google App Engine
This is Rietveld 408576698