Merge commit 'ebd5320afd42d4315851f3e0ca7f5d4a6300eb68'
[ffmpeg.git] / libavcodec / h264_slice.c
index 2f58f1132eb06194cecbc007b73ef92b7b4d14ac..e689044323466fa499dc762bf4c2932e25bcc68c 100644 (file)
@@ -1054,6 +1054,9 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
             *fmt++ = AV_PIX_FMT_YUV420P14;
         break;
     case 8:
+#if CONFIG_H264_VDPAU_HWACCEL
+        *fmt++ = AV_PIX_FMT_VDPAU;
+#endif
         if (CHROMA444(h)) {
             if (h->avctx->colorspace == AVCOL_SPC_YCGCO)
                 av_log(h->avctx, AV_LOG_WARNING, "Detected unsupported YCgCo colorspace.\n");
@@ -1078,9 +1081,6 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
 #if CONFIG_H264_VDA_HWACCEL
             *fmt++ = AV_PIX_FMT_VDA_VLD;
             *fmt++ = AV_PIX_FMT_VDA;
-#endif
-#if CONFIG_H264_VDPAU_HWACCEL
-            *fmt++ = AV_PIX_FMT_VDPAU;
 #endif
             if (h->avctx->codec->pix_fmts)
                 choices = h->avctx->codec->pix_fmts;