diff options
author | rileya@chromium.org <rileya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-03 02:25:58 +0000 |
---|---|---|
committer | rileya@chromium.org <rileya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-03 02:25:58 +0000 |
commit | 82faf5ea428558d05081b2d0dd308f1832b37c5b (patch) | |
tree | 11bec6c332858ee8a901fec7d4f103cc6e09f8bd /cc/quads/yuv_video_draw_quad.h | |
parent | ce8c2a80fddc4866d88dfba43b8d4c39ba1b0063 (diff) | |
download | chromium_src-82faf5ea428558d05081b2d0dd308f1832b37c5b.zip chromium_src-82faf5ea428558d05081b2d0dd308f1832b37c5b.tar.gz chromium_src-82faf5ea428558d05081b2d0dd308f1832b37c5b.tar.bz2 |
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
Diffstat (limited to 'cc/quads/yuv_video_draw_quad.h')
-rw-r--r-- | cc/quads/yuv_video_draw_quad.h | 13 |
1 files changed, 11 insertions, 2 deletions
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<YUVVideoDrawQuad> 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; |