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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 2678343011: chromeos: decode video into NV12 format instead of RGBA in vaapi decoder (Closed)
Patch Set: fix redtint with --disable-accelerated-video-decode --enable-native-gpu-memory-buffers Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/resources/video_resource_updater_unittest.cc » ('j') | media/gpu/vaapi_drm_picture.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/video_resource_updater.cc
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index 9e697580d3f22d696c93e556f9afb19c9ba23e16..2fdfbc10694cb4b058fbd326d8df66e10b8fd199 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -63,8 +63,12 @@ VideoFrameExternalResources::ResourceType ResourceTypeForVideoFrame(
case media::PIXEL_FORMAT_NV12:
switch (video_frame->mailbox_holder(0).texture_target) {
case GL_TEXTURE_EXTERNAL_OES:
- case GL_TEXTURE_2D:
- return VideoFrameExternalResources::YUV_RESOURCE;
+ case GL_TEXTURE_2D: {
+ bool is_dual_gmb = video_frame->mailbox_holder(1).texture_target ==
gurchetansingh 2017/06/22 23:31:59 What is a "dual gmb", one that as more than plane
dshwang 2017/06/23 01:07:05 According to NV12_DUAL_GMB comment, it consists of
gurchetansingh 2017/06/23 03:18:33 Why is a VideoFrameExternalResources::YUV_RESOURCE
dshwang 2017/06/23 23:25:14 YUV_RESOURCE creates YUVVideoDrawQuad, whose shade
gurchetansingh 2017/06/24 01:50:48 How does whether it's a YUVVideoDrawQuad or a Text
Daniele Castagna 2017/06/26 18:06:43 The EGL import is done earlier by the video decode
+ video_frame->mailbox_holder(0).texture_target;
+ return is_dual_gmb ? VideoFrameExternalResources::YUV_RESOURCE
Daniele Castagna 2017/06/26 18:06:43 What if a VideoFrame is YUV with 3 textures? Shoul
dshwang 2017/06/28 02:08:34 yes, YUV_RESOURCE can handle both y & uv planes an
+ : VideoFrameExternalResources::RGB_RESOURCE;
+ }
case GL_TEXTURE_RECTANGLE_ARB:
return VideoFrameExternalResources::RGB_RESOURCE;
default:
« no previous file with comments | « no previous file | cc/resources/video_resource_updater_unittest.cc » ('j') | media/gpu/vaapi_drm_picture.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698