diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-03-09 05:30:40 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-03-11 04:35:53 +0100 |
commit | 27c82af2fe6ab4a5dfc09f971b975c1238022a2a (patch) | |
tree | 606a4c528e2b87a31c8627fb54f6db6238732353 | |
parent | e499c85999a188dcafcc7af3c9d9d3db5c2c362d (diff) | |
download | ffmpeg-27c82af2fe6ab4a5dfc09f971b975c1238022a2a.tar.gz |
avutil/vulkan: Remove unused ff_vk_create_avbuf()
Unused since aea4d4b423c62aecf326ef3ae1578710faa3eca6.
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavutil/vulkan.c | 35 | ||||
-rw-r--r-- | libavutil/vulkan.h | 3 |
2 files changed, 0 insertions, 38 deletions
diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index 2ae619967a..8f6ee8a276 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -1025,41 +1025,6 @@ int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, return 0; } -static void destroy_avvkbuf(void *opaque, uint8_t *data) -{ - FFVulkanContext *s = opaque; - FFVkBuffer *buf = (FFVkBuffer *)data; - ff_vk_free_buf(s, buf); - av_free(buf); -} - -int ff_vk_create_avbuf(FFVulkanContext *s, AVBufferRef **ref, size_t size, - void *pNext, void *alloc_pNext, - VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags) -{ - int err; - AVBufferRef *buf; - FFVkBuffer *vkb = av_mallocz(sizeof(*vkb)); - if (!vkb) - return AVERROR(ENOMEM); - - err = ff_vk_create_buf(s, vkb, size, pNext, alloc_pNext, usage, flags); - if (err < 0) { - av_free(vkb); - return err; - } - - buf = av_buffer_create((uint8_t *)vkb, sizeof(*vkb), destroy_avvkbuf, s, 0); - if (!buf) { - destroy_avvkbuf(s, (uint8_t *)vkb); - return AVERROR(ENOMEM); - } - - *ref = buf; - - return 0; -} - int ff_vk_map_buffers(FFVulkanContext *s, FFVkBuffer **buf, uint8_t *mem[], int nb_buffers, int invalidate) { diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h index 617df952c4..91510cbb69 100644 --- a/libavutil/vulkan.h +++ b/libavutil/vulkan.h @@ -481,9 +481,6 @@ int ff_vk_alloc_mem(FFVulkanContext *s, VkMemoryRequirements *req, int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, void *pNext, void *alloc_pNext, VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags); -int ff_vk_create_avbuf(FFVulkanContext *s, AVBufferRef **ref, size_t size, - void *pNext, void *alloc_pNext, - VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags); /** * Buffer management code. |