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() );