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

Issue 1869303004: media: Implement zero-copy video playback for VP8.

Created:
4 years, 8 months ago by dshwang
Modified:
4 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_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

media: Implement zero-copy video playback for VP8. Current zero-copy video playback implementation is actually "one-copy video playback". The final VideoFrame is produced by following pipeline. 1. VP8 (i.e. vpx) decoder produces a VideoFrame. 2. GpuMemoryBufferVideoFramePool copies the software VideoFrame to hardware VideoFrame backed by GpuMemoryBuffer. 3. CC composites the mailbox belonging to hardware VideoFrame. This CL gets rid of #2 step. VP8 decoder decodes video frame directly on hardware VideoFrame backed by GpuMemoryBuffer. TODO: apply it to VP9 decoding. Dependency: https://codereview.chromium.org/1874733002/ BUG=601788, 590358 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Patch Set 1 #

Patch Set 2 : build fix #

Patch Set 3 : optimize only VP8 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -82 lines) Patch
M cc/layers/video_layer_impl.cc View 1 2 1 chunk +9 lines, -2 lines 0 comments Download
M cc/resources/video_resource_updater.cc View 1 2 2 chunks +1 line, -1 line 0 comments Download
M media/base/video_frame.h View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M media/base/video_frame.cc View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
M media/filters/vpx_video_decoder.h View 1 2 4 chunks +5 lines, -1 line 0 comments Download
M media/filters/vpx_video_decoder.cc View 1 2 5 chunks +90 lines, -77 lines 0 comments Download
M media/renderers/default_renderer_factory.cc View 1 2 2 chunks +9 lines, -1 line 0 comments Download
M media/video/gpu_memory_buffer_video_frame_pool.cc View 1 2 7 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (14 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1869303004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1869303004/1
4 years, 8 months ago (2016-04-08 15:00:55 UTC) #2
dshwang
dcastagna, could you review overall idea and approach? This CL makes FFmpegVideoDecoder and VpxVideoDecoder (for ...
4 years, 8 months ago (2016-04-08 15:04:46 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_rel/builds/92586)
4 years, 8 months ago (2016-04-08 15:14:33 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1869303004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1869303004/20001
4 years, 8 months ago (2016-04-08 15:28:03 UTC) #11
commit-bot: I haz the power
Dry run: 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/151763)
4 years, 8 months ago (2016-04-08 16:36:32 UTC) #14
DaleCurtis
This is really cool but previously we decided not to do this since the gpu ...
4 years, 8 months ago (2016-04-08 17:42:53 UTC) #15
Daniele Castagna
On 2016/04/08 at 17:42:53, dalecurtis wrote: > This is really cool but previously we decided ...
4 years, 8 months ago (2016-04-08 19:13:59 UTC) #16
dshwang
Thank you for nice feedback! We need more investigation for FFmpegVideoDecoder, as you concern. However ...
4 years, 8 months ago (2016-04-11 09:12:12 UTC) #18
dshwang
New patch set optimizes only VP8 in VpxVideoDecoder. It's just free lunch. What do you ...
4 years, 8 months ago (2016-04-11 11:32:02 UTC) #21
DaleCurtis
Currently we only use VpxVideoDecoder for VP8+Alpha on every platform except Android. On Android we ...
4 years, 8 months ago (2016-04-11 17:33:03 UTC) #23
dshwang
On 2016/04/11 17:33:03, DaleCurtis wrote: > Currently we only use VpxVideoDecoder for VP8+Alpha on every ...
4 years, 8 months ago (2016-04-11 18:11:28 UTC) #24
DaleCurtis
On 2016/04/11 at 18:11:28, dongseong.hwang wrote: > On 2016/04/11 17:33:03, DaleCurtis wrote: > > Currently ...
4 years, 8 months ago (2016-04-11 18:15:33 UTC) #25
Daniele Castagna
On 2016/04/11 at 18:15:33, dalecurtis wrote: > On 2016/04/11 at 18:11:28, dongseong.hwang wrote: > > ...
4 years, 8 months ago (2016-04-11 19:33:40 UTC) #26
dshwang
On 2016/04/11 19:33:40, Daniele Castagna wrote: > > I agree ChromeOS deserves optimizations, I was ...
4 years, 8 months ago (2016-04-12 11:56:14 UTC) #27
DaleCurtis
On 2016/04/12 at 11:56:14, dongseong.hwang wrote: > On 2016/04/11 19:33:40, Daniele Castagna wrote: > > ...
4 years, 8 months ago (2016-04-12 19:03:08 UTC) #28
Daniele Castagna
On 2016/04/12 at 11:56:14, dongseong.hwang wrote: > On 2016/04/11 19:33:40, Daniele Castagna wrote: > > ...
4 years, 8 months ago (2016-04-12 19:03:08 UTC) #29
dshwang
On 2016/04/12 19:03:08, Daniele Castagna wrote: > > I understand your point. It's kind of ...
4 years, 8 months ago (2016-04-13 13:38:21 UTC) #31
reveman
On 2016/04/13 at 13:38:21, dongseong.hwang wrote: > On 2016/04/12 19:03:08, Daniele Castagna wrote: > > ...
4 years, 8 months ago (2016-04-13 14:32:50 UTC) #32
dshwang
On 2016/04/13 14:32:50, reveman wrote: > > That's good idea. For example, we can add ...
4 years, 8 months ago (2016-04-13 15:29:01 UTC) #33
Daniele Castagna
On 2016/04/12 at 19:03:08, dalecurtis wrote: > On 2016/04/12 at 11:56:14, dongseong.hwang wrote: > > ...
4 years, 8 months ago (2016-04-13 21:00:09 UTC) #34
DaleCurtis
On 2016/04/13 at 13:38:21, dongseong.hwang wrote: > > I think this could be very valuable ...
4 years, 8 months ago (2016-04-13 21:05:16 UTC) #35
DaleCurtis
On 2016/04/13 at 21:00:09, dcastagna wrote: > On 2016/04/12 at 19:03:08, dalecurtis wrote: > > ...
4 years, 8 months ago (2016-04-13 22:41:12 UTC) #36
dshwang
4 years, 7 months ago (2016-05-04 10:01:48 UTC) #37
Hi, how about resuming the review?
As Daniele is extending vpx API, this change will be used here and there.
In addition, ChromeOS also supports zero-copy video playback very soon.
https://codereview.chromium.org/1869793002/
We can start to review the preparation patch first;
https://codereview.chromium.org/1874733002/

In parallel, I'll propose new BufferUsage GPU_CPU_READ_CPU_READ_WRITE, to reuse
it on FFMPEG.

> We have a UMA stat about how long the decoder references to a buffer and last
time I checked it was always less than 7 frames.

vpx zero-copy seems to be possible to support all platforms. I try to postpone
the VideoFrame creation until FFMPEG release reference. The playback smoothness
is not acceptable.
FFMPEG might hold the decoder references more than tens frames.

Powered by Google App Engine
This is Rietveld 408576698