From 758f8b26b9592438027c43533bf662e5c407ae6a Mon Sep 17 00:00:00 2001 From: Lynne Date: Wed, 11 Jan 2023 09:37:18 +0100 Subject: [PATCH] vulkan: add ff_vk_count_images() --- libavutil/vulkan.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h index 7f31ced41d..8ea009e4da 100644 --- a/libavutil/vulkan.h +++ b/libavutil/vulkan.h @@ -240,6 +240,15 @@ typedef struct FFVulkanContext { enum AVPixelFormat input_format; } FFVulkanContext; +static inline int ff_vk_count_images(AVVkFrame *f) +{ + int cnt = 0; + while (f->img[cnt]) + cnt++; + + return cnt; +} + /* Identity mapping - r = r, b = b, g = g, a = a */ extern const VkComponentMapping ff_comp_identity_map;