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

Unified Diff: media/filters/vpx_video_decoder.cc

Issue 978483002: Support VP9 video in the BT709 color space. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | media/test/data/bear-vp9-bt709.webm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vpx_video_decoder.cc
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc
index dd436796ce1c20500cc5dc38f251fb0b81b9caac..747659cb83d9a264a30c496a5d4daf9eb53ab7b0 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -460,7 +460,11 @@ void VpxVideoDecoder::CopyVpxImageTo(const vpx_image* vpx_image,
VideoFrame::Format codec_format = VideoFrame::YV12;
int uv_rows = (vpx_image->d_h + 1) / 2;
- if (vpx_image->fmt == VPX_IMG_FMT_I444) {
+ if ((vpx_image->fmt == VPX_IMG_FMT_YV12 ||
+ vpx_image->fmt == VPX_IMG_FMT_I420) &&
+ vpx_image->cs == VPX_CS_BT_709) {
xhwang 2015/03/03 19:53:30 Can vpx_codec_alpha_ be true here?
watk 2015/03/03 22:01:28 Yeah, it can. Unfortunately we have to choose betw
+ codec_format = VideoFrame::YV12HD;
+ } else if (vpx_image->fmt == VPX_IMG_FMT_I444) {
xhwang 2015/03/03 19:53:30 Can vpx_image->cs == VPX_CS_BT_709 here?
watk 2015/03/03 22:01:28 It can, but we can't support it at the moment :( I
CHECK(!vpx_codec_alpha_);
codec_format = VideoFrame::YV24;
uv_rows = vpx_image->d_h;
« no previous file with comments | « no previous file | media/test/data/bear-vp9-bt709.webm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698