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

Unified Diff: cc/layers/video_layer_impl.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: Add missing 'f' to float literal to make VS happy Created 6 years, 8 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/output/gl_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/video_layer_impl.cc
diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc
index e6e54a145b35493d4832138f0204eeb4f68b6eaf..20021167e150e379c6423bbc26b0d2ca233ee295 100644
--- a/cc/layers/video_layer_impl.cc
+++ b/cc/layers/video_layer_impl.cc
@@ -183,6 +183,10 @@ void VideoLayerImpl::AppendQuads(QuadSink* quad_sink,
DCHECK_GE(frame_resources_.size(), 3u);
if (frame_resources_.size() < 3u)
break;
+ YUVVideoDrawQuad::ColorSpace color_space =
+ frame_->format() == media::VideoFrame::YV12J
+ ? YUVVideoDrawQuad::REC_601_JPEG
+ : YUVVideoDrawQuad::REC_601;
gfx::RectF tex_coord_rect(
tex_x_offset, tex_y_offset, tex_width_scale, tex_height_scale);
scoped_ptr<YUVVideoDrawQuad> yuv_video_quad = YUVVideoDrawQuad::Create();
@@ -195,7 +199,8 @@ void VideoLayerImpl::AppendQuads(QuadSink* quad_sink,
frame_resources_[0],
frame_resources_[1],
frame_resources_[2],
- frame_resources_.size() > 3 ? frame_resources_[3] : 0);
+ frame_resources_.size() > 3 ? frame_resources_[3] : 0,
+ color_space);
quad_sink->Append(yuv_video_quad.PassAs<DrawQuad>());
break;
}
« no previous file with comments | « no previous file | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698