From patchwork Mon Jan 9 07:12:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 39933 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bc95:b0:ad:ade2:bfd2 with SMTP id fx21csp2884279pzb; Sun, 8 Jan 2023 23:13:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXuil3pVBUme6aNXiPjwCo6bF/KVgs4mVLz+OytpOb4bqnVJSQBl116oVs0ajeiANywyXxA5 X-Received: by 2002:a05:6402:299b:b0:480:cbe7:9ee2 with SMTP id eq27-20020a056402299b00b00480cbe79ee2mr53442925edb.22.1673248398933; Sun, 08 Jan 2023 23:13:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673248398; cv=none; d=google.com; s=arc-20160816; b=e56PzSWnqIBIEsVCFxaKyo+qVJR1vpneQOH/H/0RytPNN9Hg2tyEacFUFEiLipN0h7 /O6DLDd3b2xbuNg9j43vknlen4C3EDRlNsPIyH3HJsRch0D7v7X+RaBnpkCPNiiWnVeE AMsB/zm1S3c5dEsjTt5axmpnwVQVNFgzJlvs5+q06TA5ai+Md+SkAqtGSuCHhJ7atavK pt8XHgBkNamxSyB6USMUkDRC5IF7ZBiFPR/FeME/sAcujo/RGwUaZ6dtV8OEDNAwcUdj kEA0U2HADtMjaQMFx67xIZVsIpcjDblxVetOM6uiNjsVsMWGpIrYshJveH4QP3KmgXzc bF0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=chBYlCR/Ig9/hShHMX0QZCMo1lBoDfCaDsykPK87mjA=; b=sSGKJMgvprIyjzNS8pUk7LiUx0TNHjhp+qLi8Bceyur7byhrVET1H0qRimBvta8fpr BTVxDWCOD2/GvciG419WaJyW+4aTMIO3RXc//Ra034E3Eu04Ot+GAvsqkYa6I2+TFHVw f07gn+L7ZVhCywa6wolouwrO4YiMZIQFWw+cSdF75roJK0pmFJChmw+V/RmwnIwuynby AQDewxrMIW5MoYotE6/psMFt2DFHE+JHdPQfPUq4ZgOGjDHujjLY3XAmDEHHvWiKFVPD mnEdtnU3LsIxQ1qKXCWC4v00pcQPV64QgnR7A4JB0mq+GHNhSS5EQLvzwSYqHoB1IPOZ zQkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=V+V4jmzZ; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h15-20020a0564020e0f00b0049822232df5si5830722edh.526.2023.01.08.23.13.18; Sun, 08 Jan 2023 23:13:18 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=V+V4jmzZ; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 21D2568BC18; Mon, 9 Jan 2023 09:12:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B3CB368BBDA for ; Mon, 9 Jan 2023 09:12:37 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673248362; x=1704784362; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kldueCzl+BJtLZU2OzbXb2x42uyD+oOplEFsVI5hVpc=; b=V+V4jmzZwHGiOAh4EcDOAZuBq01oh9RUf1zCvk2UlhVrqiiBTEGSTvuJ bMllvcxhUi9dXyn0KvolpZTOp679x4PdemcNgSQkTtNMLx0I0OthK15ig SzDPbhSYHAmn9lGlMfu+VnLB04S8U6th4yVtCdxhR7Jd+zZNMEDZDlguW Mh/DGQUrRrtt4JIzBcetez0FaSIfPsfSPPK5rWrioJTcu3wFz4h9mx/Bs qa0eKNNu35AInCTrYF/Cy9MuQVSsnpf4BRk6Y33dnhoiq0l4N/ULKFIjz vhkwhaXGC2PAE92TbekBeCqaKh5LHnCo1Z2yTbd2S1nykmDXozdlOXaAt w==; X-IronPort-AV: E=McAfee;i="6500,9779,10584"; a="385110844" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="385110844" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jan 2023 23:12:31 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10584"; a="745262807" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="745262807" Received: from xhh-tgl64.sh.intel.com ([10.238.2.19]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jan 2023 23:12:30 -0800 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Mon, 9 Jan 2023 15:12:07 +0800 Message-Id: <20230109071210.1829699-5-haihao.xiang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230109071210.1829699-1-haihao.xiang@intel.com> References: <20230109071210.1829699-1-haihao.xiang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/8] lavfi/vf_vpp_qsv: add has_passthrough flag in VPPContext 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: WtKYEo2Sp1ga From: Haihao Xiang QSV filters may set this flag in preinit callback to turn on / off pass through mode This is in preparation for reusing the code for other QSV filters. E.g. scale_qsv filter doesn't support pass through mode. Signed-off-by: Haihao Xiang --- libavfilter/vf_vpp_qsv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 2a7b06fa33..b04307b644 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -102,6 +102,7 @@ typedef struct VPPContext{ int async_depth; int eof; + int has_passthrough; /* apply pass through mode if possible */ } VPPContext; static const AVOption options[] = { @@ -269,6 +270,8 @@ static av_cold int vpp_preinit(AVFilterContext *ctx) vpp->contrast = 1.0; vpp->transpose = -1; + vpp->has_passthrough = 1; + return 0; } @@ -552,7 +555,8 @@ static int config_output(AVFilterLink *outlink) if (vpp->use_frc || vpp->use_crop || vpp->deinterlace || vpp->denoise || vpp->detail || vpp->procamp || vpp->rotate || vpp->hflip || - inlink->w != outlink->w || inlink->h != outlink->h || in_format != vpp->out_format) + inlink->w != outlink->w || inlink->h != outlink->h || in_format != vpp->out_format || + !vpp->has_passthrough) return ff_qsvvpp_create(ctx, &vpp->qsv, ¶m); else { av_log(ctx, AV_LOG_VERBOSE, "qsv vpp pass through mode.\n");