From patchwork Thu Dec 9 09:36:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 32218 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp106467iog; Thu, 9 Dec 2021 01:37:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5iheb95SueM4f6DZCMErpCvJzxN/AiH9P/A4HDeNtFKD32Li+mD3Z0xffiRP0UYi0p2li X-Received: by 2002:a17:907:60cf:: with SMTP id hv15mr13731192ejc.561.1639042674579; Thu, 09 Dec 2021 01:37:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639042674; cv=none; d=google.com; s=arc-20160816; b=D7nJiFVZz0N429CiePa+qbgM+/1mDX30nJIKki7ZyhbaUsdr6JdGHh1hircbDLpYTq CUwbOP5rQy1lqS+16hORAEVzpwz86XzCTcbrEuPk2fsD6fDKpoCohhuHnU0apQZu0BDr tf6SNVFno+PSIOCIh9qMdOFn1WSAL8CocmHUO3yxliKOtCq0b3LF8ueg/nGRT9PQvWgm 7qUx22Z3LZq6MrwgDBJPl/sEPqO0GAWVCxG/IWwiMslIqWEUOA6z7xWtqd+HTMysYL7S vLgR7W9Bhh6QYpOw7y56mrxBAlh+KFk/LWXsJCFIGDfmJ2tNLM+Zv9c90YxBIRTaSHt0 spMA== 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:dkim-signature:delivered-to; bh=vJxA5xCJpyH4X5rHAoeSF7+lfmZnEh7NStELpDBzV/w=; b=mGiBa1aGh1f1un0oWBrSfblf0FVtDvskPDIXgNRWPX7JeQQBgN5mTUi85nwpmnRwjt wpwiBYCSVUKYLA1DNwhDGkQdyFse2OybcjLnZ+J0dkaK3+4cnDfuSKdo3nqucgtxoC0f IoSq5RuFRunPxEyiKCaK0DZ3wpiVTzTPzkza6rUPjOpPVLm/7+JYfTCR20XhYRr6QqFK GFKw0KdoW0P/bC73IIMgf2Xgil2LCceU74HR+VWB9wXjgIifdOBZpC8b1/6+27I3xPZ6 whmVI5sU7eG0owHAaUtqiM5EPbbtyFQISLXb8ic3wusN3o5YzsgKUROOVBaMBzEa3nS9 mqbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=cLlfJNzg; 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 u24si7996281edr.523.2021.12.09.01.37.54; Thu, 09 Dec 2021 01:37:54 -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; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=cLlfJNzg; 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 34B8F68AB42; Thu, 9 Dec 2021 11:37:18 +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 9E1E668AB42 for ; Thu, 9 Dec 2021 11:37:11 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639042636; x=1670578636; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lel0yFzdJxT3BaaNFaxoeV6Wu87lmqfqzUENwX3XWAk=; b=cLlfJNzg8blVO4KMjuhiZTmXabb4tbFSCAquTNboIh/VitptLFDwJ6cc eP0XQNR5jXD1mGhjBYK2gynNf/+ZCmqw371c2KVRshzSResZ37A8LHHt2 nBR74s3u73IxvQJBmYJl3xZASDu9xMzlEDigVnx3HVN6AxWKX1odc/j78 gtHmL/W0j0vmrhFxg6P6LWZIq7cFS/D5dB6vFXO55LNDmgXxeYG0+wqUg qCtkmW1/F7IG51BFqzWLhPD+lsN1bC+x6Temr1Ro+vghJ3WM+HZ4xBtki TG+uOQseK/Y5brK7QCmc1V8fFr5fyDM8XcaXItxu7cO5oj4afo3E+wtYD g==; X-IronPort-AV: E=McAfee;i="6200,9189,10192"; a="237864460" X-IronPort-AV: E=Sophos;i="5.88,192,1635231600"; d="scan'208";a="237864460" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2021 01:37:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,192,1635231600"; d="scan'208";a="462064137" Received: from chenwenbin-z390-aorus-ultra.sh.intel.com ([10.239.35.110]) by orsmga003.jf.intel.com with ESMTP; 09 Dec 2021 01:37:05 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Thu, 9 Dec 2021 17:36:54 +0800 Message-Id: <20211209093654.3149267-4-jianhua.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211209093654.3149267-1-jianhua.wu@intel.com> References: <20211209093654.3149267-1-jianhua.wu@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 4/4] avfilter/flip_vulkan: fix incorrect semantics 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: PkoXZj0vuOcj 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));