Bug 1233340: [ffmpeg] Support YUV420J pixel format. r=kentuckyfriedtakahe a=sylvestre
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 21 Dec 2015 11:20:58 +1100
changeset 305892 2d1e997196dba011d393beb006dd466038bdee06
parent 305891 3bb6c2232c8d9890510f794cec0160b604e7afbf
child 305893 e6814c72d6c153f34ca7147fa137b6037bd0d454
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskentuckyfriedtakahe, sylvestre
bugs1233340
milestone44.0
Bug 1233340: [ffmpeg] Support YUV420J pixel format. r=kentuckyfriedtakahe a=sylvestre 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;
 }