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

Issue 1207043002: Introduce a client minimum picture pool size (Closed)

Created:
5 years, 6 months ago by lpique
Modified:
5 years, 4 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, yusukes+watch_chromium.org, tzik, posciak+watch_chromium.org, binji+watch_chromium.org, bradnelson+warch_chromium.org, jam, mcasas+watch_chromium.org, raymes+watch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, feature-media-reviews_chromium.org, teravest+watch_chromium.org, darin-cc_chromium.org, asvitkine+watch_chromium.org, kalyank, mkwst+moarreviews-renderer_chromium.org, piman+watch_chromium.org, danakj+watch_chromium.org, wjia+watch_chromium.org, ihf+watch_chromium.org, DaleCurtis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce a client minimum picture pool size When using the video decoder PPAPI, the most recent version of the ARC extension requires there to be a certain minimum number of picture buffers in flight (allocated but not released). Without a larger pool, ARC video decoding will stall trying to allocate more decoded picture frames than are available by default. This patch creates a new DEV interface version for the VideoDecoder PPAPI. The new interface simply adds a single new argument to VideoDecoder::Initialize() so that a PPAPI client indicate the minimum number of pictures it needs to function. In order to implement this minium picture count, the meaning of the ProvidePictureBuffers() interface call used by the video decoder implementations has changed slightly. After making the call to ProvidePictureBuffers() with a given picture buffer size, the subsequent callback via AssignPictureBuffers() includes a std::vector of buffers that might be larger than requested. I've adjusted the various implementations to handle this change -- most of them previously assumed and asserted that the count was the same. In particular this meant moving some code around in the V4L2 implementations since they also do some internal allocations based on the number of picture buffers that actually end up being chosen. BUG=485775 Committed: https://crrev.com/9dd55e546c4de8767e83fc4065fa2c8352abb47f Cr-Commit-Position: refs/heads/master@{#344391}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Patch Set 5 : Moved buffer choice logic to pepper_video_decoder_host.cc and updated decoder implementations to al… #

Patch Set 6 : Documented actual may be larger than requested count. #

Total comments: 1

Patch Set 7 : Switch to Dev channel interface. But *NOT* dev/ppb_video_decoder_dev.idl #

Total comments: 2

Patch Set 8 : #

Total comments: 3

Patch Set 9 : #

Total comments: 9

Patch Set 10 : #

Patch Set 11 : Rebased to origin/lkgr #

Patch Set 12 : Trivial fix for the "*_only_ng" bot compile error #

Patch Set 13 : Add crbug.com/520323 to a TODO comment; PPB_VideoDecoder_1_1 M44 -> M46 in .idl; ppapi/generators/g… #

Patch Set 14 : Dropped generated ppapi files not due to my change (clang-format upgrade in 23eca7d) #

Patch Set 15 : Updated native_client_sdk/src/examples/api/video_decode to match #

Total comments: 7

Patch Set 16 : Moved range checking min_picture_count from proxy to host code. #

Total comments: 2

Patch Set 17 : Moved constant to shared header, validate min_picture_size now in resource proxy as well as host co… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+409 lines, -100 lines) Patch
M content/common/gpu/media/android_video_decode_accelerator.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/common/gpu/media/dxva_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/v4l2_slice_video_decode_accelerator.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +23 lines, -18 lines 0 comments Download
M content/common/gpu/media/v4l2_video_decode_accelerator.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +25 lines, -14 lines 0 comments Download
M content/common/gpu/media/vaapi_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/video_decode_accelerator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_video_decoder_host.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_video_decoder_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +24 lines, -3 lines 0 comments Download
M content/renderer/pepper/video_decoder_shim.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/pepper/video_decoder_shim.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -8 lines 0 comments Download
M media/video/video_decode_accelerator.h View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M native_client_sdk/src/examples/api/video_decode/video_decode.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/api/ppb_video_decoder.idl View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +39 lines, -1 line 0 comments Download
M ppapi/c/pp_macros.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/c/ppb_video_decoder.h View 1 2 3 4 5 6 7 chunks +38 lines, -4 lines 0 comments Download
M ppapi/cpp/video_decoder.h View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M ppapi/cpp/video_decoder.cc View 1 2 3 3 chunks +21 lines, -1 line 0 comments Download
M ppapi/examples/video_decode/video_decode.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +63 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -2 lines 0 comments Download
M ppapi/proxy/video_decoder_constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +6 lines, -1 line 0 comments Download
M ppapi/proxy/video_decoder_resource.h View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -0 lines 0 comments Download
M ppapi/proxy/video_decoder_resource.cc View 10 11 12 13 14 15 16 5 chunks +21 lines, -1 line 0 comments Download
M ppapi/proxy/video_decoder_resource_unittest.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +8 lines, -3 lines 0 comments Download
M ppapi/tests/test_video_decoder.h View 1 chunk +0 lines, -3 lines 0 comments Download
M ppapi/tests/test_video_decoder.cc View 1 2 3 4 5 6 7 8 9 4 chunks +42 lines, -3 lines 0 comments Download
M ppapi/thunk/interfaces_ppb_public_dev_channel.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/thunk/ppb_video_decoder_api.h View 1 chunk +5 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_video_decoder_thunk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +37 lines, -29 lines 0 comments Download
M remoting/client/plugin/pepper_video_renderer_3d.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +10 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 74 (22 generated)
lpique
PTAL.
5 years, 6 months ago (2015-06-25 00:49:48 UTC) #2
DaleCurtis
+posciak since I think he'll have more informed opinions than I.
5 years, 6 months ago (2015-06-25 00:57:52 UTC) #4
DaleCurtis
me -> sandersd@ too.
5 years, 6 months ago (2015-06-25 01:01:44 UTC) #7
bbudge
High level comment: Is the min_picture_count a constant for ARC, or is it determined by ...
5 years, 6 months ago (2015-06-25 01:20:54 UTC) #9
Pawel Osciak
Could you explain where does the requirement come from please? Is this: 1) irrespective of ...
5 years, 6 months ago (2015-06-25 01:44:16 UTC) #10
lpique
On 2015/06/25 01:20:54, bbudge wrote: > High level comment: Is the min_picture_count a constant for ...
5 years, 6 months ago (2015-06-25 17:48:44 UTC) #12
lpique
On 2015/06/25 01:44:16, Pawel Osciak wrote: > Could you explain where does the requirement come ...
5 years, 6 months ago (2015-06-25 19:26:44 UTC) #13
lpique
https://codereview.chromium.org/1207043002/diff/30001/ppapi/cpp/video_decoder.h File ppapi/cpp/video_decoder.h (right): https://codereview.chromium.org/1207043002/diff/30001/ppapi/cpp/video_decoder.h#newcode78 ppapi/cpp/video_decoder.h:78: const CompletionCallback& callback); On 2015/06/25 01:20:53, bbudge wrote: > ...
5 years, 6 months ago (2015-06-25 22:21:18 UTC) #14
lpique
On 2015/06/25 22:21:18, lpique wrote: > https://codereview.chromium.org/1207043002/diff/30001/ppapi/cpp/video_decoder.h > File ppapi/cpp/video_decoder.h (right): > > https://codereview.chromium.org/1207043002/diff/30001/ppapi/cpp/video_decoder.h#newcode78 > ...
5 years, 5 months ago (2015-07-07 21:29:30 UTC) #15
sandersd (OOO until July 31)
On 2015/07/07 21:29:30, lpique wrote: > On 2015/06/25 22:21:18, lpique wrote: > > > https://codereview.chromium.org/1207043002/diff/30001/ppapi/cpp/video_decoder.h ...
5 years, 5 months ago (2015-07-09 22:36:25 UTC) #16
lpique
On 2015/07/09 22:36:25, sandersd wrote: > On 2015/07/07 21:29:30, lpique wrote: > > On 2015/06/25 ...
5 years, 5 months ago (2015-07-13 18:53:03 UTC) #17
lpique
On 2015/07/13 18:53:03, lpique wrote: > On 2015/07/09 22:36:25, sandersd wrote: > > On 2015/07/07 ...
5 years, 5 months ago (2015-07-15 16:20:54 UTC) #19
sandersd (OOO until July 31)
On 2015/07/15 16:20:54, lpique wrote: > On 2015/07/13 18:53:03, lpique wrote: > > On 2015/07/09 ...
5 years, 5 months ago (2015-07-15 19:25:22 UTC) #20
lpique
On 2015/07/15 19:25:22, sandersd wrote: > On 2015/07/15 16:20:54, lpique wrote: > > On 2015/07/13 ...
5 years, 5 months ago (2015-07-15 21:00:16 UTC) #21
sandersd (OOO until July 31)
With no response from Pawel, lgtm for content/common/gpu/media.
5 years, 5 months ago (2015-07-20 17:37:18 UTC) #22
lpique
On 2015/07/20 17:37:18, sandersd wrote: > With no response from Pawel, lgtm for content/common/gpu/media. Thanks. ...
5 years, 5 months ago (2015-07-21 19:22:21 UTC) #23
bbudge
Sorry for tardiness. I think we want to make this 'Dev' at first. https://codereview.chromium.org/1207043002/diff/90001/ppapi/api/ppb_video_decoder.idl File ...
5 years, 5 months ago (2015-07-22 02:02:47 UTC) #24
lpique
On 2015/07/22 02:02:47, bbudge wrote: > Sorry for tardiness. I think we want to make ...
5 years, 4 months ago (2015-08-07 20:15:38 UTC) #25
dcaiafa
+ sergeyu for remoting
5 years, 4 months ago (2015-08-11 17:37:13 UTC) #27
Sergey Ulanov
https://codereview.chromium.org/1207043002/diff/110001/remoting/client/plugin/pepper_video_renderer_3d.cc File remoting/client/plugin/pepper_video_renderer_3d.cc (right): https://codereview.chromium.org/1207043002/diff/110001/remoting/client/plugin/pepper_video_renderer_3d.cc#newcode174 remoting/client/plugin/pepper_video_renderer_3d.cc:174: graphics_, video_profile, PP_HARDWAREACCELERATION_WITHFALLBACK, 0, What happens when a plugin ...
5 years, 4 months ago (2015-08-11 18:17:01 UTC) #28
lpique
https://codereview.chromium.org/1207043002/diff/110001/remoting/client/plugin/pepper_video_renderer_3d.cc File remoting/client/plugin/pepper_video_renderer_3d.cc (right): https://codereview.chromium.org/1207043002/diff/110001/remoting/client/plugin/pepper_video_renderer_3d.cc#newcode174 remoting/client/plugin/pepper_video_renderer_3d.cc:174: graphics_, video_profile, PP_HARDWAREACCELERATION_WITHFALLBACK, 0, On 2015/08/11 18:17:01, Sergey Ulanov ...
5 years, 4 months ago (2015-08-11 19:56:10 UTC) #29
Sergey Ulanov
https://codereview.chromium.org/1207043002/diff/130001/remoting/client/plugin/pepper_video_renderer_3d.cc File remoting/client/plugin/pepper_video_renderer_3d.cc (right): https://codereview.chromium.org/1207043002/diff/130001/remoting/client/plugin/pepper_video_renderer_3d.cc#newcode175 remoting/client/plugin/pepper_video_renderer_3d.cc:175: kMinimumPictureCount, Actually looking at the implementation it appears that ...
5 years, 4 months ago (2015-08-11 23:10:20 UTC) #30
lpique
https://codereview.chromium.org/1207043002/diff/130001/remoting/client/plugin/pepper_video_renderer_3d.cc File remoting/client/plugin/pepper_video_renderer_3d.cc (right): https://codereview.chromium.org/1207043002/diff/130001/remoting/client/plugin/pepper_video_renderer_3d.cc#newcode175 remoting/client/plugin/pepper_video_renderer_3d.cc:175: kMinimumPictureCount, On 2015/08/11 23:10:20, Sergey Ulanov wrote: > Actually ...
5 years, 4 months ago (2015-08-12 01:08:50 UTC) #31
lpique
On 2015/08/12 01:08:50, lpique wrote: > https://codereview.chromium.org/1207043002/diff/130001/remoting/client/plugin/pepper_video_renderer_3d.cc > File remoting/client/plugin/pepper_video_renderer_3d.cc (right): > > https://codereview.chromium.org/1207043002/diff/130001/remoting/client/plugin/pepper_video_renderer_3d.cc#newcode175 > ...
5 years, 4 months ago (2015-08-12 01:16:08 UTC) #32
Sergey Ulanov
remoting lgtm
5 years, 4 months ago (2015-08-12 17:14:52 UTC) #33
bbudge
Pepper lgtm w/nits https://codereview.chromium.org/1207043002/diff/150001/ppapi/proxy/ppapi_messages.h File ppapi/proxy/ppapi_messages.h (right): https://codereview.chromium.org/1207043002/diff/150001/ppapi/proxy/ppapi_messages.h#newcode1982 ppapi/proxy/ppapi_messages.h:1982: uint32_t /*min_picture_count */) nit space after ...
5 years, 4 months ago (2015-08-12 17:47:09 UTC) #34
lpique
https://codereview.chromium.org/1207043002/diff/150001/ppapi/proxy/ppapi_messages.h File ppapi/proxy/ppapi_messages.h (right): https://codereview.chromium.org/1207043002/diff/150001/ppapi/proxy/ppapi_messages.h#newcode1982 ppapi/proxy/ppapi_messages.h:1982: uint32_t /*min_picture_count */) On 2015/08/12 17:47:09, bbudge wrote: > ...
5 years, 4 months ago (2015-08-12 22:48:54 UTC) #35
bbudge
https://codereview.chromium.org/1207043002/diff/150001/ppapi/tests/test_video_decoder.cc File ppapi/tests/test_video_decoder.cc (right): https://codereview.chromium.org/1207043002/diff/150001/ppapi/tests/test_video_decoder.cc#newcode12 ppapi/tests/test_video_decoder.cc:12: const uint32_t kMaxRequestedPictureCount = 100; On 2015/08/12 22:48:54, lpique ...
5 years, 4 months ago (2015-08-12 23:39:23 UTC) #36
lpique
It looks like when I reran ppapi/generators/generator.py, many other files were touched. I also observed ...
5 years, 4 months ago (2015-08-13 01:10:20 UTC) #37
bbudge
On 2015/08/13 01:10:20, lpique wrote: > It looks like when I reran ppapi/generators/generator.py, many other ...
5 years, 4 months ago (2015-08-13 01:23:00 UTC) #38
lpique
On 2015/08/13 01:23:00, bbudge wrote: > On 2015/08/13 01:10:20, lpique wrote: > > It looks ...
5 years, 4 months ago (2015-08-13 19:33:26 UTC) #39
bbudge
Still LGTM. You should also change native_client_sdk/src/examples/api/video_decode as you did for ppapi/examples, and get LGTM ...
5 years, 4 months ago (2015-08-13 20:53:39 UTC) #40
lpique
On 2015/08/13 20:53:39, bbudge wrote: > Still LGTM. You should also change > native_client_sdk/src/examples/api/video_decode as ...
5 years, 4 months ago (2015-08-13 22:30:38 UTC) #42
Sam Clegg
lgtm
5 years, 4 months ago (2015-08-13 22:36:16 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1207043002/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1207043002/270001
5 years, 4 months ago (2015-08-14 18:46:20 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/88396)
5 years, 4 months ago (2015-08-14 18:55:26 UTC) #49
lpique
On 2015/08/14 18:55:26, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 4 months ago (2015-08-14 19:12:02 UTC) #50
lpique
On 2015/08/14 19:12:02, lpique wrote: > On 2015/08/14 18:55:26, commit-bot: I haz the power wrote: ...
5 years, 4 months ago (2015-08-14 19:13:24 UTC) #51
lpique
On 2015/08/14 19:13:24, lpique wrote: > On 2015/08/14 19:12:02, lpique wrote: > > On 2015/08/14 ...
5 years, 4 months ago (2015-08-17 19:23:18 UTC) #53
jln (very slow on Chromium)
ppapi/proxy/video_decoder_resource.h mostly 'rubberstamp lgtm', but please be paranoid and at the very least check that ...
5 years, 4 months ago (2015-08-17 21:44:14 UTC) #54
jln (very slow on Chromium)
(forgot the comments) https://chromiumcodereview.appspot.com/1207043002/diff/270001/ppapi/proxy/video_decoder_resource.cc File ppapi/proxy/video_decoder_resource.cc (right): https://chromiumcodereview.appspot.com/1207043002/diff/270001/ppapi/proxy/video_decoder_resource.cc#newcode37 ppapi/proxy/video_decoder_resource.cc:37: const uint32_t kMaximumPictureCount = 100; What ...
5 years, 4 months ago (2015-08-17 21:44:39 UTC) #55
lpique
Thanks for your review. https://chromiumcodereview.appspot.com/1207043002/diff/270001/ppapi/proxy/video_decoder_resource.cc File ppapi/proxy/video_decoder_resource.cc (right): https://chromiumcodereview.appspot.com/1207043002/diff/270001/ppapi/proxy/video_decoder_resource.cc#newcode37 ppapi/proxy/video_decoder_resource.cc:37: const uint32_t kMaximumPictureCount = 100; ...
5 years, 4 months ago (2015-08-17 23:57:07 UTC) #56
bbudge
https://codereview.chromium.org/1207043002/diff/270001/ppapi/proxy/video_decoder_resource.cc File ppapi/proxy/video_decoder_resource.cc (right): https://codereview.chromium.org/1207043002/diff/270001/ppapi/proxy/video_decoder_resource.cc#newcode390 ppapi/proxy/video_decoder_resource.cc:390: DCHECK(num_textures >= min_picture_count_); On 2015/08/17 23:57:07, lpique wrote: > ...
5 years, 4 months ago (2015-08-18 00:48:13 UTC) #57
lpique
On 2015/08/18 00:48:13, bbudge wrote: > https://codereview.chromium.org/1207043002/diff/270001/ppapi/proxy/video_decoder_resource.cc > File ppapi/proxy/video_decoder_resource.cc (right): > > https://codereview.chromium.org/1207043002/diff/270001/ppapi/proxy/video_decoder_resource.cc#newcode390 > ...
5 years, 4 months ago (2015-08-18 00:55:00 UTC) #58
bbudge
Still LGTM with a request to move the constant definition. https://codereview.chromium.org/1207043002/diff/270001/ppapi/proxy/video_decoder_resource.cc File ppapi/proxy/video_decoder_resource.cc (right): https://codereview.chromium.org/1207043002/diff/270001/ppapi/proxy/video_decoder_resource.cc#newcode137 ...
5 years, 4 months ago (2015-08-19 18:47:06 UTC) #60
lpique
Thanks. https://codereview.chromium.org/1207043002/diff/290001/content/renderer/pepper/pepper_video_decoder_host.cc File content/renderer/pepper/pepper_video_decoder_host.cc (right): https://codereview.chromium.org/1207043002/diff/290001/content/renderer/pepper/pepper_video_decoder_host.cc#newcode40 content/renderer/pepper/pepper_video_decoder_host.cc:40: const uint32_t kMaximumPictureCount = 100; On 2015/08/19 18:47:06, ...
5 years, 4 months ago (2015-08-19 19:42:17 UTC) #62
jar (doing other things)
One line change in histograms.xml LGTM
5 years, 4 months ago (2015-08-19 20:58:59 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1207043002/310001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1207043002/310001
5 years, 4 months ago (2015-08-19 22:14:17 UTC) #67
commit-bot: I haz the power
All required reviewers (with asterisk prefixes) have not yet approved this CL. No L-G-T-M from ...
5 years, 4 months ago (2015-08-19 22:14:20 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1207043002/310001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1207043002/310001
5 years, 4 months ago (2015-08-19 22:24:00 UTC) #72
commit-bot: I haz the power
Committed patchset #17 (id:310001)
5 years, 4 months ago (2015-08-20 01:07:02 UTC) #73
commit-bot: I haz the power
5 years, 4 months ago (2015-08-20 01:07:33 UTC) #74
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/9dd55e546c4de8767e83fc4065fa2c8352abb47f
Cr-Commit-Position: refs/heads/master@{#344391}

Powered by Google App Engine
This is Rietveld 408576698