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

Issue 1854433002: Clamp AudioBuffer float to int{16,32} conversion (Closed)

Created:
4 years, 8 months ago by zhengxiong
Modified:
4 years, 8 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, halliwell
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clamp AudioBuffer float to int{16,32} conversion FFmpeg does not compensate for rounding errors during decode so the resulting values can be outside the [-1, 1] range expected for floating-point audio. BUG=internal b/22976943

Patch Set 1 #

Patch Set 2 : Fix handling of 32-bit, fix asymmetric scale #

Total comments: 4

Patch Set 3 : Remove doubles #

Patch Set 4 : Reuse original AudioBus code #

Total comments: 3

Patch Set 5 : Add (bad) rounding #

Patch Set 6 : Fix unit tests #

Patch Set 7 : Have separate functions for rounding and non-rounding #

Unified diffs Side-by-side diffs Delta from patch set Stats (+208 lines, -90 lines) Patch
M media/base/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M media/base/audio_buffer.cc View 1 2 3 4 5 6 9 chunks +21 lines, -31 lines 0 comments Download
M media/base/audio_bus.cc View 1 2 3 4 chunks +21 lines, -59 lines 0 comments Download
A media/base/audio_sample_conversion.h View 1 2 3 4 5 6 1 chunk +163 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M media/shared_memory_support.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 52 (16 generated)
zhengxiong1
4 years, 8 months ago (2016-03-31 19:22:07 UTC) #4
DaleCurtis
Have you looked into the AudioBusPerfTest in media_perftests? I'm curious what the impact of these ...
4 years, 8 months ago (2016-03-31 21:26:47 UTC) #5
zhengxiong1
On 2016/03/31 21:26:47, DaleCurtis wrote: > Have you looked into the AudioBusPerfTest in media_perftests? I'm ...
4 years, 8 months ago (2016-03-31 23:24:17 UTC) #6
DaleCurtis
On 2016/03/31 at 23:24:17, zhengxiong wrote: > On 2016/03/31 21:26:47, DaleCurtis wrote: > > Have ...
4 years, 8 months ago (2016-03-31 23:27:57 UTC) #7
zhengxiong1
On 2016/03/31 23:27:57, DaleCurtis wrote: > Can you include the before values? Performance is kind ...
4 years, 8 months ago (2016-04-01 00:09:31 UTC) #8
DaleCurtis
https://codereview.chromium.org/1854433002/diff/20001/media/base/audio_sample_conversion.h File media/base/audio_sample_conversion.h (right): https://codereview.chromium.org/1854433002/diff/20001/media/base/audio_sample_conversion.h#newcode26 media/base/audio_sample_conversion.h:26: // TODO(cleichner): Remove and use std::lrint(f) when C++11 library ...
4 years, 8 months ago (2016-04-01 00:24:01 UTC) #9
zhengxiong1
On 2016/04/01 00:24:01, DaleCurtis wrote: > https://codereview.chromium.org/1854433002/diff/20001/media/base/audio_sample_conversion.h > File media/base/audio_sample_conversion.h (right): > > https://codereview.chromium.org/1854433002/diff/20001/media/base/audio_sample_conversion.h#newcode26 > ...
4 years, 8 months ago (2016-04-01 01:13:56 UTC) #10
zhengxiong1
On 2016/04/01 00:24:01, DaleCurtis wrote: > This is really the only fix this code adds ...
4 years, 8 months ago (2016-04-01 01:29:15 UTC) #11
zhengxiong1
On 2016/04/01 01:29:15, zhengxiong1 wrote: > On 2016/04/01 00:24:01, DaleCurtis wrote: > > This is ...
4 years, 8 months ago (2016-04-01 01:42:45 UTC) #12
DaleCurtis
Might be that the bug only affects the code in audio_buffer and that audio bus ...
4 years, 8 months ago (2016-04-01 17:18:49 UTC) #13
zhengxiong1
On 2016/04/01 17:18:49, DaleCurtis wrote: > Might be that the bug only affects the code ...
4 years, 8 months ago (2016-04-01 19:23:05 UTC) #14
DaleCurtis
New numbers are fine with me. Your comment is a bit confusing though. AudioBuffer previously ...
4 years, 8 months ago (2016-04-01 19:31:20 UTC) #15
zhengxiong1
On 2016/04/01 19:31:20, DaleCurtis wrote: > New numbers are fine with me. Your comment is ...
4 years, 8 months ago (2016-04-01 20:49:10 UTC) #16
DaleCurtis
Do we need the rounding at all though? I don't recall why that was added.
4 years, 8 months ago (2016-04-01 20:54:54 UTC) #17
zhengxiong1
On 2016/04/01 20:54:54, DaleCurtis wrote: > Do we need the rounding at all though? I ...
4 years, 8 months ago (2016-04-01 21:06:34 UTC) #18
zhengxiong1
On 2016/04/01 21:06:34, zhengxiong1 wrote: > On 2016/04/01 20:54:54, DaleCurtis wrote: > > Do we ...
4 years, 8 months ago (2016-04-01 21:23:44 UTC) #19
DaleCurtis
lgtm
4 years, 8 months ago (2016-04-01 22:48:27 UTC) #20
DaleCurtis
Thanks for your investigation! Performance seems fine w/ or w/o rounding, so lg as is.
4 years, 8 months ago (2016-04-01 22:48:46 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1854433002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1854433002/80001
4 years, 8 months ago (2016-04-01 23:14:27 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/148279)
4 years, 8 months ago (2016-04-01 23:49:04 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1854433002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1854433002/100001
4 years, 8 months ago (2016-04-02 00:22:46 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/204428)
4 years, 8 months ago (2016-04-02 02:21:12 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1854433002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1854433002/100001
4 years, 8 months ago (2016-04-02 19:56:44 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/204529)
4 years, 8 months ago (2016-04-02 21:17:36 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1854433002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1854433002/100001
4 years, 8 months ago (2016-04-04 16:51:05 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/204929)
4 years, 8 months ago (2016-04-04 18:17:07 UTC) #38
DaleCurtis
Your failure is legit -- that code is trying to verify a waveform which is ...
4 years, 8 months ago (2016-04-04 18:18:49 UTC) #39
zhengxiong1
On 2016/04/04 18:18:49, DaleCurtis wrote: > Your failure is legit -- that code is trying ...
4 years, 8 months ago (2016-04-04 19:25:59 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1854433002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1854433002/120001
4 years, 8 months ago (2016-04-11 23:18:09 UTC) #43
DaleCurtis
Hmm, why did you separate out the rounding? I don't think it's worth having both ...
4 years, 8 months ago (2016-04-11 23:21:03 UTC) #44
zhengxiong1
On 2016/04/11 23:21:03, DaleCurtis wrote: > Hmm, why did you separate out the rounding? I ...
4 years, 8 months ago (2016-04-11 23:39:23 UTC) #46
DaleCurtis
Which tests are expecting it to be rounded? Those should only be chromecast tests I'd ...
4 years, 8 months ago (2016-04-11 23:46:25 UTC) #47
zhengxiong1
On 2016/04/11 23:46:25, DaleCurtis wrote: > Which tests are expecting it to be rounded? Those ...
4 years, 8 months ago (2016-04-12 19:56:55 UTC) #48
DaleCurtis
Did PS#4 have any test failures? If not I think it'd be nice to land ...
4 years, 8 months ago (2016-04-12 20:50:47 UTC) #49
zhengxiong1
On 2016/04/12 20:50:47, DaleCurtis wrote: > Did PS#4 have any test failures? If not I ...
4 years, 8 months ago (2016-04-12 20:59:32 UTC) #50
DaleCurtis
4 years, 8 months ago (2016-04-12 21:07:49 UTC) #52
Message was sent while issue was closed.
Sounds good, +tguilbert to take over PS#4 and prime it for landing :)

Powered by Google App Engine
This is Rietveld 408576698