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

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: jpeg_color_range->has_jpeg_color_range 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::YV12J || 139 input_frame_format == media::VideoFrame::YV12J ||
139 input_frame_format == media::VideoFrame::YV16); 140 input_frame_format == media::VideoFrame::YV16);
140 if (input_frame_format != media::VideoFrame::YV12 && 141 if (input_frame_format != media::VideoFrame::YV12 &&
142 input_frame_format != media::VideoFrame::YV12J &&
141 input_frame_format != media::VideoFrame::YV12A && 143 input_frame_format != media::VideoFrame::YV12A &&
142 input_frame_format != media::VideoFrame::YV12J && 144 input_frame_format != media::VideoFrame::YV12J &&
143 input_frame_format != media::VideoFrame::YV16) 145 input_frame_format != media::VideoFrame::YV16)
144 return VideoFrameExternalResources(); 146 return VideoFrameExternalResources();
145 147
146 bool software_compositor = context_provider_ == NULL; 148 bool software_compositor = context_provider_ == NULL;
147 149
148 ResourceFormat output_resource_format = kYUVResourceFormat; 150 ResourceFormat output_resource_format = kYUVResourceFormat;
149 size_t output_plane_count = 151 size_t output_plane_count =
150 (input_frame_format == media::VideoFrame::YV12A) ? 4 : 3; 152 (input_frame_format == media::VideoFrame::YV12A) ? 4 : 3;
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 } 404 }
403 405
404 PlaneResource recycled_resource(data.resource_id, 406 PlaneResource recycled_resource(data.resource_id,
405 data.resource_size, 407 data.resource_size,
406 data.resource_format, 408 data.resource_format,
407 data.mailbox); 409 data.mailbox);
408 updater->recycled_resources_.push_back(recycled_resource); 410 updater->recycled_resources_.push_back(recycled_resource);
409 } 411 }
410 412
411 } // namespace cc 413 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698