From patchwork Fri Nov 19 13:52:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 31498 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2412938iob; Fri, 19 Nov 2021 05:53:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/CozTKIfk33YsItbEZtHW/kdRP7u5Gas/m19SjF/4daqcB0gP9yDh5HP4JKm6x9EdOQTB X-Received: by 2002:a17:907:97c3:: with SMTP id js3mr8301235ejc.240.1637329985270; Fri, 19 Nov 2021 05:53:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637329985; cv=none; d=google.com; s=arc-20160816; b=HYeOkki6a6iy42ZILRDHFSYnESVJMVcicdVrA0i/HvrkA7yAbaZlrTLrhIf361qaDI LXCzN083ZKvEvVfha8AUzP/r6UJboNV371WyPQ6mwrGGpbfbfuavGS1XTaSihG4CC8mv OCStM8Uxz/A3Mn/5zHz/ZzGIPPiuxbJkJgZr2kwkJ6IsrTt3krXp3NUfIF2mVlCDGwt/ 1U6j4Ywuojc1mVxFpQhy/KgJYWsAxws3/yrHWwI5wtjlmgFwaICwQGgsH6Z0HBGWh7rk GeZPzhUxyO/9IiOhrZP3WODM+WWZ+0ETiqNzci9F01VAzS8LgsKEPvt+U64ygyGQl+UR SqUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to; bh=fTwErZV3M0r9LDedcRYbh6KFEuO9n0k1Y0RawbTm8UU=; b=AxDZ4FbAKI0FlpySmhbihkJo9UleGUtUMroOhLWHxWZCqPpyTbQ4WrdEhJARfLhS/Q oe/epmANpvbNjbdR0Cp3t2FRVIzFHbs1DVQkI4/5oxsTSNdvKkgb/cz96Sccgmulc77K r2MZv7eqLsbsPan6Mgy0SKGFD0DjomSBlemCHm/zrxDO7RW+VhhMIIZkydah6wFdSdUX X4gVvHMGJyFrh08QxmxNrUedgydWWU+VuVq7Cc0RdgU1YFlWxaKoK5kSjwmfd4S0i5n6 uAVySHv2PzqwG8csiEwOnd9CvuRiYNsVRydG5ATvrGspXOlI4BQulM05i2VV+Sn3oYuh dKSg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dm18si9887710ejc.250.2021.11.19.05.53.04; Fri, 19 Nov 2021 05:53:05 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 93C8468A6E7; Fri, 19 Nov 2021 15:53:02 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E1997680500 for ; Fri, 19 Nov 2021 15:52:55 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="231896448" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="231896448" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 05:52:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="507905937" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2021 05:52:52 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 21:52:38 +0800 Message-Id: <20211119135248.14518-1-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH 01/11] avfilter/avgblur_vulkan: check if shader is created with success 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: DY08e3/ZGjSd Signed-off-by: Wu Jianhua --- libavfilter/vf_avgblur_vulkan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c index d37d5a62b1..93b59ebb7d 100644 --- a/libavfilter/vf_avgblur_vulkan.c +++ b/libavfilter/vf_avgblur_vulkan.c @@ -111,6 +111,8 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in) shd = ff_vk_init_shader(s->pl_hor, "avgblur_compute_hor", VK_SHADER_STAGE_COMPUTE_BIT); + if (!shd) + return AVERROR(ENOMEM); ff_vk_set_compute_shader_sizes(shd, (int [3]){ CGS, 1, 1 }); @@ -154,6 +156,8 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in) shd = ff_vk_init_shader(s->pl_ver, "avgblur_compute_ver", VK_SHADER_STAGE_COMPUTE_BIT); + if (!shd) + return AVERROR(ENOMEM); ff_vk_set_compute_shader_sizes(shd, (int [3]){ 1, CGS, 1 }); From patchwork Fri Nov 19 13:52:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 31493 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2413132iob; Fri, 19 Nov 2021 05:53:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxd49l2Cz95hiGWwzK4B+kf2rEmYD8dkTsPVHOdeK+zVIJxNWKv5/MHASQNS1LvS7yMevyx X-Received: by 2002:a17:906:9b96:: with SMTP id dd22mr7978780ejc.422.1637329994722; Fri, 19 Nov 2021 05:53:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637329994; cv=none; d=google.com; s=arc-20160816; b=Uj5fshBXO2UgIdBR+Usd4wn0bbYIWOuU0f5JfNz4NMTY/9G+9nmCdTh///A/AqBKsL 2fmdEiEw2nzbqm4IUviKmdZhNScxYXn7nISgEyJj/iImrwh5DtF7Okdp8lZrROryaFy6 vti5yQzTXjAPP3Va6N6JwcqavhwQQOFzF/OAWEBeA/gDxZaQI8I7qg99G73M7SNwLEue dXNfBpka+RH/t+OFWY48CK5lEG6+fKkLxrt6RHkb+gTBrLTtXcF8uG97t5/IqLAP7kEJ Gw9SMb/pMLUF/6trRrF3SIBB26NvWGh/tBCoY++3nmtKMDTCZE/zzNs9whdHOrI8/BY9 Id5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=tMOwRYJd1fmAYeKJWhcKSrEY35LCjCGp7GmG11ApNsI=; b=ispkQGnsigBFW322aXrsVzM+xJewK8bsrhmP+VQaUgFl29HhdaeUhM4WLriKc7OhSK UGRr8UyJKTj0IMt+yp5oeUWVNXKKtmXx1fZ3drJHgnO9Nrq5a1Ex4aH25HqZqiey4k0C En6IdA/eIjf3MWcNyD8QFhwV5AgAJD1rAsh5n06pwc42t/OJxYNrgFet7rBVyC7bZjIm st+a3s4OxJnbP23G9vXQALfNRq4Ncm+5vkU/K3H+K4F6/S2QTQrbEmx84TrI46Ad4kpN ve/5BeOepCos5zMVqNicRg4BISrQArLW8tJrSC6+kYiiBbRdnI/IiKGHoFvyJpvQL2gH 7mww== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ht12si8321129ejc.207.2021.11.19.05.53.14; Fri, 19 Nov 2021 05:53:14 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B424968A750; Fri, 19 Nov 2021 15:53:04 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F22C468A1C3 for ; Fri, 19 Nov 2021 15:52:57 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="231896449" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="231896449" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 05:52:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="507905944" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2021 05:52:54 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 21:52:39 +0800 Message-Id: <20211119135248.14518-2-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211119135248.14518-1-jianhua.wu@intel.com> References: <20211119135248.14518-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 02/11] avfilter/avgblur_vulkan: use FF_ARRAY_ELEMS instead of magic number 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Z89E6vuQuJ8g Signed-off-by: Wu Jianhua --- libavfilter/vf_avgblur_vulkan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c index 93b59ebb7d..c733670764 100644 --- a/libavfilter/vf_avgblur_vulkan.c +++ b/libavfilter/vf_avgblur_vulkan.c @@ -116,7 +116,7 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in) ff_vk_set_compute_shader_sizes(shd, (int [3]){ CGS, 1, 1 }); - RET(ff_vk_add_descriptor_set(vkctx, s->pl_hor, shd, desc_i, 2, 0)); + RET(ff_vk_add_descriptor_set(vkctx, s->pl_hor, shd, desc_i, FF_ARRAY_ELEMS(desc_i), 0)); GLSLF(0, #define FILTER_RADIUS (%i) ,s->size_x - 1); GLSLC(0, #define INC(x) (ivec2(x, 0)) ); @@ -161,7 +161,7 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in) ff_vk_set_compute_shader_sizes(shd, (int [3]){ 1, CGS, 1 }); - RET(ff_vk_add_descriptor_set(vkctx, s->pl_ver, shd, desc_i, 2, 0)); + RET(ff_vk_add_descriptor_set(vkctx, s->pl_ver, shd, desc_i, FF_ARRAY_ELEMS(desc_i), 0)); GLSLF(0, #define FILTER_RADIUS (%i) ,s->size_y - 1); GLSLC(0, #define INC(x) (ivec2(0, x)) ); From patchwork Fri Nov 19 13:52:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 31497 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2413341iob; Fri, 19 Nov 2021 05:53:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJIc1XG//p8V0+nIO9PCUnlSfdevwr03yYbSBZVTQlpHTgiAmNhJoiUREqDiqMOAQWpdH7 X-Received: by 2002:a17:907:2d21:: with SMTP id gs33mr7984171ejc.549.1637330005272; Fri, 19 Nov 2021 05:53:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637330005; cv=none; d=google.com; s=arc-20160816; b=rKI+GrtxYJ/kPAqB1n2+CBdPEVR08nV13iit1tEs29AAliXTpKZZin1cTxyLqQkNHb 0oJVQLfiTYq3YTWaKqRLe7BjBFkGJ7XxCm/prZ7GzfI2CCyQ2HDNkBbZt70zjFTSrKEN DV0lQRZFoTj70aCSjSWZbtxE/ST8G/a1ZFv+hA1jdrfQNVqqpJlgn+ghMT/L4c1VnQhR 1IEq7yh9aVKNqoVOpz7Iyj/iqsPp8ZK1t00NoYuY9em4dQXsoASmBCakI8nUi6oEeyHO 3Up/X7x2dc464+fYUiZbMkuMtU+u7M1U5+U4/9YnUBapcjmLEXefwrBpJbK/ZJOM5UsS IQmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=UbveuTt+SZWNtOQrizfJX7GKMW0hkG1GwRIvZlxJ1yc=; b=uHyRMQY22gmvb6YAs+ZVuJwBg0obhavvH5R8GB6BdHZ7gxVHSB5D3DBIwaCramlw2n gMtANtsQeoMeN5OmPUGvKimZedkSBOxP+56iQmJcAoh3SlvTOlfmBUAvE9M++vgqt8OY trqyX2A8FIX3ps8ewilbu3hqz6BrDnmYeevuT4ZtRuGq9gc5+yXuPG8Zx5oS74Gd1eUG b4ZUKuCO8mLTielyGookh7pyXmVhUy3B6JteFtTqVvmueokWIJm25VITJHanP+2RLVju 8TRA00ZvVvee9Ev2zG2VkKZ9L+8ePzGmBrwGabdaO/DyGrc+qQ3Qh/cQQGT8bo+yCEXi 9ioA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id e2si9836522ejs.60.2021.11.19.05.53.24; Fri, 19 Nov 2021 05:53:25 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D516168A5C2; Fri, 19 Nov 2021 15:53:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7964E68A74F for ; Fri, 19 Nov 2021 15:52:59 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="231896452" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="231896452" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 05:52:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="507905952" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2021 05:52:55 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 21:52:40 +0800 Message-Id: <20211119135248.14518-3-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211119135248.14518-1-jianhua.wu@intel.com> References: <20211119135248.14518-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 03/11] avfilter/chromaber_vulkan: use FF_ARRAY_ELEMS instead of magic number 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: SiLR5CiSndyu Signed-off-by: Wu Jianhua --- libavfilter/vf_chromaber_vulkan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_chromaber_vulkan.c b/libavfilter/vf_chromaber_vulkan.c index 86a66454a4..eff6554960 100644 --- a/libavfilter/vf_chromaber_vulkan.c +++ b/libavfilter/vf_chromaber_vulkan.c @@ -126,7 +126,7 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in) ff_vk_add_push_constant(s->pl, 0, sizeof(s->opts), VK_SHADER_STAGE_COMPUTE_BIT); - RET(ff_vk_add_descriptor_set(vkctx, s->pl, shd, desc_i, 2, 0)); /* set 0 */ + RET(ff_vk_add_descriptor_set(vkctx, s->pl, shd, desc_i, FF_ARRAY_ELEMS(desc_i), 0)); /* set 0 */ GLSLD( distort_chroma_kernel ); GLSLC(0, void main() ); From patchwork Fri Nov 19 13:52:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 31495 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2413499iob; Fri, 19 Nov 2021 05:53:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqip9ty0EYRqkt7+nEsJwHEjIvitNNX7AZvVrYnryW/MFjzB/rwHC0uTN0FybLCKlxf497 X-Received: by 2002:a17:907:6ea8:: with SMTP id sh40mr7960667ejc.53.1637330016358; Fri, 19 Nov 2021 05:53:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637330016; cv=none; d=google.com; s=arc-20160816; b=Sp5c9G6+gU/jr4VF2MJyaZaXsZ96AtbHWRkzKkwjCE1LCZJga01ououfA/4kk/5P63 i5ISC0RH0YxFl34r9j2HCGVCFe1fSF5zMYxeLowsRLjMTgTvxxfF0bdXqTEdf9uVGG8m 9oQtG8dmunuMNIXKdcZ6C5GwwEM5k+MOPgHlcD/bMliJBSp5UEZoOaj6i+ClYLjqKkUZ PriGTgXN4S9p1Y3EtSwqqpL/xfsWJL1EPOKZ/2peXe1bwTiiSzWTSzlx/s9p0Zm4Qr/R OigNZFw5xxURCIpfdraHH44daAZ1ENF4VTzgLdW4ywvAtvIa/1YfBrNgxmSYCcKb5PZD 2Uog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=MMboUGcsuifqTm64X7fs9PIEYJRXwsMLqULhM/Vd6eY=; b=rOeu6dEs884k1VOE+CfXuIm5JzFm6cqkSlrVIJ53WpmgSq+eUm11aGM/6Jfz+k877U lvkBUuKeUPqx20HipLSgZSPv2XAXCBCjQSAnBfZ4vvwBc450QmQxwW+/fvTwi6XYZObf KXQkpnSgTQkc+4GJzTd4y8fg/KcqJcRDep1VQlmE9dHeb7patQAe6TYnOjD6csOs22Sy 63WvyIp0QsJmJHjcNNmTrLxs/Jktr5Ct0XRqqPZ8YLvpnhoEfKD82g92nRCEec9ta+Nt spZ6F3DNDumrgW9+4dCxJEO581jMSUuPJ4pT4p+T5uLoC3T9CCqOSaF58/k8z08f9quT 3sSw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q25si6745309edc.125.2021.11.19.05.53.36; Fri, 19 Nov 2021 05:53:36 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0C3C068A785; Fri, 19 Nov 2021 15:53:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E72DF68A842 for ; Fri, 19 Nov 2021 15:53:01 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="231896456" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="231896456" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 05:52:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="507905970" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2021 05:52:56 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 21:52:41 +0800 Message-Id: <20211119135248.14518-4-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211119135248.14518-1-jianhua.wu@intel.com> References: <20211119135248.14518-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 04/11] avfilter/scale_vulkan: use FF_ARRAY_ELEMS instead of magic number 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: wO9rYfk1jp59 Signed-off-by: Wu Jianhua --- libavfilter/vf_scale_vulkan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_scale_vulkan.c b/libavfilter/vf_scale_vulkan.c index c2f6fe85e2..ff67c80e33 100644 --- a/libavfilter/vf_scale_vulkan.c +++ b/libavfilter/vf_scale_vulkan.c @@ -179,7 +179,7 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in) ff_vk_set_compute_shader_sizes(shd, CGROUPS); - RET(ff_vk_add_descriptor_set(vkctx, s->pl, shd, desc_i, 2, 0)); /* set 0 */ + RET(ff_vk_add_descriptor_set(vkctx, s->pl, shd, desc_i, FF_ARRAY_ELEMS(desc_i), 0)); /* set 0 */ RET(ff_vk_add_descriptor_set(vkctx, s->pl, shd, &desc_b, 1, 0)); /* set 1 */ GLSLD( scale_bilinear ); From patchwork Fri Nov 19 13:52:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 31489 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2413676iob; Fri, 19 Nov 2021 05:53:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwIaEx/J4kS2JHlYeOZ+NeoHAWzLVWbPjLooVK8M3+D8HzypI0byxijqM5SEgzNNtv3Zx3L X-Received: by 2002:a17:907:ea0:: with SMTP id ho32mr7881168ejc.191.1637330028356; Fri, 19 Nov 2021 05:53:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637330028; cv=none; d=google.com; s=arc-20160816; b=MwmWoSSCENLs6rqhciAKTQD+R8RSuNKx82aY2XgeRup4xTuXUOOTC4xB2wZ1nkka0l ncLhBXnVZOAatVfB+t/69OfhlplVAa/iUpUe7BLQtCj9NG1lmrYNM1sCIqueVAOkk+lN G3YptB+S9P1t8g3W3z8xxUCKHC1aEt8/iUF0Fv6YlymGUL7MZeyuGrUbRW8uYSoWLtZy V/ZsztqwJY9PRfvItw0xm02AUQjv/cuGGn3Er6/05pysh1EjRRugLJlFYUczxFGy/W5e jOo4Xqjcfnjs16O6i9RH0Fx8XmHGySvCs5RB9nOB8dDSrmCRYKm6bwSNIKAnQJqg8c+A LekA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=+Dx3EMERXonIfWKbXaucXnk42yQIbFYMFKVMx0hxFqU=; b=aIEBo+IKn/qrzigFFXZqUz41w/TY3iMapJwh4zPCxevULnhQh/OLNqry1e/E/k8PB0 Zlm8YCBjbUmO++bAd8rQAcg5lQseI0QPsQFLWz98wPoY/Tow/IfSp6essTD4efij/pCM AqUuhDtwcD3Hf+umiDINtYKKukkrvQ2IhFuVnYhbrbbRW17y/TMT0/jJveSN34ChBtsd aAip7TYBK8/lVcnwU9RXUzgXl5ZztiWci7XwKeklotTsCIo0KoqxuEd44sEkXbKG7I/b heM1n+8UilwiV9nvJosycGxaJ838enfHlBrWIjG6FcsmNuEJtk7mYJTKbQKX40ic2wn4 PpyQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ho42si8878501ejc.50.2021.11.19.05.53.47; Fri, 19 Nov 2021 05:53:48 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 04A1268A973; Fri, 19 Nov 2021 15:53:11 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D76B868A764 for ; Fri, 19 Nov 2021 15:53:03 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="231896458" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="231896458" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 05:52:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="507905984" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2021 05:52:57 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 21:52:42 +0800 Message-Id: <20211119135248.14518-5-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211119135248.14518-1-jianhua.wu@intel.com> References: <20211119135248.14518-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 05/11] avfilter/overlay_vulkan: use FF_ARRAY_ELEMS instead of magic number 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ssZKCzwvliP4 Signed-off-by: Wu Jianhua --- libavfilter/vf_overlay_vulkan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_overlay_vulkan.c b/libavfilter/vf_overlay_vulkan.c index ab97cf2c17..705e92e268 100644 --- a/libavfilter/vf_overlay_vulkan.c +++ b/libavfilter/vf_overlay_vulkan.c @@ -146,7 +146,7 @@ static av_cold int init_filter(AVFilterContext *ctx) ff_vk_set_compute_shader_sizes(shd, CGROUPS); - RET(ff_vk_add_descriptor_set(vkctx, s->pl, shd, desc_i, 3, 0)); /* set 0 */ + RET(ff_vk_add_descriptor_set(vkctx, s->pl, shd, desc_i, FF_ARRAY_ELEMS(desc_i), 0)); /* set 0 */ RET(ff_vk_add_descriptor_set(vkctx, s->pl, shd, &desc_b, 1, 0)); /* set 1 */ GLSLD( overlay_noalpha ); From patchwork Fri Nov 19 13:52:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 31496 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2414165iob; Fri, 19 Nov 2021 05:54:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiKf4Jm0e/EicJERJz7xMhyaAHlp8Nxh/VclRmqn9wOUV0D6PisYqgP1pbTNW6vb9zyziy X-Received: by 2002:a17:907:250f:: with SMTP id y15mr8091829ejl.0.1637330050350; Fri, 19 Nov 2021 05:54:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637330050; cv=none; d=google.com; s=arc-20160816; b=ts0LMLDUJiTIJQ9EdKScu32GYFvdp6fez01ogEeuXAMPprw5x6D6eCRRc94Up8vUnu WRwViUa9PXIiR5X90ckR4lmG4DrRlZRHU89Evl6MIoRfTnzIoLir65D+8i9dm1Bhv56k 9ndlL7pyHBw9IBhzJG5h0RUL8Cw44YS6oMJDN9C3rsQFsYh3m6HARI9+h5yB5YzHiQ7P INtIiNpE1fa6tj5zFCcbzEVo4Huy49jraMzUKH37ceF5CcUonnP/G+VCozTmGzPNCOze msn5yJoQtOf6kMhlNtuc85HNqKfo+3VEhupUrIyr5kgt9QMTzwA7ICZzcEGapOV3rSTZ dm/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=lzuDL1THCJlHJn7Qvck0HFLIAPsb2Z7nf/0t/4CsiN8=; b=Acz5Mpch9E1d4SDOvaBGIH7csdzCPqa/jlZXrPKHRQufwj8/bIDKkLK82LKT5vJqzg ZW+R6ypfv4/4wFBXY47bF546Pmx+R7DgxDGlkygKrxIuBXmR3IDBC4ts1h7GwjhDcyOC RZ0G8B4mytvrSAPqtwGegiYS4yIw+DSJ/4z7mYjNi5hQIVIuJiq1WPGUr8J8NPGkM8uA 2nIYq0rcEnxBErc8ofsUNWw7tbB7YdPzKbyE/7j343H+DF6HpSUjEYVfG5cIK/Fa5cib G1bt5FsGQyL5nO1rMq8SOFF1Ze/N0Bqh2iL1u5pS7RTGZiJRnuNZYMuGgciE5Ul8vh71 A3ZQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id sc20si11087546ejc.61.2021.11.19.05.54.09; Fri, 19 Nov 2021 05:54:10 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F332768A72F; Fri, 19 Nov 2021 15:53:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 67A2C68A905 for ; Fri, 19 Nov 2021 15:53:05 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="231896464" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="231896464" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 05:53:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="507905993" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2021 05:52:59 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 21:52:43 +0800 Message-Id: <20211119135248.14518-6-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211119135248.14518-1-jianhua.wu@intel.com> References: <20211119135248.14518-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 06/11] avfilter/avgblur_vulkan: call av_vkfmt_from_pixfmt only one time 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: q5nF6STTkS4s Signed-off-by: Wu Jianhua --- libavfilter/vf_avgblur_vulkan.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c index c733670764..f053cfb13c 100644 --- a/libavfilter/vf_avgblur_vulkan.c +++ b/libavfilter/vf_avgblur_vulkan.c @@ -212,6 +212,10 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *tmp_f AVVkFrame *in = (AVVkFrame *)in_f->data[0]; AVVkFrame *tmp = (AVVkFrame *)tmp_f->data[0]; AVVkFrame *out = (AVVkFrame *)out_f->data[0]; + + const VkFormat *input_formats = av_vkfmt_from_pixfmt(s->vkctx.input_format); + const VkFormat *output_formats = av_vkfmt_from_pixfmt(s->vkctx.output_format); + int planes = av_pix_fmt_count_planes(s->vkctx.output_format); /* Update descriptors and init the exec context */ @@ -221,17 +225,17 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *tmp_f for (int i = 0; i < planes; i++) { RET(ff_vk_create_imageview(vkctx, s->exec, &s->input_images[i].imageView, in->img[i], - av_vkfmt_from_pixfmt(s->vkctx.input_format)[i], + input_formats[i], ff_comp_identity_map)); RET(ff_vk_create_imageview(vkctx, s->exec, &s->tmp_images[i].imageView, tmp->img[i], - av_vkfmt_from_pixfmt(s->vkctx.output_format)[i], + output_formats[i], ff_comp_identity_map)); RET(ff_vk_create_imageview(vkctx, s->exec, &s->output_images[i].imageView, out->img[i], - av_vkfmt_from_pixfmt(s->vkctx.output_format)[i], + output_formats[i], ff_comp_identity_map)); s->input_images[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; From patchwork Fri Nov 19 13:52:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 31491 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2414926iob; Fri, 19 Nov 2021 05:54:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDVmsOlC3+GsdTY/PbNPgUp3amXcbz+l8QBX1GbbwyjlHGlo1aqWalo4GL99GlVbfmN/RY X-Received: by 2002:a17:906:9bf9:: with SMTP id de57mr8121383ejc.439.1637330089588; Fri, 19 Nov 2021 05:54:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637330089; cv=none; d=google.com; s=arc-20160816; b=nEfzRIbi8Ig2i2X9KAtHrahPWjqeYTB1NlLi5/VCasRHH9gWvLaa2YlzCuEEQB7z85 ajyqRyZgGuF/sMvWSZj+w/zlCQNvTrqwOAOi0fZNgl8QkIX/xt1uNBdbry3dH+IrsYmj 15MSqnDm7jlqqiP7rGWmrip8GFTqKIA9U9poV0tfGAhOueLCPFcypVrRnUaDIvAUR3J3 Bp2r0NGLpKlI7dLGEkYRa7434GtgXVwVoCyBWDKu112eL9CAvU/2gdC0NHn6LPywGp1j KPZDFAUiTnDW3UWIa/ExVtpNgjKgAN6ivmkGu9w3a0so8ZcTrV7KHk1j2Wo5/LtQG4nN Nbyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=p73dwdVSKJRXcTT5p+gCKeP/rH5kK4hYkZuVIQYlbRY=; b=bwbD9IP/yblQ8Z9DN8FrCAORG9Xk9OD3lwy2wVC3DRIM2odS+qSsTaYn4T+QpXoxal Omz7a6cfRsGcs1qJlcHwjvn+mZmL8/d/S5F8ziWHvHobiJCvbPc7q+bv4Xyd5BkQjwR9 qhJ317kDTibmmBb1hIFqEnUNigBVeirMOlSSvPIHRYkQ/sCn8T9V2mSUVeEZn9rT65Ne K9Y40HctkAkEdl51SC5C4sGigz00kdmvJHORmLZFD3C+ecTWhqscOQI9dR36II/F4JGk uWBQaNVdx9q9CEHVwpxAzL2UsrNyHehZMw8CJFXyhiICGWbTDt2y0Nip9KnIlrTEWIcM x0hw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dp12si7169273ejc.79.2021.11.19.05.54.49; Fri, 19 Nov 2021 05:54:49 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7F88968AD5F; Fri, 19 Nov 2021 15:53:17 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CAAF168AB71 for ; Fri, 19 Nov 2021 15:53:07 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="231896467" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="231896467" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 05:53:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="507906001" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2021 05:53:00 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 21:52:44 +0800 Message-Id: <20211119135248.14518-7-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211119135248.14518-1-jianhua.wu@intel.com> References: <20211119135248.14518-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 07/11] avfilter/chromaber_vulkan: call av_vkfmt_from_pixfmt only one time 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: sadMQkiKVgHY Signed-off-by: Wu Jianhua --- libavfilter/vf_chromaber_vulkan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_chromaber_vulkan.c b/libavfilter/vf_chromaber_vulkan.c index eff6554960..a4f66ac839 100644 --- a/libavfilter/vf_chromaber_vulkan.c +++ b/libavfilter/vf_chromaber_vulkan.c @@ -180,6 +180,8 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *in_f) AVVkFrame *in = (AVVkFrame *)in_f->data[0]; AVVkFrame *out = (AVVkFrame *)out_f->data[0]; int planes = av_pix_fmt_count_planes(s->vkctx.output_format); + const VkFormat *input_formats = av_vkfmt_from_pixfmt(s->vkctx.input_format); + const VkFormat *ouput_formats = av_vkfmt_from_pixfmt(s->vkctx.output_format); /* Update descriptors and init the exec context */ ff_vk_start_exec_recording(vkctx, s->exec); @@ -188,12 +190,12 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *in_f) for (int i = 0; i < planes; i++) { RET(ff_vk_create_imageview(vkctx, s->exec, &s->input_images[i].imageView, in->img[i], - av_vkfmt_from_pixfmt(s->vkctx.input_format)[i], + input_formats[i], ff_comp_identity_map)); RET(ff_vk_create_imageview(vkctx, s->exec, &s->output_images[i].imageView, out->img[i], - av_vkfmt_from_pixfmt(s->vkctx.output_format)[i], + ouput_formats[i], ff_comp_identity_map)); s->input_images[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; From patchwork Fri Nov 19 13:52:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 31499 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2413897iob; Fri, 19 Nov 2021 05:53:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXrIj3KIWgtNDB/wdyBCRnptAly6YPomLQK7tVHdWE6Av0TRZnAbhpIB/rVN804F01U2dm X-Received: by 2002:a05:6402:90c:: with SMTP id g12mr24288405edz.36.1637330038955; Fri, 19 Nov 2021 05:53:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637330038; cv=none; d=google.com; s=arc-20160816; b=DwBzu9zwC9LnOp7TR1Ad4iUAsI2tdk3QiErXDnHXH2OEE0rnUZQnSNcEkl7fZW3quo V0Xqr+8GNBjSvqfclbF5BBFgERjs5OJcscCx6ClXS/vCe2igId7JmSV+T6g4+8KlCEqR TWyNIo9Nv5nlj++DPDmZ0ODstrUADeEGnq6T//bHDYHwJ8cOV3jZOUZOgrU7Pk8Evb3S Q1IOxNFCSGCIIPeVvsDEnowCS8NnBpmhKE4C+zEhrt42TlTdukV5aQN028FaXPlcBuJ7 5eehf2NJKsCmXMShTuHvKVggcPB+E+sYkVxDMCIsO0nxvXZAi3iwcV4AMPavTFUFHanV RDIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=jdCeueS8Z8toMHi8OqDIe7z3ZMEfXksxoAadcpRqkqU=; b=rF4GhJdEo0mjyW0A6sJ4sSXICvJ4CVReGW2WpuPjpClyNnH4G/pIc8mIAzrBvPQ/nN 6JCAFhT/ZBqPFvPt8iX4q3hJIu5UOF1ue7G1RpUqeySq7DfauHJpZCuh7SRWOQlvOagE mzNRZOEHFtgEMsFw6nK7OLm5h8liZ8w2QRBg+3yn6SLx7aAznh2VxmI2Dz9jTdj1LrDo ZSHx9HjDTT1sfxb9SB4mOMWsLpltiLKXQ4dMD0Jk4WwA4tkipJnA4bBMYJgOQPexNRXG S9LiztmoQKXdTXzgAHXh9WGAUUsLv34bIe0hRBPYQLfZA/Q4XIea+GbCLJJnHhhczB63 p1dA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hp29si8115064ejc.80.2021.11.19.05.53.58; Fri, 19 Nov 2021 05:53:58 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F277B68AAE6; Fri, 19 Nov 2021 15:53:11 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C961768A842 for ; Fri, 19 Nov 2021 15:53:09 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="231896469" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="231896469" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 05:53:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="507906011" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2021 05:53:01 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 21:52:45 +0800 Message-Id: <20211119135248.14518-8-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211119135248.14518-1-jianhua.wu@intel.com> References: <20211119135248.14518-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 08/11] avfilter/scale_vulkan: call av_pix_fmt_count_planes only one time 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 4GJwMfB0k8Or Signed-off-by: Wu Jianhua --- libavfilter/vf_scale_vulkan.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_scale_vulkan.c b/libavfilter/vf_scale_vulkan.c index ff67c80e33..caa08ff19b 100644 --- a/libavfilter/vf_scale_vulkan.c +++ b/libavfilter/vf_scale_vulkan.c @@ -303,32 +303,30 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *in_f) AVVkFrame *out = (AVVkFrame *)out_f->data[0]; VkImageMemoryBarrier barriers[AV_NUM_DATA_POINTERS*2]; int barrier_count = 0; + const int planes = av_pix_fmt_count_planes(s->vkctx.input_format); /* Update descriptors and init the exec context */ ff_vk_start_exec_recording(vkctx, s->exec); cmd_buf = ff_vk_get_exec_buf(s->exec); - for (int i = 0; i < av_pix_fmt_count_planes(s->vkctx.input_format); i++) { + for (int i = 0; i < planes; i++) { RET(ff_vk_create_imageview(vkctx, s->exec, &s->input_images[i].imageView, in->img[i], av_vkfmt_from_pixfmt(s->vkctx.input_format)[i], ff_comp_identity_map)); - s->input_images[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; - } - - for (int i = 0; i < av_pix_fmt_count_planes(s->vkctx.output_format); i++) { RET(ff_vk_create_imageview(vkctx, s->exec, &s->output_images[i].imageView, out->img[i], av_vkfmt_from_pixfmt(s->vkctx.output_format)[i], ff_comp_identity_map)); + s->input_images[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; s->output_images[i].imageLayout = VK_IMAGE_LAYOUT_GENERAL; } ff_vk_update_descriptor_set(vkctx, s->pl, 0); - for (int i = 0; i < av_pix_fmt_count_planes(s->vkctx.input_format); i++) { + for (int i = 0; i < planes; i++) { VkImageMemoryBarrier bar = { .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .srcAccessMask = 0, From patchwork Fri Nov 19 13:52:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 31490 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2414351iob; Fri, 19 Nov 2021 05:54:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4LqIhBxemlBRePTP8vvC1WlpybWx9rQastcBb7y+YXKFe59OSES7oXjqj2mZ/2qA4tZIg X-Received: by 2002:a17:907:1c15:: with SMTP id nc21mr8067682ejc.260.1637330060548; Fri, 19 Nov 2021 05:54:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637330060; cv=none; d=google.com; s=arc-20160816; b=b7BGcjzkwmwgeu9vNQJM/vtwM5e2Dkt4t+5nT9+poWnfYNcbF+1iPYnsYfRXeuxrhj uN76lSAXLEyFoOewJWnvGsfaj/hxreyCqY6myp2dkZrmDDmFFMgc6a74/X0ih4XvrSQx kGAiCs4hago1f6cDn9UNegE40tZ5XOeENbq/IdUUZHfVrWSy3vQRhb2azfkBJZtbMMXQ ISXMAX5b6iUlfLpuWDj9koCvDjeWVmgBW7O6TB4kzqjuJeatM4hXRh9fa/kYUJo4RqZS aOVkXBJaK3qXM6qgmGqkvjgMsWa7AElTvW7mnz8UONxkjsD/nIckcAW+LsPKNWzHorLO 6Kgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=0f71GsND1JXH1gfjlzm4e3Ut0UmwP0+uNCbTzuNJ8Ks=; b=cR4E/FyhOhXEiPlgbSltg/FIupf9PKmMO7XPcH8Gnrzd8N4Pm11HXDz/tB8uzTZlJj nG1fEBgWHkgtZdE24VAP7ufy+aHKc/TJIYQ8sXKpqe6uZKmTi24cWhq8Fg6qhyMXwYLh U98hfAYCrQCspMfywrZfLAtcNQLp/Nhkqd66V4Iz56qfaBAMpnMdLowTn+1gqViM0JNs lE0xKXsp9NqHOMOEVJa1igcqspoojD7XUmo367x/c8ucQWfYgutFTj2ULyMmH8/+2UJt SdNQN8gfVj9p+Jpa4vy9A8r33jsGP/i+Juofoy3Nc1aQ34zcKLhVHeSdbt8aqsNxfT6n 6QwA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ho42si7530666ejc.203.2021.11.19.05.54.19; Fri, 19 Nov 2021 05:54:20 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9D3A868AB9D; Fri, 19 Nov 2021 15:53:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DC9F368A96A for ; Fri, 19 Nov 2021 15:53:10 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="231896472" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="231896472" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 05:53:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="507906018" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2021 05:53:02 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 21:52:46 +0800 Message-Id: <20211119135248.14518-9-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211119135248.14518-1-jianhua.wu@intel.com> References: <20211119135248.14518-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 09/11] avfilter/scale_vulkan: call av_vkfmt_from_pixfmt only one time 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: XtsoEiPosyA4 Signed-off-by: Wu Jianhua --- libavfilter/vf_scale_vulkan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_scale_vulkan.c b/libavfilter/vf_scale_vulkan.c index caa08ff19b..6b836e7e26 100644 --- a/libavfilter/vf_scale_vulkan.c +++ b/libavfilter/vf_scale_vulkan.c @@ -304,6 +304,8 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *in_f) VkImageMemoryBarrier barriers[AV_NUM_DATA_POINTERS*2]; int barrier_count = 0; const int planes = av_pix_fmt_count_planes(s->vkctx.input_format); + const VkFormat *input_formats = av_vkfmt_from_pixfmt(s->vkctx.input_format); + const VkFormat *output_formats = av_vkfmt_from_pixfmt(s->vkctx.output_format); /* Update descriptors and init the exec context */ ff_vk_start_exec_recording(vkctx, s->exec); @@ -312,12 +314,12 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *in_f) for (int i = 0; i < planes; i++) { RET(ff_vk_create_imageview(vkctx, s->exec, &s->input_images[i].imageView, in->img[i], - av_vkfmt_from_pixfmt(s->vkctx.input_format)[i], + input_formats[i], ff_comp_identity_map)); RET(ff_vk_create_imageview(vkctx, s->exec, &s->output_images[i].imageView, out->img[i], - av_vkfmt_from_pixfmt(s->vkctx.output_format)[i], + output_formats[i], ff_comp_identity_map)); s->input_images[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; From patchwork Fri Nov 19 13:52:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 31494 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2414514iob; Fri, 19 Nov 2021 05:54:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJztdysqs9jbISZ8StZrM2z8oNjdZ72jjycvBSGKSQPGj6idmR+qje74hgubAXYkC+u08ue6 X-Received: by 2002:a17:906:4791:: with SMTP id cw17mr8050847ejc.493.1637330069950; Fri, 19 Nov 2021 05:54:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637330069; cv=none; d=google.com; s=arc-20160816; b=XHpfpY0zPWAQAm4RIwb7wD1Yzl90U6TTLEUWWDKiWWFEF9em58aL5p4a8qwMox87De bGVAvokkjS4MP5kTcBQhBkIHNpn5XXlhdEQ/l8jZ0CVDiazEj/pY9/n99kmS7h8B17wB yIAiOsplB5xGFVbwebPSl56Cp9Wz77NqnbYUSlsV5rWmryiW3LXvbrbvywGIHPnpjmI/ Bq/Jj8zGOM13a1j7xMDPhrAH1YmeXT7pEVnXewpWoTuNSfTSS22CSwT0ahpNZHKNZibP 00X9sO+pF0ay4xkbkvUuIbRDHgr9rq3Rkmg+4zpl3dpdxOIVBnR7sZsG6q0rriEd0KKF Uq3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=QxhCmYpl/w6zcs0+HWDbgN9OlDHBRHND/ZEvvqE5XP4=; b=QOqmPEFSV1RAmlbxQw9yyCCbxjeRMLlI0eaeTlzmUHOwH1hDgnyl8TcYENiCxA918K ZI5TrwMNCrF5OVNP5cnt7UA1UZCbP3Ksh1UQ0xKlbdkV3BOt1++DqfynEh4CGTLjyGS+ aAA+gsLzAOgfS7pNt22GNBnXKeHkv5F4fckpoHAK89M7fTIUcGj8+3Q0Zhq0+KWg80/c LzMlNSt7fMPDc3CrO1sFOzifI6Au6P2XsYiBg85YcsbmR9jDILWaIPIrIG1L5BqO49sg /HaOZQR/cRMgalUV8RjJLpgOrJjxX5UqA1EGZGEpEi7NC1kJrYYC0HvrLvn/n9fmHbGV 7bFQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n6si5856317edd.256.2021.11.19.05.54.29; Fri, 19 Nov 2021 05:54:29 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9B66A68A985; Fri, 19 Nov 2021 15:53:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5A90F68A905 for ; Fri, 19 Nov 2021 15:53:11 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="231896476" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="231896476" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 05:53:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="507906030" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2021 05:53:03 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 21:52:47 +0800 Message-Id: <20211119135248.14518-10-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211119135248.14518-1-jianhua.wu@intel.com> References: <20211119135248.14518-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 10/11] avfilter/overlay_vulkan: call av_vkfmt_from_pixfmt only one time 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: S9FCI7gggubQ Signed-off-by: Wu Jianhua --- libavfilter/vf_overlay_vulkan.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_overlay_vulkan.c b/libavfilter/vf_overlay_vulkan.c index 705e92e268..13dde25b22 100644 --- a/libavfilter/vf_overlay_vulkan.c +++ b/libavfilter/vf_overlay_vulkan.c @@ -242,9 +242,13 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVVkFrame *main = (AVVkFrame *)main_f->data[0]; AVVkFrame *overlay = (AVVkFrame *)overlay_f->data[0]; - AVHWFramesContext *main_fc = (AVHWFramesContext*)main_f->hw_frames_ctx->data; + AVHWFramesContext *main_fc = (AVHWFramesContext*)main_f->hw_frames_ctx->data; AVHWFramesContext *overlay_fc = (AVHWFramesContext*)overlay_f->hw_frames_ctx->data; + const VkFormat *output_formats = av_vkfmt_from_pixfmt(s->vkctx.output_format); + const VkFormat *main_sw_formats = av_vkfmt_from_pixfmt(main_fc->sw_format); + const VkFormat *overlay_sw_formats = av_vkfmt_from_pixfmt(overlay_fc->sw_format); + /* Update descriptors and init the exec context */ ff_vk_start_exec_recording(vkctx, s->exec); cmd_buf = ff_vk_get_exec_buf(s->exec); @@ -252,17 +256,17 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, for (int i = 0; i < planes; i++) { RET(ff_vk_create_imageview(vkctx, s->exec, &s->main_images[i].imageView, main->img[i], - av_vkfmt_from_pixfmt(main_fc->sw_format)[i], + main_sw_formats[i], ff_comp_identity_map)); RET(ff_vk_create_imageview(vkctx, s->exec, &s->overlay_images[i].imageView, overlay->img[i], - av_vkfmt_from_pixfmt(overlay_fc->sw_format)[i], + overlay_sw_formats[i], ff_comp_identity_map)); RET(ff_vk_create_imageview(vkctx, s->exec, &s->output_images[i].imageView, out->img[i], - av_vkfmt_from_pixfmt(s->vkctx.output_format)[i], + output_formats[i], ff_comp_identity_map)); s->main_images[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; From patchwork Fri Nov 19 13:52:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 31492 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2414725iob; Fri, 19 Nov 2021 05:54:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyATp79McvHD6wxwKW0xwJrjFYOq86/zS7lReiuv2+kgE4yB2udtUkRmESWB/bO3eos0bzN X-Received: by 2002:aa7:d794:: with SMTP id s20mr24772690edq.305.1637330079369; Fri, 19 Nov 2021 05:54:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637330079; cv=none; d=google.com; s=arc-20160816; b=zl6SNXLvhkORLZCL3t0jlYgw5akPLT619ID6HiMKJtRV4UKAFZFhi5jOwv+lC+Wagf NPOc8c+5o34/A7Bek0N8ST9N0aclLxjsuPDEr9LVGjLyDBJRWvs5TeGYAI3mep98IAHH OBXeP4vFddrO2oetD386zQwSF2uikXHfEvmgZS/zOBWDnxs2XiGHgNRq7p8Urh03In+2 /wgbja9n/XQ9G6TrT2L+mCLY2mgNvIdd1PkaFGcuRidAPoFCSIsiOMZkx2Zmyav0CBvT mFEXE5VRHWtcz8TcwX+ABpyV9Dj4dAT8LOs4ctVrVtPxs9XHRuMMS8J9hqbxVQ+AB0I/ UzGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=dH1x6wMGailf9WrhfK180QhMJbFlEy00C+Zl/7EfO3Q=; b=AVvBtQoArjAudx614asCole5x/Xz6MHDsLHaQQYYl1nO9tjgD6LhwdEr6RG6KSeVFa UtsKW5SmzywtORvpbNqimXCGr9HjP7tshw+vlb3gd1E4kN/aPIVgMEONTbzBfuuRg0xO 5mM9SQldBvfXS+C2yHsewcm/OnXDmjIEB4RL3rAoTq0pYvULvsBVRqp3cKjEdyzCiTEE QQHF3NQ8prQvcfV1JDmV0CpYTQ28xnHYaj0dtH9bLalEsmZTKSJcS8ctxXTWuZOawEk1 4qa4yNFsQYKUja78yaoJWTSGEeY8zaF5HKHa2ixcbvI+i9LOwr7LH3Ni1lZYOLzknRNb jl0g== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id fj2si8799965ejc.474.2021.11.19.05.54.38; Fri, 19 Nov 2021 05:54:39 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9677868AA82; Fri, 19 Nov 2021 15:53:16 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C2DCD68AA83 for ; Fri, 19 Nov 2021 15:53:11 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="231896483" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="231896483" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 05:53:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="507906045" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2021 05:53:04 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 21:52:48 +0800 Message-Id: <20211119135248.14518-11-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211119135248.14518-1-jianhua.wu@intel.com> References: <20211119135248.14518-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 11/11] avutil/vulkan_glslang: fix compiling failure issue 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: eVvrDJvQgI5U Signed-off-by: Wu Jianhua --- libavutil/vulkan_glslang.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/vulkan_glslang.c b/libavutil/vulkan_glslang.c index ac5efe2365..e7785f6d40 100644 --- a/libavutil/vulkan_glslang.c +++ b/libavutil/vulkan_glslang.c @@ -219,10 +219,10 @@ static int glslc_shader_compile(FFVkSPIRVCompiler *ctx, void *avctx, messages = glslang_program_SPIRV_get_messages(glslc_program); if (messages) { - ff_vk_print_shader(s, shd, AV_LOG_WARNING); + ff_vk_print_shader(avctx, shd, AV_LOG_WARNING); av_log(avctx, AV_LOG_WARNING, "%s\n", messages); } else { - ff_vk_print_shader(s, shd, AV_LOG_VERBOSE); + ff_vk_print_shader(avctx, shd, AV_LOG_VERBOSE); } glslang_shader_delete(glslc_shader);