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

Issue 1750213002: Fix Android black frames from MSE config changes. (Closed)

Created:
4 years, 9 months ago by chcunningham
Modified:
4 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_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

Fix Android black frames during MSE config changes. The core of the fix/issue is in AVDA. We were previously dismissing PictureBuffers upon receiving FORMAT_CHANGED from MediaCodec. For the deferred copy strategy, this had the effect of unhooking the Texture from PictureBuffers that may already be on the way to the compositor. With no texture, the compositor would paint black. With this change, FORMAT_CHANGED will no longer dismiss PictureBuffers. Instead we update the size of the existing PictureBuffers as they are used for with the new format. For the copy path we must also update the size of the 2D texture associated with the PictureBuffer. BUG=587994 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/338ac3d5778afc85b741bafc778d2301eb272bfa Cr-Commit-Position: refs/heads/master@{#380305}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Feedback: Adding UpdatePictureBufferSize to strategy #

Total comments: 4

Patch Set 3 : Add logging to copy path #

Patch Set 4 : Fix the copy path. Cleanup logging. #

Patch Set 5 : Add size_changed field to Picture/IPC #

Patch Set 6 : Rebase #

Patch Set 7 : Fix lingering Picture instantiations #

Patch Set 8 : Fix cros build #

Total comments: 17

Patch Set 9 : Address the easy feedback, awaiting high level design sign off #

Total comments: 18

Patch Set 10 : Address feedback #

Patch Set 11 : Rebase #

Total comments: 6

Patch Set 12 : Address final comments #

Patch Set 13 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -49 lines) Patch
M content/common/gpu/client/gpu_video_decode_accelerator_host.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/common/gpu/client/gpu_video_decode_accelerator_host.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M content/common/gpu/media/android_copying_backing_strategy.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/gpu/media/android_copying_backing_strategy.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +28 lines, -0 lines 0 comments Download
M content/common/gpu/media/android_deferred_rendering_backing_strategy.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -3 lines 0 comments Download
M content/common/gpu/media/android_deferred_rendering_backing_strategy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +14 lines, -17 lines 0 comments Download
M content/common/gpu/media/android_video_decode_accelerator.h View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M content/common/gpu/media/android_video_decode_accelerator.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +54 lines, -19 lines 0 comments Download
M content/common/gpu/media/avda_state_provider.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M content/common/gpu/media/gpu_video_decode_accelerator.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/common/gpu/media/media_messages.h View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M media/filters/gpu_video_decoder.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +15 lines, -4 lines 0 comments Download
M media/video/picture.h View 1 2 3 4 5 6 7 8 9 3 chunks +12 lines, -0 lines 0 comments Download
M media/video/picture.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 46 (15 generated)
chcunningham
I need to run for tonight - but this seems to be working well. Will ...
4 years, 9 months ago (2016-03-01 03:03:47 UTC) #2
liberato (no reviews please)
almost there. just needs a little more bookkeeping, i think. -fl https://codereview.chromium.org/1750213002/diff/1/content/common/gpu/media/android_video_decode_accelerator.cc File content/common/gpu/media/android_video_decode_accelerator.cc (left): ...
4 years, 9 months ago (2016-03-01 17:13:08 UTC) #3
chcunningham
Thanks Frank
4 years, 9 months ago (2016-03-01 19:53:40 UTC) #4
chcunningham
https://codereview.chromium.org/1750213002/diff/1/content/common/gpu/media/android_video_decode_accelerator.cc File content/common/gpu/media/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1750213002/diff/1/content/common/gpu/media/android_video_decode_accelerator.cc#newcode704 content/common/gpu/media/android_video_decode_accelerator.cc:704: // meta-data and is not associated with OES texture ...
4 years, 9 months ago (2016-03-01 19:54:25 UTC) #5
chcunningham
Hitting some issues with this approach. Things look good for the zero-copy case, but using ...
4 years, 9 months ago (2016-03-02 00:58:51 UTC) #8
liberato (no reviews please)
https://codereview.chromium.org/1750213002/diff/20001/content/common/gpu/media/android_copying_backing_strategy.cc File content/common/gpu/media/android_copying_backing_strategy.cc (right): https://codereview.chromium.org/1750213002/diff/20001/content/common/gpu/media/android_copying_backing_strategy.cc#newcode138 content/common/gpu/media/android_copying_backing_strategy.cc:138: copier_->DoCopyTextureWithTransform( the problem might be here. have you checked ...
4 years, 9 months ago (2016-03-02 16:50:36 UTC) #9
chcunningham
Thanks Frank https://codereview.chromium.org/1750213002/diff/20001/content/common/gpu/media/android_copying_backing_strategy.cc File content/common/gpu/media/android_copying_backing_strategy.cc (right): https://codereview.chromium.org/1750213002/diff/20001/content/common/gpu/media/android_copying_backing_strategy.cc#newcode138 content/common/gpu/media/android_copying_backing_strategy.cc:138: copier_->DoCopyTextureWithTransform( On 2016/03/02 16:50:36, liberato wrote: > ...
4 years, 9 months ago (2016-03-02 21:46:19 UTC) #10
liberato (no reviews please)
On 2016/03/02 21:46:19, chcunningham wrote: > Thanks Frank > > https://codereview.chromium.org/1750213002/diff/20001/content/common/gpu/media/android_copying_backing_strategy.cc > File content/common/gpu/media/android_copying_backing_strategy.cc (right): ...
4 years, 9 months ago (2016-03-02 22:04:12 UTC) #11
chcunningham
Ready for another round of review. Huge thanks to Frank for patiently walking me through ...
4 years, 9 months ago (2016-03-05 07:21:42 UTC) #13
liberato (no reviews please)
good stuff. gave it just a quick read through. i'll go over it in more ...
4 years, 9 months ago (2016-03-05 08:51:00 UTC) #15
liberato (no reviews please)
https://codereview.chromium.org/1750213002/diff/140001/content/common/gpu/media/android_copying_backing_strategy.cc File content/common/gpu/media/android_copying_backing_strategy.cc (right): https://codereview.chromium.org/1750213002/diff/140001/content/common/gpu/media/android_copying_backing_strategy.cc#newcode190 content/common/gpu/media/android_copying_backing_strategy.cc:190: gfx::Rect(new_size.width(), new_size.height())); i think that gfx::Rect(new_size) works. https://codereview.chromium.org/1750213002/diff/140001/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc File ...
4 years, 9 months ago (2016-03-07 16:39:17 UTC) #16
bbudge
content/renderer/pepper LGTM
4 years, 9 months ago (2016-03-07 17:50:05 UTC) #17
jbauman
So one other option is to do what DXVA does and avoid destroying the old ...
4 years, 9 months ago (2016-03-07 23:46:08 UTC) #18
jbauman
https://codereview.chromium.org/1750213002/diff/140001/media/filters/gpu_video_decoder.cc File media/filters/gpu_video_decoder.cc (right): https://codereview.chromium.org/1750213002/diff/140001/media/filters/gpu_video_decoder.cc#newcode489 media/filters/gpu_video_decoder.cc:489: pb.set_size(picture.visible_rect().size()); Hmm, should it be using the coded size ...
4 years, 9 months ago (2016-03-07 23:53:50 UTC) #19
chcunningham
On 2016/03/07 23:46:08, jbauman wrote: > So one other option is to do what DXVA ...
4 years, 9 months ago (2016-03-08 02:47:16 UTC) #20
chcunningham
Thanks guys! Addressed the low hanging fruit. John LMK if you're happy with the immediate ...
4 years, 9 months ago (2016-03-08 03:19:36 UTC) #21
jbauman
On 2016/03/08 03:19:36, chcunningham wrote: > Thanks guys! Addressed the low hanging fruit. > > ...
4 years, 9 months ago (2016-03-08 03:23:36 UTC) #22
DaleCurtis
https://codereview.chromium.org/1750213002/diff/160001/content/common/gpu/media/android_copying_backing_strategy.cc File content/common/gpu/media/android_copying_backing_strategy.cc (right): https://codereview.chromium.org/1750213002/diff/160001/content/common/gpu/media/android_copying_backing_strategy.cc#newcode172 content/common/gpu/media/android_copying_backing_strategy.cc:172: // 2) Update the GL texture via glTextImage2D. This ...
4 years, 9 months ago (2016-03-08 18:29:03 UTC) #23
chcunningham
Thanks y'all. All comments should be addressed https://codereview.chromium.org/1750213002/diff/140001/content/common/gpu/client/gpu_video_decode_accelerator_host.cc File content/common/gpu/client/gpu_video_decode_accelerator_host.cc (right): https://codereview.chromium.org/1750213002/diff/140001/content/common/gpu/client/gpu_video_decode_accelerator_host.cc#newcode248 content/common/gpu/client/gpu_video_decode_accelerator_host.cc:248: bool size_changed) ...
4 years, 9 months ago (2016-03-08 22:19:13 UTC) #24
chcunningham
https://codereview.chromium.org/1750213002/diff/140001/content/common/gpu/media/android_video_decode_accelerator.cc File content/common/gpu/media/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1750213002/diff/140001/content/common/gpu/media/android_video_decode_accelerator.cc#newcode734 content/common/gpu/media/android_video_decode_accelerator.cc:734: strategy_->UpdatePictureBufferSize(&i->second, size_); On 2016/03/08 03:19:36, chcunningham wrote: > "then ...
4 years, 9 months ago (2016-03-08 22:22:13 UTC) #25
DaleCurtis
lgtm assuming frank is happy.
4 years, 9 months ago (2016-03-09 00:10:30 UTC) #26
liberato (no reviews please)
lgtm. nice! -fl https://codereview.chromium.org/1750213002/diff/140001/content/common/gpu/media/android_video_decode_accelerator.cc File content/common/gpu/media/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1750213002/diff/140001/content/common/gpu/media/android_video_decode_accelerator.cc#newcode734 content/common/gpu/media/android_video_decode_accelerator.cc:734: strategy_->UpdatePictureBufferSize(&i->second, size_); On 2016/03/08 03:19:36, chcunningham ...
4 years, 9 months ago (2016-03-09 15:32:06 UTC) #27
jbauman
lgtm
4 years, 9 months ago (2016-03-09 20:05:52 UTC) #28
chcunningham
Thanks everyone https://codereview.chromium.org/1750213002/diff/200001/content/common/gpu/media/dxva_video_decode_accelerator_win.cc File content/common/gpu/media/dxva_video_decode_accelerator_win.cc (right): https://codereview.chromium.org/1750213002/diff/200001/content/common/gpu/media/dxva_video_decode_accelerator_win.cc#newcode1750 content/common/gpu/media/dxva_video_decode_accelerator_win.cc:1750: media::Picture picture(picture_buffer_id, input_buffer_id, gfx::Rect(0, 0), On 2016/03/09 ...
4 years, 9 months ago (2016-03-09 20:25:09 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750213002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750213002/220001
4 years, 9 months ago (2016-03-09 20:26:13 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/192706)
4 years, 9 months ago (2016-03-09 21:42:06 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750213002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750213002/260001
4 years, 9 months ago (2016-03-09 22:26:35 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/178914)
4 years, 9 months ago (2016-03-09 22:55:29 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750213002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750213002/260001
4 years, 9 months ago (2016-03-10 00:26:28 UTC) #42
commit-bot: I haz the power
Committed patchset #13 (id:260001)
4 years, 9 months ago (2016-03-10 02:06:47 UTC) #44
commit-bot: I haz the power
4 years, 9 months ago (2016-03-10 02:08:25 UTC) #46
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/338ac3d5778afc85b741bafc778d2301eb272bfa
Cr-Commit-Position: refs/heads/master@{#380305}

Powered by Google App Engine
This is Rietveld 408576698