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

Unified Diff: media/ffmpeg/ffmpeg_common.cc

Issue 591313008: Add support for Rec709 color space videos in software YUV convert path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add enum to mojom Created 5 years, 11 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 | « media/blink/video_frame_compositor.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/ffmpeg/ffmpeg_common.cc
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index f817547006fbfdd5ffe887d7a4abd573a6ca9dd5..2c99e7e70146b3642c1e2548297d38b419c83122 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -407,6 +407,12 @@ void AVStreamToVideoDecoderConfig(
coded_size = visible_rect.size();
}
+ // YV12 frames may be in HD color space.
+ if (format == VideoFrame::YV12 &&
+ stream->codec->colorspace == AVCOL_SPC_BT709) {
+ format = VideoFrame::YV12HD;
+ }
+
// Pad out |coded_size| for subsampled YUV formats.
if (format != VideoFrame::YV24) {
coded_size.set_width((coded_size.width() + 1) / 2 * 2);
@@ -546,6 +552,7 @@ PixelFormat VideoFormatToPixelFormat(VideoFrame::Format video_format) {
case VideoFrame::YV16:
return PIX_FMT_YUV422P;
case VideoFrame::YV12:
+ case VideoFrame::YV12HD:
return PIX_FMT_YUV420P;
case VideoFrame::YV12J:
return PIX_FMT_YUVJ420P;
« no previous file with comments | « media/blink/video_frame_compositor.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698