From 358cfb2eec2b8fe0237594e4656cc3e9b8ac61e8 Mon Sep 17 00:00:00 2001 From: "scherkus@chromium.org" Date: Tue, 29 Jan 2013 07:14:43 +0000 Subject: Add support for YUVJ420P and tests for common color formats for each video codec. I believe we still have some work to do in our color range and conversion routines, but at least this enables the color format instead of erroring out. BUG=117368 Review URL: https://codereview.chromium.org/12088012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179300 0039d316-1c4b-4281-b951-d872f2087c98 --- media/ffmpeg/ffmpeg_common.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'media') diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc index 2ae0b1b..800c027 100644 --- a/media/ffmpeg/ffmpeg_common.cc +++ b/media/ffmpeg/ffmpeg_common.cc @@ -464,7 +464,11 @@ 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; default: DVLOG(1) << "Unsupported PixelFormat: " << pixel_format; -- cgit v1.1