Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 5/8] avutil/vulkan: Avoid shadowing
Date: Sun,  3 Mar 2024 19:42:47 +0100
Message-ID: <AS8P250MB0744992A83621F6CE44AE5B28F5C2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AS8P250MB0744636F6E1B70D50EB6644A8F5C2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavutil/vulkan.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c
index 76b61dcaaa..4392a77d6c 100644
--- a/libavutil/vulkan.c
+++ b/libavutil/vulkan.c
@@ -1308,13 +1308,15 @@ void ff_vk_frame_barrier(FFVulkanContext *s, FFVkExecContext *e,
                          VkImageLayout        new_layout,
                          uint32_t             new_qf)
 {
-    int i, found;
+    int found = -1;
     AVVkFrame *vkf = (AVVkFrame *)pic->data[0];
     const int nb_images = ff_vk_count_images(vkf);
-    for (i = 0; i < e->nb_frame_deps; i++)
-        if (e->frame_deps[i]->data[0] == pic->data[0])
+    for (int i = 0; i < e->nb_frame_deps; i++)
+        if (e->frame_deps[i]->data[0] == pic->data[0]) {
+            if (e->frame_update[i])
+                found = i;
             break;
-    found = (i < e->nb_frame_deps) && (e->frame_update[i]) ? i : -1;
+        }
 
     for (int i = 0; i < nb_images; i++) {
         bar[*nb_bar] = (VkImageMemoryBarrier2) {
-- 
2.40.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2024-03-03 18:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-03 18:41 [FFmpeg-devel] [PATCH 1/8] avutil/vulkan: Don't autoinclude vulkan_loader.h Andreas Rheinhardt
2024-03-03 18:42 ` [FFmpeg-devel] [PATCH 2/8] avutil/vulkan_loader: Avoid redundant strings and relocations Andreas Rheinhardt
2024-03-03 18:42 ` [FFmpeg-devel] [PATCH 3/8] avutil/vulkan_loader: Use smaller types Andreas Rheinhardt
2024-03-03 18:42 ` [FFmpeg-devel] [PATCH 4/8] avutil/vulkan_loader: Avoid relocations for strings Andreas Rheinhardt
2024-03-03 18:42 ` Andreas Rheinhardt [this message]
2024-03-03 18:42 ` [FFmpeg-devel] [PATCH 6/8] avutil/vulkan: Make ff_vk_set_descriptor_image() static Andreas Rheinhardt
2024-03-03 18:42 ` [FFmpeg-devel] [PATCH 7/8] avutil/vulkan: Remove unused ff_vk_set_descriptor_sampler() Andreas Rheinhardt
2024-03-03 18:42 ` [FFmpeg-devel] [PATCH 8/8] avutil/vulkan: Move functions only used by lavfi to it Andreas Rheinhardt
2024-03-03 21:49   ` Lynne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AS8P250MB0744992A83621F6CE44AE5B28F5C2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
    --to=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git