[FFmpeg-cvslog] vulkan_decode: add queue_flags field to specify queue used
Lynne
git at videolan.org
Sun Dec 22 21:26:00 EET 2024
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Tue Dec 3 15:19:35 2024 +0900| [8fbecfd1a044ffd546fefd6d022117d8809d35d4] | committer: Lynne
vulkan_decode: add queue_flags field to specify queue used
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8fbecfd1a044ffd546fefd6d022117d8809d35d4
---
libavcodec/vulkan_av1.c | 1 +
libavcodec/vulkan_decode.c | 2 +-
libavcodec/vulkan_decode.h | 1 +
libavcodec/vulkan_h264.c | 1 +
libavcodec/vulkan_hevc.c | 1 +
5 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c
index 290607d24c..6659f9d812 100644
--- a/libavcodec/vulkan_av1.c
+++ b/libavcodec/vulkan_av1.c
@@ -26,6 +26,7 @@
const FFVulkanDecodeDescriptor ff_vk_dec_av1_desc = {
.codec_id = AV_CODEC_ID_AV1,
.decode_extension = FF_VK_EXT_VIDEO_DECODE_AV1,
+ .queue_flags = VK_QUEUE_VIDEO_DECODE_BIT_KHR,
.decode_op = VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR,
.ext_props = {
.extensionName = VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME,
diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index 8fd97a6dea..4665a330ef 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -1116,7 +1116,7 @@ int ff_vk_decode_init(AVCodecContext *avctx)
/* Create queue context */
vk_desc = get_codecdesc(avctx->codec_id);
- ctx->qf = ff_vk_qf_find(s, VK_QUEUE_VIDEO_DECODE_BIT_KHR, vk_desc->decode_op);
+ ctx->qf = ff_vk_qf_find(s, vk_desc->queue_flags, vk_desc->decode_op);
if (!ctx->qf) {
av_log(avctx, AV_LOG_ERROR, "Decoding of %s is not supported by this device\n",
avcodec_get_name(avctx->codec_id));
diff --git a/libavcodec/vulkan_decode.h b/libavcodec/vulkan_decode.h
index 60f21372c2..1d89db323f 100644
--- a/libavcodec/vulkan_decode.h
+++ b/libavcodec/vulkan_decode.h
@@ -29,6 +29,7 @@
typedef struct FFVulkanDecodeDescriptor {
enum AVCodecID codec_id;
FFVulkanExtensions decode_extension;
+ VkQueueFlagBits queue_flags;
VkVideoCodecOperationFlagBitsKHR decode_op;
VkExtensionProperties ext_props;
diff --git a/libavcodec/vulkan_h264.c b/libavcodec/vulkan_h264.c
index 79447dbb39..1df8f0a208 100644
--- a/libavcodec/vulkan_h264.c
+++ b/libavcodec/vulkan_h264.c
@@ -24,6 +24,7 @@
const FFVulkanDecodeDescriptor ff_vk_dec_h264_desc = {
.codec_id = AV_CODEC_ID_H264,
.decode_extension = FF_VK_EXT_VIDEO_DECODE_H264,
+ .queue_flags = VK_QUEUE_VIDEO_DECODE_BIT_KHR,
.decode_op = VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR,
.ext_props = {
.extensionName = VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME,
diff --git a/libavcodec/vulkan_hevc.c b/libavcodec/vulkan_hevc.c
index e31e0fc8c5..589c3de83d 100644
--- a/libavcodec/vulkan_hevc.c
+++ b/libavcodec/vulkan_hevc.c
@@ -26,6 +26,7 @@
const FFVulkanDecodeDescriptor ff_vk_dec_hevc_desc = {
.codec_id = AV_CODEC_ID_HEVC,
.decode_extension = FF_VK_EXT_VIDEO_DECODE_H265,
+ .queue_flags = VK_QUEUE_VIDEO_DECODE_BIT_KHR,
.decode_op = VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR,
.ext_props = {
.extensionName = VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME,
More information about the ffmpeg-cvslog
mailing list