From 82faf5ea428558d05081b2d0dd308f1832b37c5b Mon Sep 17 00:00:00 2001 From: "rileya@chromium.org" Date: Sat, 3 May 2014 02:25:58 +0000 Subject: Support videos with JPEG color range in GPU YUV convert path. It's worth noting that the media_browsertests Yuv* tests compare video pixels with a reference image, but whether or not the hardware path is used, copying the pixels from the video into a canvas goes through the software path, so despite looking correct onscreen when GPU-accelerated, the JPEG color range video tests will still fail until the software path properly supports the JPEG color range. BUG=172898 Review URL: https://codereview.chromium.org/92703003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268010 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/quads/yuv_video_draw_quad.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'cc/quads/yuv_video_draw_quad.h') diff --git a/cc/quads/yuv_video_draw_quad.h b/cc/quads/yuv_video_draw_quad.h index 65b35e0..c95681f 100644 --- a/cc/quads/yuv_video_draw_quad.h +++ b/cc/quads/yuv_video_draw_quad.h @@ -15,6 +15,12 @@ namespace cc { class CC_EXPORT YUVVideoDrawQuad : public DrawQuad { public: + enum ColorSpace { + REC_601, // SDTV standard with restricted "studio swing" color range. + REC_601_JPEG, // Full color range [0, 255] variant of the above. + COLOR_SPACE_LAST = REC_601_JPEG + }; + virtual ~YUVVideoDrawQuad(); static scoped_ptr Create(); @@ -27,7 +33,8 @@ class CC_EXPORT YUVVideoDrawQuad : public DrawQuad { unsigned y_plane_resource_id, unsigned u_plane_resource_id, unsigned v_plane_resource_id, - unsigned a_plane_resource_id); + unsigned a_plane_resource_id, + ColorSpace color_space); void SetAll(const SharedQuadState* shared_quad_state, const gfx::Rect& rect, @@ -38,13 +45,15 @@ class CC_EXPORT YUVVideoDrawQuad : public DrawQuad { unsigned y_plane_resource_id, unsigned u_plane_resource_id, unsigned v_plane_resource_id, - unsigned a_plane_resource_id); + unsigned a_plane_resource_id, + ColorSpace color_space); gfx::RectF tex_coord_rect; unsigned y_plane_resource_id; unsigned u_plane_resource_id; unsigned v_plane_resource_id; unsigned a_plane_resource_id; + ColorSpace color_space; virtual void IterateResources(const ResourceIteratorCallback& callback) OVERRIDE; -- cgit v1.1