Backed out changeset 2fb3a9820103 (bug 1215089)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 04 Oct 2017 16:26:04 +0200
changeset 427106 51e59665a172ddc0a5b47d5eb283790b3b1e7442
parent 427105 529b9534df94385455fd47da650a819c95011391
child 427107 1e5d5bad2c7e0d7b20337a40753c2067a3d1886f
push id97
push userfmarier@mozilla.com
push dateSat, 14 Oct 2017 01:12:59 +0000
bugs1215089
milestone58.0a1
backs out2fb3a9820103f9b58be4f0b4e25ce532ac1038e3
Backed out changeset 2fb3a9820103 (bug 1215089)
dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
@@ -14,18 +14,16 @@
 
 #include "libavutil/pixfmt.h"
 #if LIBAVCODEC_VERSION_MAJOR < 54
 #define AVPixelFormat PixelFormat
 #define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
 #define AV_PIX_FMT_YUVJ420P PIX_FMT_YUVJ420P
 #define AV_PIX_FMT_YUV422P PIX_FMT_YUV422P
 #define AV_PIX_FMT_YUV444P PIX_FMT_YUV444P
-#define AV_PIX_FMT_YUV420P10LE PIX_FMT_YUV420P10LE
-#define AV_PIX_FMT_YUV444P10LE PIX_FMT_YUV444P10LE
 #define AV_PIX_FMT_NONE PIX_FMT_NONE
 #endif
 #include "mozilla/PodOperations.h"
 #include "mozilla/TaskQueue.h"
 #include "nsThreadUtils.h"
 #include "prsystem.h"
 
 
@@ -55,27 +53,16 @@ ChoosePixelFormat(AVCodecContext* aCodec
         FFMPEG_LOG("Requesting pixel format YUV422P.");
         return AV_PIX_FMT_YUV422P;
       case AV_PIX_FMT_YUV420P:
         FFMPEG_LOG("Requesting pixel format YUV420P.");
         return AV_PIX_FMT_YUV420P;
       case AV_PIX_FMT_YUVJ420P:
         FFMPEG_LOG("Requesting pixel format YUVJ420P.");
         return AV_PIX_FMT_YUVJ420P;
-      case AV_PIX_FMT_YUV420P10LE:
-        FFMPEG_LOG("Requesting pixel format YUV420P10LE.");
-        return AV_PIX_FMT_YUV420P10LE;
-      case AV_PIX_FMT_YUV444P10LE:
-        FFMPEG_LOG("Requesting pixel format YUV444P10LE.");
-        return AV_PIX_FMT_YUV444P10LE;
-#if LIBAVCODEC_VERSION_MAJOR >= 57
-      case AV_PIX_FMT_YUV444P12LE:
-        FFMPEG_LOG("Requesting pixel format YUV444P12LE.");
-        return AV_PIX_FMT_YUV444P12LE;
-#endif
       default:
         break;
     }
   }
 
   NS_WARNING("FFmpeg does not share any supported pixel formats.");
   return AV_PIX_FMT_NONE;
 }
@@ -329,42 +316,25 @@ FFmpegVideoDecoder<LIBAV_VER>::DoDecode(
   b.mPlanes[2].mStride = mFrame->linesize[2];
 
   b.mPlanes[0].mOffset = b.mPlanes[0].mSkip = 0;
   b.mPlanes[1].mOffset = b.mPlanes[1].mSkip = 0;
   b.mPlanes[2].mOffset = b.mPlanes[2].mSkip = 0;
 
   b.mPlanes[0].mWidth = mFrame->width;
   b.mPlanes[0].mHeight = mFrame->height;
-  if (mCodecContext->pix_fmt == AV_PIX_FMT_YUV444P ||
-      mCodecContext->pix_fmt == AV_PIX_FMT_YUV444P10LE
-#if LIBAVCODEC_VERSION_MAJOR >= 57
-      ||
-      mCodecContext->pix_fmt == AV_PIX_FMT_YUV444P12LE
-#endif
-      ) {
+  if (mCodecContext->pix_fmt == AV_PIX_FMT_YUV444P) {
     b.mPlanes[1].mWidth = b.mPlanes[2].mWidth = mFrame->width;
     b.mPlanes[1].mHeight = b.mPlanes[2].mHeight = mFrame->height;
-    if (mCodecContext->pix_fmt == AV_PIX_FMT_YUV444P10LE) {
-      b.mDepth = 10;
-    }
-#if LIBAVCODEC_VERSION_MAJOR >= 57
-    else if (mCodecContext->pix_fmt == AV_PIX_FMT_YUV444P12LE) {
-      b.mDepth = 12;
-    }
-#endif
   } else if (mCodecContext->pix_fmt == AV_PIX_FMT_YUV422P) {
     b.mPlanes[1].mWidth = b.mPlanes[2].mWidth = (mFrame->width + 1) >> 1;
     b.mPlanes[1].mHeight = b.mPlanes[2].mHeight = mFrame->height;
   } else {
     b.mPlanes[1].mWidth = b.mPlanes[2].mWidth = (mFrame->width + 1) >> 1;
     b.mPlanes[1].mHeight = b.mPlanes[2].mHeight = (mFrame->height + 1) >> 1;
-    if (mCodecContext->pix_fmt == AV_PIX_FMT_YUV420P10LE) {
-      b.mDepth = 10;
-    }
   }
   if (mLib->av_frame_get_colorspace) {
     switch (mLib->av_frame_get_colorspace(mFrame)) {
       case AVCOL_SPC_BT709:
         b.mYUVColorSpace = YUVColorSpace::BT709;
         break;
       case AVCOL_SPC_SMPTE170M:
       case AVCOL_SPC_BT470BG: