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

Issue 1822983002: Support external buffer import in VDA interface and add a V4L2SVDA impl. (Closed)

Created:
4 years, 9 months ago by Pawel Osciak
Modified:
4 years, 8 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, sandersd (OOO until July 31)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support external buffer import in VDA interface and add a V4L2SVDA impl. Currently, the VDA interface requires implementations to allocate backing memory for output PictureBuffers. This change introduces a second mode of operation, the IMPORT mode, which allows the VDA::Client to provide already allocated buffers for the VDA to import and use. In order to use it, the Client has to Initialize() the VDA for IMPORT OutputMode, go through the standard ProvidePictureBuffers(), AssignPictureBuffers() sequence, but is required to call ImportBufferForPicture() once for each buffer before it may be used. VDAs not supporting IMPORT mode will return false from VDA::Initialize(). Also, add support for IMPORT mode to V4L2SVDA and vdaunittest. This also relands previously reverted crrev.com/1643123003. The reverted CL was affected by a corner case, which occurred if all of the following were true: the input stream contained two SPSes in a row, each causing a resolution change, with no actual frames to decode in between them, and we happened to hit the second one between calling ProvidePictureBuffers and before AssignPictureBuffers had a chance to arrive. This CL fixes that issue by making sure we use the correct (latest) set of buffers. Original message: V4L2SVDA: Move allocation from GPU Child thread to decoder thread. Allocation may take time, and we don't need to be on the GPU Child thread to do it. This also removes the explicit synchronization between the decoder and GPU Child threads during picture set change. BUG=b/27779397,574241 TEST=vdatest,crosvideo.appspot,seektests Committed: https://crrev.com/4b267e8cc10a4d98d0295847ecc9e2aa3732d6c5 Cr-Commit-Position: refs/heads/master@{#388168}

Patch Set 1 #

Total comments: 39

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : include reland of crrev.com/1643123003 with fixes and rebase #

Total comments: 2

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+782 lines, -265 lines) Patch
M content/common/gpu/media/android_video_decode_accelerator.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M content/common/gpu/media/dxva_video_decode_accelerator_win.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M content/common/gpu/media/generic_v4l2_device.h View 1 2 3 4 1 chunk +9 lines, -7 lines 0 comments Download
M content/common/gpu/media/generic_v4l2_device.cc View 1 2 3 4 3 chunks +17 lines, -31 lines 0 comments Download
M content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc View 1 2 3 4 3 chunks +8 lines, -8 lines 0 comments Download
M content/common/gpu/media/tegra_v4l2_device.h View 1 2 3 4 1 chunk +8 lines, -7 lines 0 comments Download
M content/common/gpu/media/tegra_v4l2_device.cc View 1 2 3 4 1 chunk +8 lines, -7 lines 0 comments Download
M content/common/gpu/media/v4l2_device.h View 1 2 3 4 1 chunk +15 lines, -12 lines 0 comments Download
M content/common/gpu/media/v4l2_slice_video_decode_accelerator.h View 1 2 3 4 9 chunks +93 lines, -26 lines 0 comments Download
M content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc View 1 2 3 4 5 30 chunks +357 lines, -133 lines 0 comments Download
M content/common/gpu/media/v4l2_video_decode_accelerator.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/common/gpu/media/v4l2_video_decode_accelerator.cc View 1 2 3 4 4 chunks +30 lines, -9 lines 0 comments Download
M content/common/gpu/media/vaapi_video_decode_accelerator.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M content/common/gpu/media/video_decode_accelerator_unittest.cc View 1 2 3 4 5 6 7 6 chunks +130 lines, -11 lines 0 comments Download
M content/common/gpu/media/vt_video_decode_accelerator_mac.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/gpu/gpu_video_decode_accelerator_factory.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M content/public/gpu/gpu_video_decode_accelerator_factory.cc View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
M content/renderer/media/rtc_video_decoder.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/rtc_video_decoder.cc View 1 2 3 4 2 chunks +14 lines, -8 lines 0 comments Download
M media/filters/gpu_video_decoder.cc View 1 2 3 4 1 chunk +7 lines, -4 lines 0 comments Download
M media/video/video_decode_accelerator.h View 1 2 3 4 5 chunks +31 lines, -0 lines 0 comments Download
M media/video/video_decode_accelerator.cc View 1 2 3 4 1 chunk +11 lines, -1 line 0 comments Download

Messages

Total messages: 61 (24 generated)
Pawel Osciak
ptal
4 years, 9 months ago (2016-03-22 02:27:15 UTC) #2
Pawel Osciak
4 years, 9 months ago (2016-03-22 02:27:57 UTC) #3
kcwu
https://chromiumcodereview.appspot.com/1822983002/diff/1/content/common/gpu/media/tegra_v4l2_device.cc File content/common/gpu/media/tegra_v4l2_device.cc (right): https://chromiumcodereview.appspot.com/1822983002/diff/1/content/common/gpu/media/tegra_v4l2_device.cc#newcode176 content/common/gpu/media/tegra_v4l2_device.cc:176: int index, /* index */ and /* type */ ...
4 years, 9 months ago (2016-03-22 05:42:55 UTC) #4
kcwu
https://chromiumcodereview.appspot.com/1822983002/diff/1/content/common/gpu/media/generic_v4l2_device.cc File content/common/gpu/media/generic_v4l2_device.cc (right): https://chromiumcodereview.appspot.com/1822983002/diff/1/content/common/gpu/media/generic_v4l2_device.cc#newcode239 content/common/gpu/media/generic_v4l2_device.cc:239: if (num_planes < dmabuf_fds.size()) { I don't understand the ...
4 years, 9 months ago (2016-03-22 07:47:02 UTC) #5
Owen Lin
lgtm % nits https://codereview.chromium.org/1822983002/diff/1/content/common/gpu/media/v4l2_device.h File content/common/gpu/media/v4l2_device.h (right): https://codereview.chromium.org/1822983002/diff/1/content/common/gpu/media/v4l2_device.h#newcode107 content/common/gpu/media/v4l2_device.h:107: // for which |dmabuf_fds| have been ...
4 years, 9 months ago (2016-03-23 06:32:50 UTC) #6
Pawel Osciak
ptal https://codereview.chromium.org/1822983002/diff/1/content/common/gpu/media/generic_v4l2_device.cc File content/common/gpu/media/generic_v4l2_device.cc (right): https://codereview.chromium.org/1822983002/diff/1/content/common/gpu/media/generic_v4l2_device.cc#newcode239 content/common/gpu/media/generic_v4l2_device.cc:239: if (num_planes < dmabuf_fds.size()) { On 2016/03/22 07:47:01, ...
4 years, 8 months ago (2016-03-28 01:31:29 UTC) #9
Pawel Osciak
+jbauman for the IsOpaque() change in media/filters/gpu_video_decoder.cc please. https://codereview.chromium.org/1822983002/diff/1/media/filters/gpu_video_decoder.cc File media/filters/gpu_video_decoder.cc (right): https://codereview.chromium.org/1822983002/diff/1/media/filters/gpu_video_decoder.cc#newcode514 media/filters/gpu_video_decoder.cc:514: vda_->GetOutputFormat(), ...
4 years, 8 months ago (2016-03-28 01:59:11 UTC) #12
kcwu
https://codereview.chromium.org/1822983002/diff/60001/content/common/gpu/media/generic_v4l2_device.cc File content/common/gpu/media/generic_v4l2_device.cc (right): https://codereview.chromium.org/1822983002/diff/60001/content/common/gpu/media/generic_v4l2_device.cc#newcode272 content/common/gpu/media/generic_v4l2_device.cc:272: ++v4l2_plane; reset plane_offset to 0 here?
4 years, 8 months ago (2016-03-28 02:28:36 UTC) #13
jbauman
On 2016/03/28 01:59:11, Pawel Osciak wrote: > +jbauman for the IsOpaque() change in media/filters/gpu_video_decoder.cc please. ...
4 years, 8 months ago (2016-03-28 17:01:49 UTC) #14
Pawel Osciak
ptal https://chromiumcodereview.appspot.com/1822983002/diff/60001/content/common/gpu/media/generic_v4l2_device.cc File content/common/gpu/media/generic_v4l2_device.cc (right): https://chromiumcodereview.appspot.com/1822983002/diff/60001/content/common/gpu/media/generic_v4l2_device.cc#newcode272 content/common/gpu/media/generic_v4l2_device.cc:272: ++v4l2_plane; On 2016/03/28 02:28:36, kcwu wrote: > reset ...
4 years, 8 months ago (2016-03-31 05:42:33 UTC) #15
Pawel Osciak
On 2016/03/28 17:01:49, jbauman wrote: > On 2016/03/28 01:59:11, Pawel Osciak wrote: > > +jbauman ...
4 years, 8 months ago (2016-03-31 05:45:37 UTC) #16
Pawel Osciak
On 2016/03/31 05:45:37, Pawel Osciak wrote: > On 2016/03/28 17:01:49, jbauman wrote: > > On ...
4 years, 8 months ago (2016-03-31 06:07:32 UTC) #17
Pawel Osciak
On 2016/03/31 06:07:32, Pawel Osciak wrote: > On 2016/03/31 05:45:37, Pawel Osciak wrote: > > ...
4 years, 8 months ago (2016-03-31 06:09:20 UTC) #18
kcwu
Adding GetOutputFormat() to all VDAs sounds good to me. I will leave it up to ...
4 years, 8 months ago (2016-03-31 07:33:43 UTC) #19
Pawel Osciak
On 2016/03/31 07:33:43, kcwu wrote: > Adding GetOutputFormat() to all VDAs sounds good to me. ...
4 years, 8 months ago (2016-03-31 07:36:36 UTC) #20
jbauman
lgtm
4 years, 8 months ago (2016-04-01 01:52:14 UTC) #21
kcwu
lgtm
4 years, 8 months ago (2016-04-06 09:05:03 UTC) #22
Pawel Osciak
ptal
4 years, 8 months ago (2016-04-13 06:26:50 UTC) #26
kcwu
I skip the code from reland of crrev.com/1643123003. Besides that, still lgtm.
4 years, 8 months ago (2016-04-13 08:05:43 UTC) #28
wuchengli
LGTM for the parts of reland of crrev.com/1643123003 https://codereview.chromium.org/1822983002/diff/180001/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/1822983002/diff/180001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc#newcode764 content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc:764: Please ...
4 years, 8 months ago (2016-04-13 10:54:25 UTC) #30
Pawel Osciak
sandersd@chromium.org: Please OWNERS for media jam@chromium.org: Please OWNERS for content Thank you.
4 years, 8 months ago (2016-04-14 00:53:05 UTC) #32
jam
On 2016/04/14 00:53:05, Pawel Osciak wrote: > mailto:sandersd@chromium.org: Please OWNERS for media > > mailto:jam@chromium.org: ...
4 years, 8 months ago (2016-04-14 20:40:27 UTC) #33
Pawel Osciak
+mcasas@ for content/renderer/media please. Thank you.
4 years, 8 months ago (2016-04-15 00:19:04 UTC) #35
sandersd (OOO until July 31)
lgtm
4 years, 8 months ago (2016-04-15 00:19:52 UTC) #36
mcasas
On 2016/04/15 00:19:52, sandersd wrote: > lgtm content/renderer/media RS LGTM
4 years, 8 months ago (2016-04-16 01:53:05 UTC) #37
Pawel Osciak
https://chromiumcodereview.appspot.com/1822983002/diff/180001/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/1822983002/diff/180001/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc#newcode764 content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc:764: On 2016/04/13 10:54:25, wuchengli wrote: > Please document what ...
4 years, 8 months ago (2016-04-18 06:17:32 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1822983002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1822983002/200001
4 years, 8 months ago (2016-04-18 06:17:51 UTC) #41
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/198228)
4 years, 8 months ago (2016-04-18 06:56:13 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1822983002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1822983002/220001
4 years, 8 months ago (2016-04-18 09:35:09 UTC) #46
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/198287)
4 years, 8 months ago (2016-04-18 10:18:41 UTC) #48
Pawel Osciak
4 years, 8 months ago (2016-04-19 06:07:31 UTC) #49
Owen Lin
vda_unitttest lgtm
4 years, 8 months ago (2016-04-19 06:55:14 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1822983002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1822983002/260001
4 years, 8 months ago (2016-04-19 07:02:14 UTC) #54
commit-bot: I haz the power
Committed patchset #8 (id:260001)
4 years, 8 months ago (2016-04-19 08:40:27 UTC) #56
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/4b267e8cc10a4d98d0295847ecc9e2aa3732d6c5 Cr-Commit-Position: refs/heads/master@{#388168}
4 years, 8 months ago (2016-04-19 08:41:46 UTC) #58
victorhsieh0
This change has broken arm-generic-chromium-pfq and nyan-chrome-pfq due to unused variable when USE_OZONE is undefined. ...
4 years, 8 months ago (2016-04-20 20:33:07 UTC) #60
victorhsieh0
4 years, 8 months ago (2016-04-20 20:52:59 UTC) #61
Message was sent while issue was closed.
Hopefully this should fix the build.
https://codereview.chromium.org/1907593003/

Powered by Google App Engine
This is Rietveld 408576698