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 2755040F15 for ; Tue, 12 Jul 2022 06:28:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1A22768B7EB; Tue, 12 Jul 2022 09:28:41 +0300 (EEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ADC9468B7E8 for ; Tue, 12 Jul 2022 09:28: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=1657607319; x=1689143319; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=6T3q/ixzmvd37cl6Wq8idExBe1EPyKa3CgsePxX190Q=; b=GfYAYSEC4946LxwOAjAq3ETEfbroPl6kruZrk1qYIHzS3PpfQezhZoef L9cmCsx09SnNvUVzWoMq4XGjMu6ge39MSieN86XVOsdiiol6J78ioYvl5 9nene1XPBYB26r8paIZ0ya/CtTBWIU+KgUQS/wmZFSNmR/42klME+2Gpf c5x6WTANfhmqX/BR51vCbzqZ6uQn5jTCvE6iyaDbJwvOJXB+SrUr/8wUR jf0fIKx81MXEkHpsUcj8CVrv5xvsE+bQEhId42mXTcwO+x9T3niRjQSM2 GaSwmLsWiXUUWU3wUiWb73nG+KysKTlFLY09J1x4bFQQU19f6Yt0j6elc w==; X-IronPort-AV: E=McAfee;i="6400,9594,10405"; a="346534434" X-IronPort-AV: E=Sophos;i="5.92,265,1650956400"; d="scan'208";a="346534434" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 23:28:12 -0700 X-IronPort-AV: E=Sophos;i="5.92,265,1650956400"; d="scan'208";a="622381993" Received: from xhh-dg164.sh.intel.com ([10.239.159.146]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 23:28:11 -0700 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Jul 2022 14:27:26 +0800 Message-Id: <20220712062735.20339-5-haihao.xiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220712062735.20339-1-haihao.xiang@intel.com> References: <20220712062735.20339-1-haihao.xiang@intel.com> Subject: [FFmpeg-devel] [PATCH v10 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".