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

Issue 2678343011: chromeos: decode video into NV12 format instead of RGBA in vaapi decoder (Closed)

Created:
3 years, 10 months ago by dshwang
Modified:
3 years, 5 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, feature-media-reviews_chromium.org, piman+watch_chromium.org, posciak+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

chromeos: decode video into NV12 format instead of RGBA in vaapi decoder NV12 is 1.5 bytes per pixel, while BGRA is 4 bytes per pixel. It speeds up and saves power consumption. There is 2 reasons why NV12 is the most desirable format. 1. The display controller hardware in Intel SoCs support NV12 [1] and YUV422 for hardware overlay. 2. Intel vaapi gpu decoder decodes the encoded video to NV12 first. If we use YVU420 or YUYV, gpu decoder needs to do additional color conversion or swizzling. This CL is based on Johnson Lin's implementaion https://codereview.chromium.org/2636433003/ Electro (Apollo Lake) on H264 1080p 30FPS video * BGRA: 7.87 W * NV12: 7.41 W NV12 saves 5.8% power compared to BGRA for H264 Electro (Apollo Lake) on VP9 1080p 30FPS video * BGRA: 8.34 W * NV12: 8.03 W NV12 saves 3.7% power compared to BGRA for VP9 [1] https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-kbl-vol12-display.pdf BUG=683347 TEST=cc_unittests VideoResourceUpdaterTest.CreateForNV12HardwarePlanes run samus and lars chromeos on http://www.quirksmode.org/html5/tests/video.html CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Patch Set 1 #

Patch Set 2 : NV12 instead of YUYV #

Patch Set 3 : add unittests #

Patch Set 4 : fix software decode artifact #

Patch Set 5 : fix redtint with --disable-accelerated-video-decode --enable-native-gpu-memory-buffers #

Total comments: 24

Patch Set 6 : decide scanout in runtime #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -31 lines) Patch
M cc/resources/video_resource_updater.cc View 1 2 3 4 5 1 chunk +6 lines, -2 lines 0 comments Download
M cc/resources/video_resource_updater_unittest.cc View 1 2 3 4 5 3 chunks +42 lines, -8 lines 0 comments Download
M media/gpu/vaapi_drm_picture.cc View 1 2 3 4 5 4 chunks +13 lines, -2 lines 0 comments Download
M media/gpu/vaapi_video_decode_accelerator.cc View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M media/gpu/vaapi_wrapper.cc View 1 2 3 4 5 3 chunks +4 lines, -1 line 0 comments Download
M ui/gfx/linux/client_native_pixmap_factory_dmabuf.cc View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M ui/gfx/native_pixmap.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M ui/ozone/platform/cast/surface_factory_cast.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/common/drm_util.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/common/drm_util.cc View 1 2 3 4 5 2 chunks +31 lines, -0 lines 1 comment Download
M ui/ozone/platform/drm/gpu/drm_thread.cc View 1 2 3 4 5 1 chunk +1 line, -17 lines 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_buffer.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_buffer.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M ui/ozone/platform/headless/headless_surface_factory.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 65 (41 generated)
dshwang
dcastagna@, as you reviewed in https://codereview.chromium.org/2648633005/, this part is extracted. This CL require cc: UYVY ...
3 years, 10 months ago (2017-02-09 04:19:50 UTC) #4
Pawel Osciak
Thank you for the patch. Could you please provide details on the following: - what ...
3 years, 10 months ago (2017-02-14 05:19:56 UTC) #8
dshwang
Hi Pawel, thank you for reviewing. I changed the description to be more clear. On ...
3 years, 10 months ago (2017-02-21 22:24:44 UTC) #12
dshwang
Hi Pawel and Daniele, could you review again? Now it uses NV12. This CL is ...
3 years, 6 months ago (2017-06-08 21:05:37 UTC) #19
dshwang
dnicoara@, could you review? It switchs RGBA to NV12 for VAAPI gpu video decoding. NV12 ...
3 years, 6 months ago (2017-06-14 01:35:42 UTC) #31
Daniele Castagna
On 2017/06/14 at 01:35:42, dongseong.hwang wrote: > dnicoara@, could you review? > It switchs RGBA ...
3 years, 6 months ago (2017-06-14 03:04:03 UTC) #32
dshwang
On 2017/06/14 03:04:03, Daniele Castagna wrote: > On 2017/06/14 at 01:35:42, dongseong.hwang wrote: > > ...
3 years, 6 months ago (2017-06-14 20:35:57 UTC) #33
Daniele Castagna
On 2017/06/14 at 20:35:57, dongseong.hwang wrote: > On 2017/06/14 03:04:03, Daniele Castagna wrote: > > ...
3 years, 6 months ago (2017-06-15 19:21:56 UTC) #34
Pawel Osciak
Thank you for the patch. I would like to give this some testing first, my ...
3 years, 6 months ago (2017-06-16 04:59:42 UTC) #35
dshwang
On 2017/06/16 04:59:42, Pawel Osciak wrote: > Thank you for the patch. I would like ...
3 years, 6 months ago (2017-06-16 21:04:13 UTC) #36
Pawel Osciak
On 2017/06/16 21:04:13, dshwang wrote: > On 2017/06/16 04:59:42, Pawel Osciak wrote: > > Thank ...
3 years, 6 months ago (2017-06-20 08:42:12 UTC) #37
dshwang
On 2017/06/20 08:42:12, Pawel Osciak wrote: > Thank you. Could you explain the status of ...
3 years, 6 months ago (2017-06-21 22:20:51 UTC) #41
dshwang
Hi Pawel, the minigbm patch is landing and the mesa patch was landed. Would you ...
3 years, 6 months ago (2017-06-22 17:25:06 UTC) #49
gurchetansingh
"chromeos: gpu video decoder on Intel decodes video in NV12 format, instead of RGBA" Can ...
3 years, 6 months ago (2017-06-22 23:31:59 UTC) #52
dshwang
On 2017/06/22 23:31:59, gurchetansingh wrote: > Can you say what this patch does in particular ...
3 years, 6 months ago (2017-06-23 01:07:05 UTC) #54
gurchetansingh
Can you change the subject? "Decode video into NV12 format instead of RGBA is vaapi ...
3 years, 6 months ago (2017-06-23 03:18:33 UTC) #55
gurchetansingh
On 2017/06/23 03:18:33, gurchetansingh wrote: > Can you change the subject? "Decode video into NV12 ...
3 years, 6 months ago (2017-06-23 03:28:15 UTC) #56
gurchetansingh
On 2017/06/23 03:18:33, gurchetansingh wrote: > Can you change the subject? "Decode video into NV12 ...
3 years, 6 months ago (2017-06-23 03:28:16 UTC) #57
dshwang
Gurchetan, thx for reviewing, which give me several TODO. Could you review my comment again? ...
3 years, 6 months ago (2017-06-23 23:25:14 UTC) #59
gurchetansingh
https://codereview.chromium.org/2678343011/diff/100001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/2678343011/diff/100001/cc/resources/video_resource_updater.cc#newcode67 cc/resources/video_resource_updater.cc:67: bool is_dual_gmb = video_frame->mailbox_holder(1).texture_target == On 2017/06/23 23:25:14, dshwang ...
3 years, 6 months ago (2017-06-24 01:50:48 UTC) #60
Daniele Castagna
https://codereview.chromium.org/2678343011/diff/100001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/2678343011/diff/100001/cc/resources/video_resource_updater.cc#newcode67 cc/resources/video_resource_updater.cc:67: bool is_dual_gmb = video_frame->mailbox_holder(1).texture_target == On 2017/06/24 at 01:50:48, ...
3 years, 5 months ago (2017-06-26 18:06:43 UTC) #61
dshwang
new patch set chooses usage in runtime, which resolves all concerns. It moves the decison ...
3 years, 5 months ago (2017-06-28 02:08:34 UTC) #62
gurchetansingh
https://codereview.chromium.org/2678343011/diff/140001/ui/ozone/platform/drm/common/drm_util.cc File ui/ozone/platform/drm/common/drm_util.cc (right): https://codereview.chromium.org/2678343011/diff/140001/ui/ozone/platform/drm/common/drm_util.cc#newcode538 ui/ozone/platform/drm/common/drm_util.cc:538: case GBM_BO_USE_TEXTURING: After the gbm.h change lands, you still ...
3 years, 5 months ago (2017-06-28 20:59:18 UTC) #64
dshwang
3 years, 5 months ago (2017-07-13 00:11:16 UTC) #65
Message was sent while issue was closed.
relocate to gerrit https://chromium-review.googlesource.com/c/569144/

Powered by Google App Engine
This is Rietveld 408576698