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

Issue 833063003: Add accelerated video decoder interface, VP8 and H.264 implementations and hook up to V4L2SVDA. (Closed)

Created:
5 years, 11 months ago by Pawel Osciak
Modified:
5 years, 11 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add accelerated video decoder interface, VP8 and H.264 implementations and hook up to V4L2SVDA. An AcceleratedVideoDecoder is a video decoder that requires support from an external accelerator (typically a hardware accelerator) to partially offload the decode process after parsing stream headers, and performing reference frame and state management. In this design, the hardware-independent decoder implementation interfaces with a HW-specific Accelerator to offload last stages of the decode process. Add the interface for AcceleratedVideoDecoder, decoders for VP8 and H264, V4L2-specific Accelerators for VP8 and H264 and a common accelerator/client class for V4L2. TEST=vdatest VP8/H264, mp4 local video playback, apprtc decode BUG=chrome-os-partner:33728 Committed: https://crrev.com/04272d3017214b966feba379d78b195e2fd2193d Cr-Commit-Position: refs/heads/master@{#311448}

Patch Set 1 #

Total comments: 29

Patch Set 2 : #

Total comments: 30

Patch Set 3 : #

Total comments: 10

Patch Set 4 : #

Total comments: 3

Patch Set 5 : #

Total comments: 28

Patch Set 6 : #

Total comments: 12

Patch Set 7 : Addressed all comments. #

Total comments: 67

Patch Set 8 : #

Total comments: 3

Patch Set 9 : #

Patch Set 10 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4047 lines, -883 lines) Patch
A content/common/gpu/media/accelerated_video_decoder.h View 1 2 3 4 5 6 1 chunk +63 lines, -0 lines 0 comments Download
M content/common/gpu/media/generic_v4l2_video_device.h View 1 2 3 4 5 6 7 2 chunks +1 line, -1 line 0 comments Download
M content/common/gpu/media/gpu_video_decode_accelerator.cc View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M content/common/gpu/media/gpu_video_encode_accelerator.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
A content/common/gpu/media/h264_decoder.h View 1 2 3 4 5 6 7 1 chunk +259 lines, -0 lines 0 comments Download
A + content/common/gpu/media/h264_decoder.cc View 1 2 3 4 5 6 7 8 41 chunks +242 lines, -667 lines 0 comments Download
M content/common/gpu/media/h264_dpb.h View 1 2 3 4 5 6 7 8 6 chunks +41 lines, -17 lines 0 comments Download
M content/common/gpu/media/h264_dpb.cc View 1 2 3 4 5 6 7 8 5 chunks +47 lines, -27 lines 0 comments Download
M content/common/gpu/media/tegra_v4l2_video_device.h View 1 2 3 4 5 6 7 2 chunks +1 line, -1 line 0 comments Download
M content/common/gpu/media/v4l2_image_processor.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M content/common/gpu/media/v4l2_image_processor.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
A content/common/gpu/media/v4l2_slice_video_decode_accelerator.h View 1 2 3 4 5 6 7 1 chunk +391 lines, -0 lines 0 comments Download
A content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc View 1 2 3 4 5 6 7 1 chunk +2432 lines, -0 lines 0 comments Download
M content/common/gpu/media/v4l2_video_decode_accelerator.h View 1 2 3 4 5 6 7 9 3 chunks +3 lines, -2 lines 0 comments Download
M content/common/gpu/media/v4l2_video_decode_accelerator.cc View 1 2 3 4 5 6 7 9 2 chunks +3 lines, -3 lines 0 comments Download
M content/common/gpu/media/v4l2_video_device.h View 1 2 3 4 5 4 chunks +9 lines, -5 lines 0 comments Download
M content/common/gpu/media/v4l2_video_device.cc View 1 2 3 4 5 6 7 2 chunks +20 lines, -10 lines 0 comments Download
M content/common/gpu/media/v4l2_video_encode_accelerator.h View 1 2 3 4 5 6 7 9 2 chunks +2 lines, -2 lines 0 comments Download
M content/common/gpu/media/v4l2_video_encode_accelerator.cc View 1 2 3 4 5 6 7 9 4 chunks +5 lines, -5 lines 0 comments Download
M content/common/gpu/media/vaapi_h264_decoder.h View 1 2 3 4 5 6 chunks +11 lines, -11 lines 0 comments Download
M content/common/gpu/media/vaapi_h264_decoder.cc View 1 2 3 4 5 6 7 8 33 chunks +59 lines, -53 lines 0 comments Download
A + content/common/gpu/media/vaapi_h264_dpb.h View 1 2 3 4 5 6 chunks +17 lines, -17 lines 0 comments Download
A + content/common/gpu/media/vaapi_h264_dpb.cc View 1 2 3 4 5 6 7 7 chunks +28 lines, -23 lines 0 comments Download
M content/common/gpu/media/vaapi_video_encode_accelerator.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M content/common/gpu/media/video_decode_accelerator_unittest.cc View 1 2 3 4 5 6 7 9 7 chunks +23 lines, -15 lines 0 comments Download
M content/common/gpu/media/video_encode_accelerator_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
A content/common/gpu/media/vp8_decoder.h View 1 2 3 4 5 6 7 1 chunk +107 lines, -0 lines 0 comments Download
A content/common/gpu/media/vp8_decoder.cc View 1 2 3 4 5 6 7 1 chunk +186 lines, -0 lines 0 comments Download
A content/common/gpu/media/vp8_picture.h View 1 2 3 4 5 6 7 8 1 chunk +29 lines, -0 lines 0 comments Download
A content/common/gpu/media/vp8_picture.cc View 1 2 3 4 5 6 7 8 1 chunk +19 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -2 lines 0 comments Download
M media/filters/h264_parser.h View 1 2 3 4 5 2 chunks +7 lines, -1 line 0 comments Download
M media/filters/h264_parser.cc View 1 2 3 4 5 4 chunks +9 lines, -2 lines 0 comments Download
M media/filters/vp8_parser.h View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M media/video/h264_poc.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 37 (10 generated)
Pawel Osciak
5 years, 11 months ago (2015-01-08 09:20:03 UTC) #2
Owen Lin
https://codereview.chromium.org/833063003/diff/1/content/common/gpu/media/accelerated_video_decoder.h File content/common/gpu/media/accelerated_video_decoder.h (right): https://codereview.chromium.org/833063003/diff/1/content/common/gpu/media/accelerated_video_decoder.h#newcode10 content/common/gpu/media/accelerated_video_decoder.h:10: #include "base/memory/ref_counted.h" not used for the above includes? https://codereview.chromium.org/833063003/diff/1/content/common/gpu/media/accelerated_video_decoder.h#newcode38 ...
5 years, 11 months ago (2015-01-08 15:42:06 UTC) #3
Owen Lin
I am still trying to understand the CL. So, there are some rough thoughts. We ...
5 years, 11 months ago (2015-01-09 09:56:14 UTC) #5
kcwu
https://codereview.chromium.org/833063003/diff/1/content/common/gpu/media/accelerated_video_decoder.h File content/common/gpu/media/accelerated_video_decoder.h (right): https://codereview.chromium.org/833063003/diff/1/content/common/gpu/media/accelerated_video_decoder.h#newcode32 content/common/gpu/media/accelerated_video_decoder.h:32: // Stop (pause) decoding, discarding all remaining inputs and ...
5 years, 11 months ago (2015-01-09 10:07:48 UTC) #6
Pawel Osciak
5 years, 11 months ago (2015-01-09 10:40:01 UTC) #7
kcwu
https://codereview.chromium.org/833063003/diff/80001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc File content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc (right): https://codereview.chromium.org/833063003/diff/80001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc#newcode1030 content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc:1030: decoder_current_bitstream_buffer_.reset(); Will decoder cache remain data in current buffer? ...
5 years, 11 months ago (2015-01-09 11:03:00 UTC) #8
Pawel Osciak
https://codereview.chromium.org/833063003/diff/1/content/common/gpu/media/accelerated_video_decoder.h File content/common/gpu/media/accelerated_video_decoder.h (right): https://codereview.chromium.org/833063003/diff/1/content/common/gpu/media/accelerated_video_decoder.h#newcode52 content/common/gpu/media/accelerated_video_decoder.h:52: virtual DecResult Decode() WARN_UNUSED_RESULT = 0; On 2015/01/08 15:42:06, ...
5 years, 11 months ago (2015-01-09 13:50:31 UTC) #9
kcwu
https://codereview.chromium.org/833063003/diff/60001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.h File content/common/gpu/media/v4l2_slice_video_decode_accelerator.h (right): https://codereview.chromium.org/833063003/diff/60001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.h#newcode198 content/common/gpu/media/v4l2_slice_video_decode_accelerator.h:198: kInputBufferMaxSizeFor1080p = 1024 * 1024, const size_t, not enum. ...
5 years, 11 months ago (2015-01-09 15:36:46 UTC) #10
kcwu
https://codereview.chromium.org/833063003/diff/100001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc File content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc (right): https://codereview.chromium.org/833063003/diff/100001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc#newcode526 content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc:526: << ", width=" << frame_buffer_size_.width() use frame_buffer_size_.ToString() ? https://codereview.chromium.org/833063003/diff/100001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc#newcode995 ...
5 years, 11 months ago (2015-01-09 19:56:22 UTC) #11
wuchengli
Add BUG and TEST. Also update the title now that this adds v4l2 slice vda.
5 years, 11 months ago (2015-01-10 02:20:03 UTC) #12
Pawel Osciak
xhwang@chromium.org: Could you please OWNERS the two-liner in media/ please? Thanks.
5 years, 11 months ago (2015-01-10 04:40:54 UTC) #14
Pawel Osciak
updated, ptal
5 years, 11 months ago (2015-01-12 03:36:06 UTC) #15
Pawel Osciak
All previous comments addressed. https://chromiumcodereview.appspot.com/833063003/diff/1/content/common/gpu/media/accelerated_video_decoder.h File content/common/gpu/media/accelerated_video_decoder.h (right): https://chromiumcodereview.appspot.com/833063003/diff/1/content/common/gpu/media/accelerated_video_decoder.h#newcode10 content/common/gpu/media/accelerated_video_decoder.h:10: #include "base/memory/ref_counted.h" On 2015/01/08 15:42:06, ...
5 years, 11 months ago (2015-01-12 07:18:20 UTC) #16
kcwu
https://chromiumcodereview.appspot.com/833063003/diff/120001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc File content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc (right): https://chromiumcodereview.appspot.com/833063003/diff/120001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc#newcode26 content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc:26: #define DVLOGF(level) LOG(ERROR) << __FUNCTION__ << "(): " level ...
5 years, 11 months ago (2015-01-12 07:31:46 UTC) #17
kcwu
https://chromiumcodereview.appspot.com/833063003/diff/140001/content/common/gpu/media/h264_decoder.h File content/common/gpu/media/h264_decoder.h (right): https://chromiumcodereview.appspot.com/833063003/diff/140001/content/common/gpu/media/h264_decoder.h#newcode49 content/common/gpu/media/h264_decoder.h:49: // Note that his does not run decode in ...
5 years, 11 months ago (2015-01-12 13:22:01 UTC) #18
scherkus (not reviewing)
can you provide some details on what necessitated making everything reference counted? https://chromiumcodereview.appspot.com/833063003/diff/140001/content/common/gpu/media/generic_v4l2_video_device.h File content/common/gpu/media/generic_v4l2_video_device.h ...
5 years, 11 months ago (2015-01-13 01:25:01 UTC) #20
Pawel Osciak
done. ptal. https://chromiumcodereview.appspot.com/833063003/diff/120001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc File content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc (right): https://chromiumcodereview.appspot.com/833063003/diff/120001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc#newcode26 content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc:26: #define DVLOGF(level) LOG(ERROR) << __FUNCTION__ << "(): ...
5 years, 11 months ago (2015-01-13 11:33:35 UTC) #21
Pawel Osciak
https://chromiumcodereview.appspot.com/833063003/diff/140001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc File content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc (right): https://chromiumcodereview.appspot.com/833063003/diff/140001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc#newcode1209 content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc:1209: DCHECK(buffers[i].size() == frame_buffer_size_); On 2015/01/13 11:33:34, Pawel Osciak wrote: ...
5 years, 11 months ago (2015-01-13 11:44:34 UTC) #22
kcwu
lgtm nits https://chromiumcodereview.appspot.com/833063003/diff/160001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc File content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc (right): https://chromiumcodereview.appspot.com/833063003/diff/160001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc#newcode146 content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc:146: : input_id(-1), give all -1 a name. ...
5 years, 11 months ago (2015-01-13 12:09:40 UTC) #23
Pawel Osciak
On 2015/01/13 01:25:01, scherkus wrote: > can you provide some details on what necessitated making ...
5 years, 11 months ago (2015-01-14 00:29:16 UTC) #27
DaleCurtis
media/h264 stuff lgtm - didn't review gpu/media
5 years, 11 months ago (2015-01-14 02:21:09 UTC) #29
wuchengli
LGTM
5 years, 11 months ago (2015-01-14 03:07:20 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/833063003/220001
5 years, 11 months ago (2015-01-14 10:36:23 UTC) #32
commit-bot: I haz the power
Committed patchset #10 (id:220001)
5 years, 11 months ago (2015-01-14 10:37:35 UTC) #33
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/04272d3017214b966feba379d78b195e2fd2193d Cr-Commit-Position: refs/heads/master@{#311448}
5 years, 11 months ago (2015-01-14 10:38:29 UTC) #34
Pawel Osciak
A revert of this CL (patchset #10 id:220001) has been created in https://chromiumcodereview.appspot.com/850883002/ by posciak@chromium.org. ...
5 years, 11 months ago (2015-01-14 10:53:09 UTC) #35
scherkus (not reviewing)
5 years, 11 months ago (2015-01-14 18:44:13 UTC) #37
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/833063003/diff/140001/content/common/g...
File content/common/gpu/media/h264_dpb.h (right):

https://chromiumcodereview.appspot.com/833063003/diff/140001/content/common/g...
content/common/gpu/media/h264_dpb.h:75: virtual V4L2H264Picture*
AsV4L2H264Picture() { return nullptr; }
On 2015/01/13 11:33:34, Pawel Osciak wrote:
> On 2015/01/13 01:24:59, scherkus wrote:
> > is it ever reasonable to construct an H264Picture as opposed to a subclass?
> 
> Yes, if we intend to use H264Decoder without hiding any implementation details
> in H264Picture.
> 
> > if it isn't, I would make this pure virtual
> > 
> > also .. why not just stick this pure virtual method on H264PictureBase? at
> least
> > as far as I can tell I don't see any other subclasses of H264PictureBase
> 
> The only reason for the ugly existence of H264PictureBase was that I wanted to
> have a memset(this,0,...) constructor for it. I'm not aware of any other
method
> to do this...

That's a poor reason if you ask me :)

You're justifying H264PictureBase and increased complexity throughout the
codebase so you can save a few lines of code inside of the H264PictureBase
constructor by calling memset(this, ...).

This is C++ code. Please set all fields to 0/false in the initializer list and
clean up the class hierarchy.

Powered by Google App Engine
This is Rietveld 408576698