Chromium Code Reviews| Index: media/ffmpeg/ffmpeg_common.cc |
| diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc |
| index ab644687e58484639cf0c1ac4291ca42b7cc714d..769c805396464c7d2cad4c64ed969224052e2924 100644 |
| --- a/media/ffmpeg/ffmpeg_common.cc |
| +++ b/media/ffmpeg/ffmpeg_common.cc |
| @@ -400,9 +400,11 @@ void AVStreamToVideoDecoderConfig( |
| } |
| // Pad out |coded_size| for subsampled YUV formats. |
| - coded_size.set_width((coded_size.width() + 1) / 2 * 2); |
| - if (format != VideoFrame::YV16) |
| - coded_size.set_height((coded_size.height() + 1) / 2 * 2); |
| + if (format != VideoFrame::I444) { |
| + coded_size.set_width((coded_size.width() + 1) / 2 * 2); |
| + if (format != VideoFrame::YV16) |
| + coded_size.set_height((coded_size.height() + 1) / 2 * 2); |
| + } |
| bool is_encrypted = false; |
| AVDictionaryEntry* key = av_dict_get(stream->metadata, "enc_key_id", NULL, 0); |
| @@ -517,6 +519,8 @@ VideoFrame::Format PixelFormatToVideoFormat(PixelFormat pixel_format) { |
| switch (pixel_format) { |
| case PIX_FMT_YUV422P: |
| return VideoFrame::YV16; |
| + case PIX_FMT_YUV444P: |
| + return VideoFrame::I444; |
| case PIX_FMT_YUV420P: |
| return VideoFrame::YV12; |
| case PIX_FMT_YUVJ420P: |
| @@ -539,6 +543,8 @@ PixelFormat VideoFormatToPixelFormat(VideoFrame::Format video_format) { |
| return PIX_FMT_YUVJ420P; |
| case VideoFrame::YV12A: |
| return PIX_FMT_YUVA420P; |
| + case VideoFrame::I444: |
| + return PIX_FMT_YUV422P; |
|
scherkus (not reviewing)
2014/05/22 23:45:11
shouldn't this be PIX_FMT_YUV444P?
sandersd (OOO until July 31)
2014/05/23 00:45:22
Done.
|
| default: |
| DVLOG(1) << "Unsupported VideoFrame::Format: " << video_format; |
| } |