[FFmpeg-devel] [PATCH v2 1/2] qsv: needn't load user plugin since libmfx 1.28
Xiang, Haihao
haihao.xiang at intel.com
Mon Aug 24 09:31:36 EEST 2020
On Fri, 2020-08-21 at 09:36 +0200, Max Dmitrichenko wrote:
> On Fri, Aug 21, 2020 at 9:29 AM Xiang, Haihao <haihao.xiang at intel.com>
> wrote:
>
> > On Fri, 2020-08-21 at 05:48 +0000, Soft Works wrote:
> > > > -----Original Message-----
> > > > From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> > > > Haihao Xiang
> > > > Sent: Friday, August 21, 2020 7:23 AM
> > > > To: ffmpeg-devel at ffmpeg.org
> > > > Cc: Haihao Xiang <haihao.xiang at intel.com>
> > > > Subject: [FFmpeg-devel] [PATCH v2 1/2] qsv: needn't load user plugin
> >
> > since
> > > > libmfx 1.28
> > > >
> > > > MFXVideoUSER_Load call is redundant since libmfx 1.28
> > > > ---
> > > > Fixed merge conflict when applying this patch by 'git am'
> > > >
> > > > libavcodec/qsv.c | 9 ++++++++-
> > > > 1 file changed, 8 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index
> > > > 17720070f1..56a30ad642 100644
> > > > --- a/libavcodec/qsv.c
> > > > +++ b/libavcodec/qsv.c
> > > > @@ -19,7 +19,6 @@
> > > > */
> > > >
> > > > #include <mfx/mfxvideo.h>
> > > > -#include <mfx/mfxplugin.h>
> > > > #include <mfx/mfxjpeg.h>
> > > >
> > > > #include <stdio.h>
> > > > @@ -36,6 +35,10 @@
> > > > #include "avcodec.h"
> > > > #include "qsv_internal.h"
> > > >
> > > > +#if !QSV_VERSION_ATLEAST(1, 28)
> > > > +#include <mfx/mfxplugin.h>
> > > > +#endif
> > > > +
> > > > #if QSV_VERSION_ATLEAST(1, 12)
> > > > #include "mfx/mfxvp8.h"
> > > > #endif
> > > > @@ -295,6 +298,9 @@ enum AVPictureType ff_qsv_map_pictype(int
> > > > mfx_pic_type) static int qsv_load_plugins(mfxSession session, const
> >
> > char
> > > > *load_plugins,
> > > > void *logctx) {
> > > > +#if QSV_VERSION_ATLEAST(1, 28)
> > > > + return 0;
> > > > +#else
> > > > if (!load_plugins || !*load_plugins)
> > > > return 0;
> > > >
> > > > @@ -340,6 +346,7 @@ load_plugin_fail:
> > > > }
> > > >
> > > > return 0;
> > > > +#endif
> > > >
> > > > }
> > >
> > >
> > > Hi,
> > >
> > > Are you sure this check is right? You are checking the libmfx version
> > > against which ffmpeg is compiled.
> > >
> > > What happens, when a graphics driver supports only API level 1.21?
> > >
> >
> > I understand your concern, however lots of features in FFmpeg are
> > disabled/enabled against api version at compile-time.
> >
> >
>
> have you checked if runtime checks with QSV_RUNTIME_VERSION_ATLEAST can be
> avoided?
Thanks for your comment, it works with version check at runtime. However my
original thought was to make sure the compilation is not broken when plugins are
removed from the SDK.
Regards
Haihao
>
> regards
> Max
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list