aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2023-01-11 09:37:18 +0100
committerLynne <dev@lynne.ee>2023-05-29 00:41:48 +0200
commit758f8b26b9592438027c43533bf662e5c407ae6a (patch)
treef2870b60d335dae4b2ace178cc618b9a262372dc
parentb5eaeb1f134d973836d6e3dced271713fb97f234 (diff)
downloadffmpeg-758f8b26b9592438027c43533bf662e5c407ae6a.tar.gz
vulkan: add ff_vk_count_images()
-rw-r--r--libavutil/vulkan.h9
1 files changed, 9 insertions, 0 deletions
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;