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

Maxym Dmytrychenko maxim.d33 at gmail.com
Wed Mar 28 00:11:57 CEST 2018


On Tue, Mar 27, 2018 at 11:55 AM, Li, Zhong <zhong.li at intel.com> wrote:

> > 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.
>
> good point to be fixed!
thanks

>  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.
>
see co3 used only when  QSV_HAVE_QVBR - so it is logical and fixes
compilation issue.

_______________________________________________
> libav-devel mailing list
> libav-devel at libav.org
> https://lists.libav.org/mailman/listinfo/libav-devel


More information about the libav-devel mailing list