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 D0BD24516F for ; Mon, 12 Jun 2023 08:16:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 63C0068C3BB; Mon, 12 Jun 2023 11:15:53 +0300 (EEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A3B8368C39E for ; Mon, 12 Jun 2023 11:15:45 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686557750; x=1718093750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=V3iA/MYZ8SmrMif6SIVlpBZfitswtQrGT2wld9zLjK0=; b=I2kHhH/lcYefKzS2OoJRcqip4JEZ9/1UdEmDcCwmZc1oKtwCAAcBaNLf 09nK36Ij25mbKc/ilkN7l99ZX58hqja+n/FuY7zm033JxWcuI2jh7W0wL 2RbeW2brXKoyGG+rB54tPu+d0VGF4C9C6G63CuXRDU1xHAQuBA/DUXlhZ NeZI/AcYHA67yu0sxQRqiUw0O6XrWTlW+4rQigB1DuTA421okwDHpApY6 2TwloNrks6AUKBPPtRXve9skkAFmI6JQJ/lUqbbPRbP8KwrcrJQfrE2or zx6JCVef4o0VV3DBND/z+rKRad69mtIK+xmczdHSQ7jEDZapQqvaKfSyG Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10738"; a="386360232" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="386360232" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2023 01:15:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10738"; a="711111616" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="711111616" Received: from xhh-tgl64.sh.intel.com ([10.238.2.19]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2023 01:15:42 -0700 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Mon, 12 Jun 2023 16:14:45 +0800 Message-Id: <20230612081448.936570-3-haihao.xiang@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230612081448.936570-1-haihao.xiang@intel.com> References: <20230612081448.936570-1-haihao.xiang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/6] lavfi/qsvvpp: check the parameters before initializing vpp session 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 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 According to the description about MFXVideoVPP_Query [1], we may call MFXVideoVPP_Query to check the validity of the parameters for vpp session, use the corrected values to initialize the session. [1] https://spec.oneapi.io/versions/latest/elements/oneVPL/source/API_ref/VPL_func_vid_vpp.html#mfxvideovpp-query Signed-off-by: Haihao Xiang --- libavfilter/qsvvpp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index 61402c8e0a..8683a4f217 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.c @@ -823,6 +823,14 @@ int ff_qsvvpp_init(AVFilterContext *avctx, QSVVPPParam *param) ff_qsvvpp_print_iopattern(avctx, s->vpp_param.IOPattern & 0x0F, "VPP"); /* Print output memory mode */ ff_qsvvpp_print_iopattern(avctx, s->vpp_param.IOPattern & 0xF0, "VPP"); + + ret = MFXVideoVPP_Query(s->session, &s->vpp_param, &s->vpp_param); + if (ret < 0) { + ret = ff_qsvvpp_print_error(avctx, ret, "Error querying VPP params"); + goto failed; + } else if (ret > 0) + ff_qsvvpp_print_warning(avctx, ret, "Warning When querying VPP params"); + ret = MFXVideoVPP_Init(s->session, &s->vpp_param); if (ret < 0) { ret = ff_qsvvpp_print_error(avctx, ret, "Failed to create a qsvvpp"); -- 2.34.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".