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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/resources/video_resource_updater.h" 5 #include "cc/resources/video_resource_updater.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 NOTREACHED(); 56 NOTREACHED();
57 break; 57 break;
58 } 58 }
59 break; 59 break;
60 case media::PIXEL_FORMAT_I420: 60 case media::PIXEL_FORMAT_I420:
61 return VideoFrameExternalResources::YUV_RESOURCE; 61 return VideoFrameExternalResources::YUV_RESOURCE;
62 break; 62 break;
63 case media::PIXEL_FORMAT_NV12: 63 case media::PIXEL_FORMAT_NV12:
64 switch (video_frame->mailbox_holder(0).texture_target) { 64 switch (video_frame->mailbox_holder(0).texture_target) {
65 case GL_TEXTURE_EXTERNAL_OES: 65 case GL_TEXTURE_EXTERNAL_OES:
66 case GL_TEXTURE_2D: 66 case GL_TEXTURE_2D: {
67 return VideoFrameExternalResources::YUV_RESOURCE; 67 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
68 video_frame->mailbox_holder(0).texture_target;
69 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
70 : VideoFrameExternalResources::RGB_RESOURCE;
71 }
68 case GL_TEXTURE_RECTANGLE_ARB: 72 case GL_TEXTURE_RECTANGLE_ARB:
69 return VideoFrameExternalResources::RGB_RESOURCE; 73 return VideoFrameExternalResources::RGB_RESOURCE;
70 default: 74 default:
71 NOTREACHED(); 75 NOTREACHED();
72 break; 76 break;
73 } 77 }
74 break; 78 break;
75 case media::PIXEL_FORMAT_YV12: 79 case media::PIXEL_FORMAT_YV12:
76 case media::PIXEL_FORMAT_YV16: 80 case media::PIXEL_FORMAT_YV16:
77 case media::PIXEL_FORMAT_YV24: 81 case media::PIXEL_FORMAT_YV24:
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 if (lost_resource) { 703 if (lost_resource) {
700 resource_it->clear_refs(); 704 resource_it->clear_refs();
701 updater->DeleteResource(resource_it); 705 updater->DeleteResource(resource_it);
702 return; 706 return;
703 } 707 }
704 708
705 resource_it->remove_ref(); 709 resource_it->remove_ref();
706 } 710 }
707 711
708 } // namespace cc 712 } // namespace cc
OLDNEW
« 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