Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Xiang, Haihao" <haihao.xiang-at-intel.com@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Haihao Xiang <haihao.xiang@intel.com>
Subject: [FFmpeg-devel] [PATCH v7 04/10] qsv: load user plugin for MFX_VERSION < 2.0
Date: Fri, 11 Mar 2022 16:16:24 +0800
Message-ID: <20220311081630.21927-5-haihao.xiang@intel.com> (raw)
In-Reply-To: <20220311081630.21927-1-haihao.xiang@intel.com>

From: Haihao Xiang <haihao.xiang@intel.com>

User plugin isn't supported for MFX_VERSION >= 2.0[1][2]. This is in
preparation for oneVPL Support

[1]: https://spec.oneapi.io/versions/latest/elements/oneVPL/source/VPL_intel_media_sdk.html#msdk-full-name-feature-removals
[2]: https://github.com/oneapi-src/oneVPL
---
 libavcodec/qsv.c          | 8 +++++++-
 libavcodec/qsv_internal.h | 2 ++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index f749e77d3a..0eb0d83ac0 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -19,7 +19,6 @@
  */
 
 #include <mfxvideo.h>
-#include <mfxplugin.h>
 #include <mfxjpeg.h>
 
 #include <stdio.h>
@@ -37,11 +36,16 @@
 #include "qsv_internal.h"
 
 #define MFX_IMPL_VIA_MASK(impl) (0x0f00 & (impl))
+#define QSV_HAVE_USER_PLUGIN    !QSV_ONEVPL
 
 #if QSV_VERSION_ATLEAST(1, 12)
 #include "mfxvp8.h"
 #endif
 
+#if QSV_HAVE_USER_PLUGIN
+#include <mfxplugin.h>
+#endif
+
 int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id)
 {
     switch (codec_id) {
@@ -307,6 +311,7 @@ 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_HAVE_USER_PLUGIN
     if (!load_plugins || !*load_plugins)
         return 0;
 
@@ -350,6 +355,7 @@ load_plugin_fail:
         if (err < 0)
             return err;
     }
+#endif
 
     return 0;
 
diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h
index 09fc76f6c4..6d6a6eb239 100644
--- a/libavcodec/qsv_internal.h
+++ b/libavcodec/qsv_internal.h
@@ -62,6 +62,8 @@
     ((MFX_VERSION.Major > (MAJOR)) ||                           \
     (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR)))
 
+#define QSV_ONEVPL       QSV_VERSION_ATLEAST(2, 0)
+
 typedef struct QSVMid {
     AVBufferRef *hw_frames_ref;
     mfxHDLPair *handle_pair;
-- 
2.17.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2022-03-11  8:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11  8:16 [FFmpeg-devel] [PATCH v7 00/10] make QSV works with the Intel's oneVPL Xiang, Haihao
2022-03-11  8:16 ` [FFmpeg-devel] [PATCH v7 01/10] configure: ensure --enable-libmfx uses libmfx 1.x Xiang, Haihao
2022-03-11  8:16 ` [FFmpeg-devel] [PATCH v7 02/10] configure: fix the check for MFX_CODEC_VP9 Xiang, Haihao
2022-03-11  8:16 ` [FFmpeg-devel] [PATCH v7 03/10] qsv: remove mfx/ prefix from mfx headers Xiang, Haihao
2022-03-11  8:16 ` Xiang, Haihao [this message]
2022-03-11  8:16 ` [FFmpeg-devel] [PATCH v7 05/10] qsv: build audio related code when MFX_VERSION < 2.0 Xiang, Haihao
2022-04-05 11:50   ` Anton Khirnov
2022-04-06  3:38     ` Xiang, Haihao
2022-04-30 16:51       ` Soft Works
2022-05-01  2:16         ` Xiang, Haihao
2022-05-01  3:10           ` Soft Works
2022-05-01  4:51             ` Xiang, Haihao
2022-05-01  5:13               ` Soft Works
2022-05-31  8:58                 ` Xiang, Haihao
2022-03-11  8:16 ` [FFmpeg-devel] [PATCH v7 06/10] qsvenc: support multi-frame encode " Xiang, Haihao
2022-03-11  8:16 ` [FFmpeg-devel] [PATCH v7 07/10] qsvenc: support MFX_RATECONTROL_LA_EXT " Xiang, Haihao
2022-03-11  8:16 ` [FFmpeg-devel] [PATCH v7 08/10] qsv: support OPAQUE memory " Xiang, Haihao
2022-03-11  8:16 ` [FFmpeg-devel] [PATCH v7 09/10] qsv: use a new method to create mfx session when using oneVPL Xiang, Haihao
2022-03-11  8:35   ` Hendrik Leppkes
2022-03-11 13:43     ` Xiang, Haihao
2022-03-11 14:00       ` Hendrik Leppkes
2022-03-15  7:24         ` Xiang, Haihao
2022-04-04  9:46           ` Hendrik Leppkes
2022-04-06  3:58             ` Xiang, Haihao
2022-04-28  9:31               ` Xiang, Haihao
2022-03-11  8:16 ` [FFmpeg-devel] [PATCH v7 10/10] configure: add --enable-libvpl option Xiang, Haihao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220311081630.21927-5-haihao.xiang@intel.com \
    --to=haihao.xiang-at-intel.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=haihao.xiang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git