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

Issue 1726103002: Disable adaptive resolution support for MediaCodec use by AVDA. (Closed)

Created:
4 years, 10 months ago by DaleCurtis
Modified:
4 years, 10 months ago
CC:
avayvod+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, mlamouri+watch-media_chromium.org, piman+watch_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Disable adaptive resolution support for MediaCodec use by AVDA. There are several devices out there that can't create more than one MediaCodec when these keys are set. Specifically the N4 and N7 devices will fail while creating the second MediaCodec. Looking through the AOSP source code this appears to be because setting max width/max height to 1080p allocates all available decoder resources on these devices: https://goo.gl/rH7iht More importantly, configuration changes as sent by MSE within the Spitzer pipeline always trigger a flush(), so regardless of the adaptative support setting we're taking the "slow" path per the MediaCodec documentation. For files with implicit mid-stream configuration changes (which are rare), there seems to be no issue on a variety of devices with this setting disabled. In fact, it doesn't seem any faster or slower even on very old (4.3) devices w/ or w/o this setting. Further, at least for mobile devices, I'm not sure we ever want to set a max height or width even if the functionality did what's on the label due to such a value being unknown to Chrome. Always using the largest value works, but as found above allocates far more resources than are ever realistically used in mobile playbacks. Note: This is slightly different than general adapative playback as supported by MSE, since that may just adapt the bitrate while keeping the resolution the same. BUG=none TEST=http://storage.googleapis.com/dalecurtis-shared/buck_multi.html http://storage.googleapis.com/dalecurtis-shared/frame_size_change.webm http://storage.googleapis.com/dalecurtis-shared/frame_size_change.mp4 N4 (4.4), N7 (2012, 4.3), N4 (5.1), N5 (6.0), S4 (5.1) Committed: https://crrev.com/f3b596f026ece5ca021f547d41193f9bbbeec604 Cr-Commit-Position: refs/heads/master@{#377170}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rename to allow. #

Total comments: 2

Patch Set 3 : Comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -16 lines) Patch
M content/common/gpu/media/android_video_decode_accelerator.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/base/android/java/src/org/chromium/media/MediaCodecBridge.java View 1 1 chunk +2 lines, -2 lines 0 comments Download
M media/base/android/sdk_media_codec_bridge.h View 1 2 1 chunk +6 lines, -4 lines 0 comments Download
M media/base/android/sdk_media_codec_bridge.cc View 1 3 chunks +11 lines, -9 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
DaleCurtis
4 years, 10 months ago (2016-02-23 22:28:16 UTC) #2
liberato (no reviews please)
https://codereview.chromium.org/1726103002/diff/1/media/base/android/sdk_media_codec_bridge.cc File media/base/android/sdk_media_codec_bridge.cc (right): https://codereview.chromium.org/1726103002/diff/1/media/base/android/sdk_media_codec_bridge.cc#newcode569 media/base/android/sdk_media_codec_bridge.cc:569: bool enable_adaptive_playback) { s/enable/allow/?
4 years, 10 months ago (2016-02-23 22:53:43 UTC) #4
qinmin
"For files with implicit mid-stream configuration changes (which are rare), there seems to be no ...
4 years, 10 months ago (2016-02-23 22:53:54 UTC) #5
DaleCurtis
On 2016/02/23 at 22:53:54, qinmin wrote: > "For files with implicit mid-stream configuration changes (which ...
4 years, 10 months ago (2016-02-23 23:04:19 UTC) #6
DaleCurtis
https://codereview.chromium.org/1726103002/diff/1/media/base/android/sdk_media_codec_bridge.cc File media/base/android/sdk_media_codec_bridge.cc (right): https://codereview.chromium.org/1726103002/diff/1/media/base/android/sdk_media_codec_bridge.cc#newcode569 media/base/android/sdk_media_codec_bridge.cc:569: bool enable_adaptive_playback) { On 2016/02/23 at 22:53:42, liberato wrote: ...
4 years, 10 months ago (2016-02-23 23:07:42 UTC) #7
liberato (no reviews please)
lgtm
4 years, 10 months ago (2016-02-23 23:10:26 UTC) #8
DaleCurtis
Also, if we really want (because it's an issue), we can detect mid-stream resolution changes ...
4 years, 10 months ago (2016-02-23 23:10:50 UTC) #9
qinmin
lgtm % nit https://codereview.chromium.org/1726103002/diff/20001/media/base/android/sdk_media_codec_bridge.h File media/base/android/sdk_media_codec_bridge.h (right): https://codereview.chromium.org/1726103002/diff/20001/media/base/android/sdk_media_codec_bridge.h#newcode171 media/base/android/sdk_media_codec_bridge.h:171: // supported. nit: this fits into ...
4 years, 10 months ago (2016-02-23 23:29:23 UTC) #10
DaleCurtis
Thanks for review! https://codereview.chromium.org/1726103002/diff/20001/media/base/android/sdk_media_codec_bridge.h File media/base/android/sdk_media_codec_bridge.h (right): https://codereview.chromium.org/1726103002/diff/20001/media/base/android/sdk_media_codec_bridge.h#newcode171 media/base/android/sdk_media_codec_bridge.h:171: // supported. On 2016/02/23 at 23:29:22, ...
4 years, 10 months ago (2016-02-23 23:31:28 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1726103002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1726103002/40001
4 years, 10 months ago (2016-02-23 23:36:19 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-02-24 01:20:10 UTC) #15
commit-bot: I haz the power
4 years, 10 months ago (2016-02-24 01:21:42 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f3b596f026ece5ca021f547d41193f9bbbeec604
Cr-Commit-Position: refs/heads/master@{#377170}

Powered by Google App Engine
This is Rietveld 408576698