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

Side by Side Diff: cc/resources/video_resource_updater.cc

Issue 92703003: Support videos with JPEG color range in GPU YUV convert path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@yuv_v2
Patch Set: Created 7 years 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "cc/output/gl_renderer.h" 8 #include "cc/output/gl_renderer.h"
9 #include "cc/resources/resource_provider.h" 9 #include "cc/resources/resource_provider.h"
10 #include "gpu/GLES2/gl2extchromium.h" 10 #include "gpu/GLES2/gl2extchromium.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 #if defined(GOOGLE_TV) 127 #if defined(GOOGLE_TV)
128 if (input_frame_format == media::VideoFrame::HOLE) { 128 if (input_frame_format == media::VideoFrame::HOLE) {
129 VideoFrameExternalResources external_resources; 129 VideoFrameExternalResources external_resources;
130 external_resources.type = VideoFrameExternalResources::HOLE; 130 external_resources.type = VideoFrameExternalResources::HOLE;
131 return external_resources; 131 return external_resources;
132 } 132 }
133 #endif 133 #endif
134 134
135 // Only YUV software video frames are supported. 135 // Only YUV software video frames are supported.
136 DCHECK(input_frame_format == media::VideoFrame::YV12 || 136 DCHECK(input_frame_format == media::VideoFrame::YV12 ||
137 input_frame_format == media::VideoFrame::YV12J ||
137 input_frame_format == media::VideoFrame::YV12A || 138 input_frame_format == media::VideoFrame::YV12A ||
138 input_frame_format == media::VideoFrame::YV16); 139 input_frame_format == media::VideoFrame::YV16);
139 if (input_frame_format != media::VideoFrame::YV12 && 140 if (input_frame_format != media::VideoFrame::YV12 &&
141 input_frame_format != media::VideoFrame::YV12J &&
140 input_frame_format != media::VideoFrame::YV12A && 142 input_frame_format != media::VideoFrame::YV12A &&
141 input_frame_format != media::VideoFrame::YV16) 143 input_frame_format != media::VideoFrame::YV16)
142 return VideoFrameExternalResources(); 144 return VideoFrameExternalResources();
143 145
144 bool software_compositor = context_provider_ == NULL; 146 bool software_compositor = context_provider_ == NULL;
145 147
146 ResourceFormat output_resource_format = kYUVResourceFormat; 148 ResourceFormat output_resource_format = kYUVResourceFormat;
147 size_t output_plane_count = 149 size_t output_plane_count =
148 (input_frame_format == media::VideoFrame::YV12A) ? 4 : 3; 150 (input_frame_format == media::VideoFrame::YV12A) ? 4 : 3;
149 151
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 } 402 }
401 403
402 PlaneResource recycled_resource(data.resource_id, 404 PlaneResource recycled_resource(data.resource_id,
403 data.resource_size, 405 data.resource_size,
404 data.resource_format, 406 data.resource_format,
405 data.mailbox); 407 data.mailbox);
406 updater->recycled_resources_.push_back(recycled_resource); 408 updater->recycled_resources_.push_back(recycled_resource);
407 } 409 }
408 410
409 } // namespace cc 411 } // namespace cc
OLDNEW
« cc/quads/yuv_video_draw_quad.h ('K') | « cc/quads/yuv_video_draw_quad.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698