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

Issue 1921803002: Avoid unnecessary post task during frame delivery. (Closed)

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

Avoid unnecessary post task during frame delivery. With the three changes in this CL, primarily the first, we can now play 720p60 and 1080p60 content on the Moto X and N7v2 devices when combined with the underflow fixes from http://crrev.com/1863373002. There are three places we were able to avoid unnecessary thread hops, ordered in terms of impact: - VD::|output_cb| does not need to PostTask since it's already delivered many calls after provided. This change had the most impact, which suggests that the media thread was blocked with other tasks while the frame is delivered. All VideoDecoders are updated. - Don't trampoline GVD::ReleaseMailbox unless necessary, this also runs on the media thread when frames are dropped before being sent to the compositor. This allows underflow to catch up more quickly. - Don't trampoline for NotifyPictureRead() in AVDA and notify before attempting to release to backbuffer and setting codec indices. This speeds up frame metadata delivery to the renderer. In total this reduces the total time from NotifyPictureReady() to FrameReady() from ~[2.5ms, 9.8ms] to around ~[0.7ms,1.5ms]. BUG=601066 TEST=720p60 and 1080p60 playback are smooth on MotoX and N7v2. Committed: https://crrev.com/427a97695071d8b7662dd668cb844477dfb707bf Cr-Commit-Position: refs/heads/master@{#389671}

Patch Set 1 #

Total comments: 7

Patch Set 2 : Comments. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -20 lines) Patch
M content/common/gpu/media/android_video_decode_accelerator.cc View 1 chunk +9 lines, -8 lines 0 comments Download
M content/common/gpu/media/gpu_video_decode_accelerator.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M media/base/video_decoder.h View 1 2 chunks +8 lines, -3 lines 3 comments Download
M media/filters/ffmpeg_video_decoder.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/filters/gpu_video_decoder.cc View 3 chunks +19 lines, -4 lines 0 comments Download
M media/filters/vpx_video_decoder.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 21 (7 generated)
DaleCurtis
4 years, 8 months ago (2016-04-25 19:04:16 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1921803002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1921803002/1
4 years, 8 months ago (2016-04-25 19:07:23 UTC) #4
liberato (no reviews please)
lgtm https://codereview.chromium.org/1921803002/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/1921803002/diff/1/content/common/gpu/media/android_video_decode_accelerator.cc#newcode841 content/common/gpu/media/android_video_decode_accelerator.cc:841: NotifyPictureReady(picture); how much time does this buy? https://codereview.chromium.org/1921803002/diff/1/content/common/gpu/media/gpu_video_decode_accelerator.cc ...
4 years, 8 months ago (2016-04-25 19:58:22 UTC) #6
xhwang
lg with one comment https://codereview.chromium.org/1921803002/diff/1/media/base/video_decoder.h File media/base/video_decoder.h (right): https://codereview.chromium.org/1921803002/diff/1/media/base/video_decoder.h#newcode70 media/base/video_decoder.h:70: // delivery times with high-frame-rate ...
4 years, 8 months ago (2016-04-25 21:15:55 UTC) #7
DaleCurtis
Since there were some performance questions, let me be clear, w/o these changes (specifically #1), ...
4 years, 8 months ago (2016-04-25 21:31:44 UTC) #8
xhwang
On 2016/04/25 21:31:44, DaleCurtis wrote: > Since there were some performance questions, let me be ...
4 years, 8 months ago (2016-04-25 21:38:02 UTC) #9
DaleCurtis
Updated comments and timing information. You can find the timing logs at http://storage.googleapis.com/dalecurtis/pre-fix.log http://storage.googleapis.com/dalecurtis/post-fix.log If ...
4 years, 8 months ago (2016-04-25 22:32:22 UTC) #11
xhwang
LGTM % one last comment https://codereview.chromium.org/1921803002/diff/20001/media/base/video_decoder.h File media/base/video_decoder.h (right): https://codereview.chromium.org/1921803002/diff/20001/media/base/video_decoder.h#newcode94 media/base/video_decoder.h:94: // trampoline as necessary. ...
4 years, 8 months ago (2016-04-25 22:40:28 UTC) #12
DaleCurtis
https://codereview.chromium.org/1921803002/diff/20001/media/base/video_decoder.h File media/base/video_decoder.h (right): https://codereview.chromium.org/1921803002/diff/20001/media/base/video_decoder.h#newcode94 media/base/video_decoder.h:94: // trampoline as necessary. On 2016/04/25 at 22:40:28, xhwang ...
4 years, 8 months ago (2016-04-25 22:52:16 UTC) #13
xhwang
On 2016/04/25 22:52:16, DaleCurtis wrote: > https://codereview.chromium.org/1921803002/diff/20001/media/base/video_decoder.h > File media/base/video_decoder.h (right): > > https://codereview.chromium.org/1921803002/diff/20001/media/base/video_decoder.h#newcode94 > ...
4 years, 8 months ago (2016-04-25 22:58:42 UTC) #14
DaleCurtis
Thanks for review! https://codereview.chromium.org/1921803002/diff/20001/media/base/video_decoder.h File media/base/video_decoder.h (right): https://codereview.chromium.org/1921803002/diff/20001/media/base/video_decoder.h#newcode94 media/base/video_decoder.h:94: // trampoline as necessary. On 2016/04/25 ...
4 years, 8 months ago (2016-04-25 23:07:43 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1921803002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1921803002/20001
4 years, 8 months ago (2016-04-25 23:08:21 UTC) #18
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-26 02:31:06 UTC) #19
commit-bot: I haz the power
4 years, 8 months ago (2016-04-26 02:31:59 UTC) #21
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/427a97695071d8b7662dd668cb844477dfb707bf
Cr-Commit-Position: refs/heads/master@{#389671}

Powered by Google App Engine
This is Rietveld 408576698