[libav-devel] [PATCH] qsv: adding Multi Frame Encode support

Li, Zhong zhong.li at intel.com
Tue Mar 27 11:55:59 CEST 2018


> diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h index
> 975c8de44..516994a64 100644
> --- a/libavcodec/qsv_internal.h
> +++ b/libavcodec/qsv_internal.h
> @@ -36,6 +36,9 @@
>      (MFX_VERSION_MAJOR > (MAJOR) ||         \
>       MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >=
> (MINOR))
> 
> +#define QSV_RUNTIME_VERSION_ATLEAST(MFX_VERSION, MAJOR,
> MINOR) \
> +    (MFX_VERSION.Major == MAJOR  && MFX_VERSION.Minor >=
> MINOR)
> +

Should also be ok for "MFX_VERSION.Major > MAJOR"? Just like QSV_VERSION_ATLEAST.

>  typedef struct QSVMid {
>      AVBufferRef *hw_frames_ref;
>      mfxHDL handle;
> diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index
> f31172de2..b45216291 100644
> --- a/libavcodec/qsvdec.c
> +++ b/libavcodec/qsvdec.c
> @@ -332,7 +332,6 @@ static int qsv_decode(AVCodecContext *avctx,
> QSVContext *q,
>              av_freep(&sync);
>              return ret;
>          }
> -
>          ret = MFXVideoDECODE_DecodeFrameAsync(q->session,
> avpkt->size ? &bs : NULL,
>                                                insurf, &outsurf,
> sync);
>          if (ret == MFX_WRN_DEVICE_BUSY) diff --git
> a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index f6b1a0d67..a8b446c5b
> 100644
> --- a/libavcodec/qsvenc.c
> +++ b/libavcodec/qsvenc.c
> @@ -135,7 +135,7 @@ static void dump_video_param(AVCodecContext
> *avctx, QSVEncContext *q,  #if QSV_HAVE_CO2
>      mfxExtCodingOption2 *co2 = (mfxExtCodingOption2*)coding_opts[1];
>  #endif
> -#if QSV_HAVE_CO3
> +#if QSV_HAVE_CO3 && QSV_HAVE_QVBR
>      mfxExtCodingOption3 *co3 = (mfxExtCodingOption3*)coding_opts[2];
>  #endif
> 

Not sure why we need this change and how it impacts MFE. 


More information about the libav-devel mailing list