Bug 1233340: [ffmpeg] Support YUV420J pixel format. r=kentuckyfriedtakahe
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 21 Dec 2015 11:20:58 +1100
changeset 277092 8b0ced62c1957f6da6028af686c32ada1ccb570c
parent 277091 e1a98377eb38679bda820456ee6d20bdc17eaa8e
child 277093 2c7becfabe070b6d8c383b69868e1927d5310484
push id29814
push usercbook@mozilla.com
push dateMon, 21 Dec 2015 10:52:58 +0000
treeherdermozilla-central@e6ba2d4a2e49 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskentuckyfriedtakahe
bugs1233340
milestone46.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1233340: [ffmpeg] Support YUV420J pixel format. r=kentuckyfriedtakahe YUV420J is 12bpp YUV420P.
dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp
--- a/dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp
@@ -52,17 +52,17 @@ FFmpegDataDecoder<LIBAV_VER>::~FFmpegDat
  * For now, we just look for YUV420P as it is the only non-HW accelerated format
  * supported by FFmpeg's H264 decoder.
  */
 static PixelFormat
 ChoosePixelFormat(AVCodecContext* aCodecContext, const PixelFormat* aFormats)
 {
   FFMPEG_LOG("Choosing FFmpeg pixel format for video decoding.");
   for (; *aFormats > -1; aFormats++) {
-    if (*aFormats == PIX_FMT_YUV420P) {
+    if (*aFormats == PIX_FMT_YUV420P || *aFormats == PIX_FMT_YUVJ420P) {
       FFMPEG_LOG("Requesting pixel format YUV420P.");
       return PIX_FMT_YUV420P;
     }
   }
 
   NS_WARNING("FFmpeg does not share any supported pixel formats.");
   return PIX_FMT_NONE;
 }