summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-29 07:14:43 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-29 07:14:43 +0000
commit358cfb2eec2b8fe0237594e4656cc3e9b8ac61e8 (patch)
tree313e5b0767e9ad9aaeaa574421604d2f4500fe5a /media
parent25b6979911b3fbcc4e6ee95a47db88c4d5a5930f (diff)
downloadchromium_src-358cfb2eec2b8fe0237594e4656cc3e9b8ac61e8.zip
chromium_src-358cfb2eec2b8fe0237594e4656cc3e9b8ac61e8.tar.gz
chromium_src-358cfb2eec2b8fe0237594e4656cc3e9b8ac61e8.tar.bz2
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
Diffstat (limited to 'media')
-rw-r--r--media/ffmpeg/ffmpeg_common.cc4
1 files changed, 4 insertions, 0 deletions
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;