From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id BD17840244 for ; Wed, 20 Jul 2022 08:41:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5A2D868B812; Wed, 20 Jul 2022 11:40:40 +0300 (EEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 61D8668B75C for ; Wed, 20 Jul 2022 11:40:33 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658306438; x=1689842438; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=6T3q/ixzmvd37cl6Wq8idExBe1EPyKa3CgsePxX190Q=; b=fNKomjWXPHPPqg1E+4QvT9cSxEylfcCAy1k1+UoTokSyCRmbUXHQ+yal 3d9nQXk+DnjbeXlov6axn+jCbZl4mh3/LE4IdHjZ0GsFFMB+19xsizxnc MuqsLgoqjyRrCuFHs5y5fzX6JqknC3jeQlMeNV6fQyalVMVByqb4idsJ4 9EG9wThutW0lTUb5O/fNebxcm6ZlJ0njgRO/ETieZI1Bp7Bsk47sW+iht WpB9YIoI3RmWF1VI+Gw/V9TVzbfMvgDU79LNDJSq5pRlIsbwWqvK7HQcM 9rixpGvi+cLVFMP7b4HfFevQSpoW9oFAeO7AiapWKCNrHMPQbFPZTgIjR w==; X-IronPort-AV: E=McAfee;i="6400,9594,10413"; a="348412499" X-IronPort-AV: E=Sophos;i="5.92,286,1650956400"; d="scan'208";a="348412499" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2022 01:40:28 -0700 X-IronPort-AV: E=Sophos;i="5.92,286,1650956400"; d="scan'208";a="625574651" Received: from xhh-dg164.sh.intel.com ([10.238.5.169]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2022 01:40:27 -0700 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 Jul 2022 16:39:57 +0800 Message-Id: <20220720084006.5033-5-haihao.xiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220720084006.5033-1-haihao.xiang@intel.com> References: <20220720084006.5033-1-haihao.xiang@intel.com> Subject: [FFmpeg-devel] [PATCH v11 04/13] qsv: load user plugin for MFX_VERSION < 2.0 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Haihao Xiang MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Haihao Xiang 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 25331ccce8..74fc8ff18e 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -19,7 +19,6 @@ */ #include -#include #include #include @@ -37,9 +36,14 @@ #include "qsv_internal.h" #define MFX_IMPL_VIA_MASK(impl) (0x0f00 & (impl)) +#define QSV_HAVE_USER_PLUGIN !QSV_ONEVPL #include "mfxvp8.h" +#if QSV_HAVE_USER_PLUGIN +#include +#endif + int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id) { switch (codec_id) { @@ -323,6 +327,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; @@ -366,6 +371,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 cb1e55ae30..949955bda0 100644 --- a/libavcodec/qsv_internal.h +++ b/libavcodec/qsv_internal.h @@ -65,6 +65,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".