From patchwork Thu Nov 18 04:24: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: 31471 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp234049iob; Wed, 17 Nov 2021 20:25:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzeKj83tAaVlXKg/nzJsr7Sx9NjlEndF1MmsdG6u0NJ4L7Hhn09wbBKziSxvxKrqlvP0J/G X-Received: by 2002:a05:6402:5194:: with SMTP id q20mr6587883edd.123.1637209525315; Wed, 17 Nov 2021 20:25:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637209525; cv=none; d=google.com; s=arc-20160816; b=bTTy3qS2J+iqLhn3FIN3BQC2/jQaCZyFDcjVrPxq5m3CDpxJwihlb9odpajvd3sOv1 qQTOEJ3QfzPUis0QkvraK0tBavA5DoSirwSXKAOvh0humntxabUAGnyYZbuMzKlUR/ii zwCO9f1IEltmtnimVQZuk39CjUJi+oeFIOGtHOn5zL1J3L4yKuii/FB/fwOrzJs0jqhd YLeWS4wLZVLTjKZF0dVwEvYIQEhSp8VhKlRFvOyLset7JvE/JuEu6xyDLo8s4JIQlMJq Alk7N/Azb2eQnDKVb//nyXzgyF3bU1AHerNh8LtsKZDI1OAIaP+IZ5e/4u6SwZocgeZP VN1A== 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=sEbRk/P0Z2N1hPtee+DGEmqb4ypddGAQ0VXWFfKoQBU=; b=n/bV8xjgTWH5N02Wvxody3BG05al5BaxjUQR46yCGRdoWjDeAwV+HbubB45rIVPiYZ AIgV/ojPRqfC61GqD4cKcNdow/a97y7ktcOLjsQtwCaN3ryejEwEXCRGceBaveJs+/+t EDJ5/+GjtBB0/LK/OxYEQGoRSAJeO8VnFLRHGtsaYp1t8O4g0jYNhDgpt6ArQO8ZUZXY ut9U9nFlb18/8wH3ts2kP+hdpvA/o3clDbzLZvM5l8i3zOqipzT5V42sKMfP3n+mnGMI D4g3UydSVtgc0NRRZoGm38tM9qPouJhFPdVjqNcchYDydFFmQyaScz8vcMT5Uo5oBeVD 9Lhg== 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 gs42si5341446ejc.704.2021.11.17.20.25.25; Wed, 17 Nov 2021 20:25: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 BC66D68AE8C; Thu, 18 Nov 2021 06:25:05 +0200 (EET) 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 78247680243 for ; Thu, 18 Nov 2021 06:24:58 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10171"; a="233945267" X-IronPort-AV: E=Sophos;i="5.87,243,1631602800"; d="scan'208";a="233945267" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2021 20:24:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,243,1631602800"; d="scan'208";a="495212202" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga007.jf.intel.com with ESMTP; 17 Nov 2021 20:24:54 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Thu, 18 Nov 2021 12:24:42 +0800 Message-Id: <20211118042449.8038-3-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211118042449.8038-1-jianhua.wu@intel.com> References: <20211118042449.8038-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 03/10] 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: Pkgkqoq7m0RO 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 83ab72f716..b817dd12f7 100644 --- a/libavfilter/vf_chromaber_vulkan.c +++ b/libavfilter/vf_chromaber_vulkan.c @@ -125,7 +125,7 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in) ff_vk_add_push_constant(ctx, s->pl, 0, sizeof(s->opts), VK_SHADER_STAGE_COMPUTE_BIT); - RET(ff_vk_add_descriptor_set(ctx, s->pl, shd, desc_i, 2, 0)); /* set 0 */ + RET(ff_vk_add_descriptor_set(ctx, s->pl, shd, desc_i, FF_ARRAY_ELEMS(desc_i), 0)); /* set 0 */ GLSLD( distort_chroma_kernel ); GLSLC(0, void main() );