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

Unified Diff: cc/layers/video_layer_impl.cc

Issue 1008493002: Increase YUV video clamping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 9 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 228f2ccdc8404341b54770e8271d8dfad4e1f9e6..a4f96d4338274aaf84a14e8e5f250128b3412593 100644
--- a/cc/layers/video_layer_impl.cc
+++ b/cc/layers/video_layer_impl.cc
@@ -229,14 +229,26 @@ void VideoLayerImpl::AppendQuads(RenderPass* render_pass,
color_space = YUVVideoDrawQuad::REC_709;
}
+ const gfx::Size ya_tex_size = coded_size;
+ const gfx::Size uv_tex_size = media::VideoFrame::PlaneSize(
+ frame_->format(), media::VideoFrame::kUPlane, coded_size);
+ DCHECK(uv_tex_size ==
+ media::VideoFrame::PlaneSize(
+ frame_->format(), media::VideoFrame::kVPlane, coded_size));
+ if (frame_resources_.size() > 3) {
+ DCHECK(ya_tex_size ==
+ media::VideoFrame::PlaneSize(
+ frame_->format(), media::VideoFrame::kAPlane, coded_size));
+ }
+
gfx::RectF tex_coord_rect(
tex_x_offset, tex_y_offset, tex_width_scale, tex_height_scale);
YUVVideoDrawQuad* yuv_video_quad =
render_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>();
yuv_video_quad->SetNew(
shared_quad_state, quad_rect, opaque_rect, visible_quad_rect,
- tex_coord_rect, coded_size, frame_resources_[0], frame_resources_[1],
- frame_resources_[2],
+ tex_coord_rect, ya_tex_size, uv_tex_size, frame_resources_[0],
+ frame_resources_[1], frame_resources_[2],
frame_resources_.size() > 3 ? frame_resources_[3] : 0, color_space);
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