* [FFmpeg-devel] [PATCH] avutil/vulkan: Remove unused ff_vk_create_avbuf()
@ 2025-03-09 16:53 Andreas Rheinhardt
2025-03-10 18:43 ` Lynne
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rheinhardt @ 2025-03-09 16:53 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 27 bytes --]
Patch attached.
- Andreas
[-- Attachment #2: 0001-avutil-vulkan-Remove-unused-ff_vk_create_avbuf.patch --]
[-- Type: text/x-patch, Size: 2488 bytes --]
From cdeabdbc844e5283e0ff49fdd2dbdb2dfda6b05b Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Sun, 9 Mar 2025 05:30:40 +0100
Subject: [PATCH] avutil/vulkan: Remove unused ff_vk_create_avbuf()
Unused since aea4d4b423c62aecf326ef3ae1578710faa3eca6.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavutil/vulkan.c | 35 -----------------------------------
libavutil/vulkan.h | 3 ---
2 files changed, 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.
--
2.45.2
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avutil/vulkan: Remove unused ff_vk_create_avbuf()
2025-03-09 16:53 [FFmpeg-devel] [PATCH] avutil/vulkan: Remove unused ff_vk_create_avbuf() Andreas Rheinhardt
@ 2025-03-10 18:43 ` Lynne
0 siblings, 0 replies; 2+ messages in thread
From: Lynne @ 2025-03-10 18:43 UTC (permalink / raw)
To: ffmpeg-devel
On 09/03/2025 17:53, Andreas Rheinhardt wrote:
> Patch attached.
>
> - Andreas
LGTM.
Buffer pools should be used instead of making individual buffers. And
for buffers we import, I've added a new function which takes care of
this in my FFv1 patchset.
_______________________________________________
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".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-10 18:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-09 16:53 [FFmpeg-devel] [PATCH] avutil/vulkan: Remove unused ff_vk_create_avbuf() Andreas Rheinhardt
2025-03-10 18:43 ` Lynne
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