From patchwork Fri Aug 21 05:23:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 21781 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 2A2BF44A228 for ; Fri, 21 Aug 2020 08:23:53 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F22DE68AE82; Fri, 21 Aug 2020 08:23:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8F27A68A9BB for ; Fri, 21 Aug 2020 08:23:45 +0300 (EEST) IronPort-SDR: Fah8HhObkhCLCmshulWcNMZrGsSnOUHyK5pbueGuhgXDAfxSxgiOEQic7pCt2A1QHq8Zg5EI4b Xz7W1MUBQsQg== X-IronPort-AV: E=McAfee;i="6000,8403,9719"; a="156517369" X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="156517369" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2020 22:23:42 -0700 IronPort-SDR: 7VTeeAR9y2GmlDVxw59rLgBAovj2cHSH128F+U5n52IoxhUNEU/ncBl5dDHwTFhemBIOq73obX WvT4XDwmsTGA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="442235099" Received: from xhh-tgl64.sh.intel.com ([10.239.159.152]) by orsmga004.jf.intel.com with ESMTP; 20 Aug 2020 22:23:41 -0700 From: Haihao Xiang To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Aug 2020 13:23:00 +0800 Message-Id: <20200821052301.1864733-1-haihao.xiang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200819061023.443304-1-haihao.xiang@intel.com> References: <20200819061023.443304-1-haihao.xiang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/2] qsv: needn't load user plugin since libmfx 1.28 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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 -#include #include #include @@ -36,6 +35,10 @@ #include "avcodec.h" #include "qsv_internal.h" +#if !QSV_VERSION_ATLEAST(1, 28) +#include +#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 }