]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/qsvenc.c
avformat: deprecate unused MP4A_LATM flag
[ffmpeg] / libavcodec / qsvenc.c
index 9710f5b4161361884e6995ee7962aab48b68d5b8..3ce5ffecd5b8d21705d84e013b6be9e0a1a25510 100644 (file)
@@ -366,7 +366,7 @@ static int check_enc_param(AVCodecContext *avctx, QSVEncContext *q)
             av_log(avctx, AV_LOG_ERROR, "Selected ratecontrol mode is unsupported\n");
         if (UNMATCH(LowPower))
               av_log(avctx, AV_LOG_ERROR, "Low power mode is unsupported\n");
-        if (UNMATCH(FrameInfo.FrameRateExtN) || UNMATCH(FrameInfo.FrameRateExtN))
+        if (UNMATCH(FrameInfo.FrameRateExtN) || UNMATCH(FrameInfo.FrameRateExtD))
               av_log(avctx, AV_LOG_ERROR, "Current frame rate is unsupported\n");
         if (UNMATCH(FrameInfo.PicStruct))
               av_log(avctx, AV_LOG_ERROR, "Current picture structure is unsupported\n");
@@ -595,6 +595,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
             if (q->recovery_point_sei >= 0)
                 q->extco.RecoveryPointSEI = q->recovery_point_sei ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
             q->extco.MaxDecFrameBuffering = q->max_dec_frame_buffering;
+            q->extco.AUDelimiter          = q->aud ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
         }
 
         q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extco;
@@ -650,6 +651,20 @@ FF_ENABLE_DEPRECATION_WARNINGS
 
             q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extco2;
         }
+#endif
+#if QSV_HAVE_MF
+        if (avctx->codec_id == AV_CODEC_ID_H264) {
+            mfxVersion    ver;
+            ret = MFXQueryVersion(q->session,&ver);
+            if (ret >= MFX_ERR_NONE && QSV_RUNTIME_VERSION_ATLEAST(ver, 1, 25)) {
+                q->extmfp.Header.BufferId     = MFX_EXTBUFF_MULTI_FRAME_PARAM;
+                q->extmfp.Header.BufferSz     = sizeof(q->extmfp);
+
+                q->extmfp.MFMode = q->mfmode;
+                av_log(avctx,AV_LOG_VERBOSE,"MFMode:%d\n", q->extmfp.MFMode);
+                q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extmfp;
+            }
+        }
 #endif
     }