This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 212eb8413a6890be064204c572e9e75b60029346
Author:     Cameron Gutman <[email protected]>
AuthorDate: Sun Dec 7 13:51:05 2025 -0600
Commit:     Lynne <[email protected]>
CommitDate: Mon Dec 8 23:22:31 2025 +0000

    hwcontext_vulkan: add APIs to get optional extensions
    
    These provide a way for apps that initialize Vulkan themselves to know
    which extensions we may be able to use without having to hardcode it.
    
    Signed-off-by: Cameron Gutman <[email protected]>
---
 doc/APIchanges               |  4 ++++
 libavutil/hwcontext_vulkan.c | 28 ++++++++++++++++++++++++++++
 libavutil/hwcontext_vulkan.h | 18 ++++++++++++++++++
 libavutil/version.h          |  4 ++--
 4 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 744c52ff29..e670a08cf9 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,10 @@ The last version increases of all libraries were on 2025-03-28
 
 API changes, most recent first:
 
+2025-12-xx - xxxxxxxxxx - lavu 60.20.100 - hwcontext_vulkan.h
+  Add av_vk_get_optional_instance_extensions().
+  Add av_vk_get_optional_device_extensions().
+
 2025-12-xx - xxxxxxxxxx - lavc 62.22.101 - avcodec.h
   Add avcodec_receive_frame_flags().
   Add AV_CODEC_RECEIVE_FRAME_FLAG_SYNCHRONOUS.
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index a120e6185c..9dfcb503c1 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -693,6 +693,34 @@ static const VulkanOptExtension optional_device_exts[] = {
     { VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME,                 
FF_VK_EXT_VIDEO_DECODE_AV1       },
 };
 
+const char **av_vk_get_optional_instance_extensions(int *count)
+{
+    const char **exts = av_malloc_array(sizeof(*exts),
+                                        
FF_ARRAY_ELEMS(optional_instance_exts));
+    if (!exts)
+        return NULL;
+
+    for (int i = 0; i < FF_ARRAY_ELEMS(optional_instance_exts); i++)
+        exts[i] = optional_instance_exts[i].name;
+
+    *count = FF_ARRAY_ELEMS(optional_instance_exts);
+    return exts;
+}
+
+const char **av_vk_get_optional_device_extensions(int *count)
+{
+    const char **exts = av_malloc_array(sizeof(*exts),
+                                        FF_ARRAY_ELEMS(optional_device_exts));
+    if (!exts)
+        return NULL;
+
+    for (int i = 0; i < FF_ARRAY_ELEMS(optional_device_exts); i++)
+        exts[i] = optional_device_exts[i].name;
+
+    *count = FF_ARRAY_ELEMS(optional_device_exts);
+    return exts;
+}
+
 static VkBool32 VKAPI_CALL 
vk_dbg_callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
                                            VkDebugUtilsMessageTypeFlagsEXT 
messageType,
                                            const 
VkDebugUtilsMessengerCallbackDataEXT *data,
diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h
index 0bb536ab3f..77d53289b4 100644
--- a/libavutil/hwcontext_vulkan.h
+++ b/libavutil/hwcontext_vulkan.h
@@ -97,6 +97,8 @@ typedef struct AVVulkanDeviceContext {
      * each entry containing the specified Vulkan extension string to enable.
      * Duplicates are possible and accepted.
      * If no extensions are enabled, set these fields to NULL, and 0 
respectively.
+     * av_vk_get_optional_instance_extensions() can be used to enumerate 
extensions
+     * that FFmpeg may use if enabled.
      */
     const char * const *enabled_inst_extensions;
     int nb_enabled_inst_extensions;
@@ -108,6 +110,8 @@ typedef struct AVVulkanDeviceContext {
      * If supplying your own device context, these fields takes the same 
format as
      * the above fields, with the same conditions that duplicates are possible
      * and accepted, and that NULL and 0 respectively means no extensions are 
enabled.
+     * av_vk_get_optional_device_extensions() can be used to enumerate 
extensions
+     * that FFmpeg may use if enabled.
      */
     const char * const *enabled_dev_extensions;
     int nb_enabled_dev_extensions;
@@ -375,4 +379,18 @@ AVVkFrame *av_vk_frame_alloc(void);
  */
 const VkFormat *av_vkfmt_from_pixfmt(enum AVPixelFormat p);
 
+/**
+ * Returns an array of optional Vulkan instance extensions that FFmpeg
+ * may use if enabled.
+ * @note Must be freed via av_free()
+ */
+const char **av_vk_get_optional_instance_extensions(int *count);
+
+/**
+ * Returns an array of optional Vulkan device extensions that FFmpeg
+ * may use if enabled.
+ * @note Must be freed via av_free()
+ */
+const char **av_vk_get_optional_device_extensions(int *count);
+
 #endif /* AVUTIL_HWCONTEXT_VULKAN_H */
diff --git a/libavutil/version.h b/libavutil/version.h
index d058e94425..fe76affb41 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,8 +79,8 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  60
-#define LIBAVUTIL_VERSION_MINOR  19
-#define LIBAVUTIL_VERSION_MICRO 101
+#define LIBAVUTIL_VERSION_MINOR  20
+#define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
                                                LIBAVUTIL_VERSION_MINOR, \

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to