From patchwork Tue Dec 7 09:41: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: 32101 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp6015209iog; Tue, 7 Dec 2021 01:46:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJyv9VCRKtovfc3aA8oiADiOLkEBIG9BW3lVFhuFPxu/umzqijSbg85kqft7LhfWcUP8GEus X-Received: by 2002:a17:907:3d94:: with SMTP id he20mr54235305ejc.75.1638870398043; Tue, 07 Dec 2021 01:46:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638870398; cv=none; d=google.com; s=arc-20160816; b=fmG82gaa/fxYN+g6keWMpUxS7Pn6lpve4qYaDGBTiy4wi+fXQgl0RPNNKj1NX+EnwY BcX3W6eRkkV0W2Jsqqy+w6xYwsFESoaDKM+4k7OchCGJa14HdnGjUnLERg0NlBkVr/Mi HpQ0k1GqzMC7EEMXyXPUrHsbYWONnSD2AH/wPja67T+mBMX7NaBsC/MVmkbgtWizu4j5 019gQh9y9a928zDZF4BJUNeVEau47POCUUd6UGBpmgpx7kzf/VQOxEHoEV38qyKnF2jo vBAwlBsOmgfvQKKfcSHcbegWFUGxhBf+ldoCuOJuRC4XpUvfb9BITFdQ3b0XvNg5lF+O +Cgg== 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:delivered-to; bh=vJxA5xCJpyH4X5rHAoeSF7+lfmZnEh7NStELpDBzV/w=; b=P/Bt0qpj1BTXO9dz4Cv5cJ6F1i13x+AdN962fdWHhnlErqSnc8spRamiHzC4QmLVIt a9Hs+4MMWt8Bq4Ufiynnpw0Ap+ktCOFy07+6ydkuVW6jALpyntWMyM7LJXQMQ+zFlxSk FCKNNgYE1hFQk6/BpirypJ1Cnjpyz0kgFsH663sWIKpQf0WfY0bw72iQF9rW5Tkwncfo DQ5v3sWLq7bdO5ldFKHkjhdpuzGfs1nSFUCx6wv0LlNlN70WTb/4puJB2XKs7T1GnJEv h2ORLtFWKFTHcsLBDYFWCgfFLmrxgePX1QrPp61nhkH9aYypeSOezgnlTu83zQTmK0Ti Mrcg== 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 fz1si28504805ejc.175.2021.12.07.01.46.35; Tue, 07 Dec 2021 01:46:38 -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 D357268A43D; Tue, 7 Dec 2021 11:46:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B85A168AE46 for ; Tue, 7 Dec 2021 11:45:59 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10190"; a="236279443" X-IronPort-AV: E=Sophos;i="5.87,293,1631602800"; d="scan'208";a="236279443" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2021 01:45:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,293,1631602800"; d="scan'208";a="657630474" Received: from chenwenbin-z390-aorus-ultra.sh.intel.com ([10.239.35.110]) by fmsmga001.fm.intel.com with ESMTP; 07 Dec 2021 01:45:53 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Tue, 7 Dec 2021 17:41:40 +0800 Message-Id: <20211207094140.2151055-4-jianhua.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211207094140.2151055-1-jianhua.wu@intel.com> References: <20211207094140.2151055-1-jianhua.wu@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/4] avfilter/flip_vulkan: fix incorrect sematic 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: x6KFEJYF4kUz The input and output are arrays of images, so it's better to use the plural to align them to the variable name of VkDescriptorImageInfo. Signed-off-by: Wu Jianhua --- libavfilter/vf_flip_vulkan.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/libavfilter/vf_flip_vulkan.c b/libavfilter/vf_flip_vulkan.c index 0223786ef1..6a6709e79b 100644 --- a/libavfilter/vf_flip_vulkan.c +++ b/libavfilter/vf_flip_vulkan.c @@ -52,7 +52,7 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in, enum FlipType FFVulkanDescriptorSetBinding image_descs[] = { { - .name = "input_image", + .name = "input_images", .type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, .dimensions = 2, .elems = planes, @@ -60,7 +60,7 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in, enum FlipType .updater = s->input_images, }, { - .name = "output_image", + .name = "output_images", .type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, .mem_layout = ff_vk_shader_rep_fmt(s->vkctx.output_format), .mem_quali = "writeonly", @@ -89,33 +89,33 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in, enum FlipType ff_vk_set_compute_shader_sizes(shd, (int [3]){ CGS, 1, 1 }); RET(ff_vk_add_descriptor_set(vkctx, s->pl, shd, image_descs, FF_ARRAY_ELEMS(image_descs), 0)); - GLSLC(0, void main() ); - GLSLC(0, { ); - GLSLC(1, ivec2 size; ); - GLSLC(1, const ivec2 pos = ivec2(gl_GlobalInvocationID.xy); ); + GLSLC(0, void main() ); + GLSLC(0, { ); + GLSLC(1, ivec2 size; ); + GLSLC(1, const ivec2 pos = ivec2(gl_GlobalInvocationID.xy); ); for (int i = 0; i < planes; i++) { - GLSLC(0, ); - GLSLF(1, size = imageSize(output_image[%i]); ,i); - GLSLC(1, if (IS_WITHIN(pos, size)) { ); + GLSLC(0, ); + GLSLF(1, size = imageSize(output_images[%i]); ,i); + GLSLC(1, if (IS_WITHIN(pos, size)) { ); switch (type) { case FLIP_HORIZONTAL: - GLSLF(2, vec4 res = texture(input_image[%i], ivec2(size.x - pos.x, pos.y)); ,i); + GLSLF(2, vec4 res = texture(input_images[%i], ivec2(size.x - pos.x, pos.y)); ,i); break; case FLIP_VERTICAL: - GLSLF(2, vec4 res = texture(input_image[%i], ivec2(pos.x, size.y - pos.y)); ,i); + GLSLF(2, vec4 res = texture(input_images[%i], ivec2(pos.x, size.y - pos.y)); ,i); break; case FLIP_BOTH: - GLSLF(2, vec4 res = texture(input_image[%i], ivec2(size.xy - pos.xy));, i); + GLSLF(2, vec4 res = texture(input_images[%i], ivec2(size.xy - pos.xy));, i); break; default: - GLSLF(2, vec4 res = texture(input_image[%i], pos); ,i); + GLSLF(2, vec4 res = texture(input_images[%i], pos); ,i); break; } - GLSLF(2, imageStore(output_image[%i], pos, res); ,i); - GLSLC(1, } ); + GLSLF(2, imageStore(output_images[%i], pos, res); ,i); + GLSLC(1, } ); } - GLSLC(0, } ); + GLSLC(0, } ); RET(ff_vk_compile_shader(vkctx, shd, "main")); RET(ff_vk_init_pipeline_layout(vkctx, s->pl));