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

Issue 1303413003: AudioCodingModuleImpl::Encode: Use a Buffer instead of a stack-allocated array (Closed)

Created:
5 years, 4 months ago by kwiberg-webrtc
Modified:
5 years, 3 months ago
Reviewers:
hlundin-webrtc
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, hlundin-webrtc, tlegrand-webrtc
Base URL:
https://chromium.googlesource.com/external/webrtc.git@acm-common-defs
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

AudioCodingModuleImpl::Encode: Use a Buffer instead of a stack-allocated array The Buffer is saved between calls, so after the initial allocation it'll already be allocated and of the right size. The stack-allocated array had the advantage of requiring no heap allocation at all, but for most popular encoders it ended up allocating about 15 kB too much, and now that we allow user-defined encoders there was also the (remote) possibility that the buffer would actually be too small. R=henrik.lundin@webrtc.org Committed: https://chromium.googlesource.com/external/webrtc/+/0163fb2ad7c95a0ac20a8a9861073e2a16fa77b4

Patch Set 1 #

Total comments: 3

Patch Set 2 : review comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -12 lines) Patch
M webrtc/modules/audio_coding/main/acm2/acm_common_defs.h View 1 chunk +0 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h View 2 chunks +2 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc View 1 5 chunks +10 lines, -9 lines 0 comments Download
M webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc View 1 chunk +4 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 10 (3 generated)
kwiberg-webrtc
5 years, 4 months ago (2015-08-25 10:27:05 UTC) #2
hlundin-webrtc
One comment. https://codereview.webrtc.org/1303413003/diff/1/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc File webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc (right): https://codereview.webrtc.org/1303413003/diff/1/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc#newcode187 webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc:187: if (encode_buffer_.size() == 0 && !encoded_info.send_even_if_empty) { ...
5 years, 4 months ago (2015-08-25 12:43:43 UTC) #3
kwiberg-webrtc
https://codereview.webrtc.org/1303413003/diff/1/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc File webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc (right): https://codereview.webrtc.org/1303413003/diff/1/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc#newcode187 webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc:187: if (encode_buffer_.size() == 0 && !encoded_info.send_even_if_empty) { On 2015/08/25 ...
5 years, 4 months ago (2015-08-25 13:20:24 UTC) #4
hlundin-webrtc
lgtm https://codereview.webrtc.org/1303413003/diff/1/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc File webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc (right): https://codereview.webrtc.org/1303413003/diff/1/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc#newcode187 webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc:187: if (encode_buffer_.size() == 0 && !encoded_info.send_even_if_empty) { On ...
5 years, 3 months ago (2015-08-26 13:10:17 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1303413003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1303413003/20001
5 years, 3 months ago (2015-08-26 13:36:24 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: android on tryserver.webrtc (JOB_TIMED_OUT, no build URL) mac_baremetal on ...
5 years, 3 months ago (2015-08-26 15:36:36 UTC) #9
kwiberg-webrtc
5 years, 3 months ago (2015-08-26 18:24:42 UTC) #10
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
0163fb2ad7c95a0ac20a8a9861073e2a16fa77b4 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698