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