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

Unified Diff: media/ffmpeg/ffmpeg_common.cc

Issue 88403004: Add plumbing for video pixel formats with JPEG color range. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit tests Created 7 years 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
Index: media/ffmpeg/ffmpeg_common.cc
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 905e8d9a9ee7ef01a1daada889499dec510a1c06..40696c690998ff2ea918010d092d614c35e2e63a 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -513,12 +513,10 @@ VideoFrame::Format PixelFormatToVideoFormat(PixelFormat pixel_format) {
switch (pixel_format) {
case PIX_FMT_YUV422P:
return VideoFrame::YV16;
- // TODO(scherkus): We should be paying attention to the color range of each
- // format and scaling as appropriate when rendering. Regular YUV has a range
- // of 16-239 where as YUVJ has a range of 0-255.
case PIX_FMT_YUV420P:
- case PIX_FMT_YUVJ420P:
return VideoFrame::YV12;
+ case PIX_FMT_YUVJ420P:
+ return VideoFrame::YV12J;
case PIX_FMT_YUVA420P:
return VideoFrame::YV12A;
default:
@@ -533,6 +531,8 @@ PixelFormat VideoFormatToPixelFormat(VideoFrame::Format video_format) {
return PIX_FMT_YUV422P;
case VideoFrame::YV12:
return PIX_FMT_YUV420P;
+ case VideoFrame::YV12J:
+ return PIX_FMT_YUVJ420P;
case VideoFrame::YV12A:
return PIX_FMT_YUVA420P;
default:

Powered by Google App Engine
This is Rietveld 408576698