This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new d09d5afc3a avutil/hwcontext_vulkan: declare cuda as a
transfer-compatible format
d09d5afc3a is described below
commit d09d5afc3aebede25d2d245ee23b75a47ea17c3a
Author: Philip Langdale <[email protected]>
AuthorDate: Wed Jul 8 16:56:34 2026 -0700
Commit: philipl <[email protected]>
CommitDate: Fri Jul 10 04:41:42 2026 +0000
avutil/hwcontext_vulkan: declare cuda as a transfer-compatible format
The cuda hwcontext has listed AV_PIX_FMT_VULKAN among its supported
formats since Vulkan interop was first added, so a device's frame
constraints advertise Vulkan as a transfer-compatible ("sw") format.
This is what allows an hwupload targeting a cuda device to accept a
Vulkan frame as input during format negotiation.
The Vulkan hwcontext never made the reciprocal declaration, so an
hwupload targeting a Vulkan device would not accept a cuda frame, and a
cuda -> Vulkan upload could not be configured even though the transfer
itself is supported. Advertise AV_PIX_FMT_CUDA in the Vulkan frame
constraints to ensure we have consistent behaviour in both directions.
---
libavutil/hwcontext_vulkan.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 3da0d3c04d..90d3d14dbb 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2215,7 +2215,7 @@ static int
vulkan_frames_get_constraints(AVHWDeviceContext *ctx,
NULL, NULL, NULL, NULL,
p->disable_multiplane, 1) >= 0;
}
- constraints->valid_sw_formats = av_malloc_array(count + 1,
+ constraints->valid_sw_formats = av_malloc_array(count + 1 + CONFIG_CUDA,
sizeof(enum
AVPixelFormat));
if (!constraints->valid_sw_formats)
return AVERROR(ENOMEM);
@@ -2230,6 +2230,10 @@ static int
vulkan_frames_get_constraints(AVHWDeviceContext *ctx,
}
}
+#if CONFIG_CUDA
+ constraints->valid_sw_formats[count++] = AV_PIX_FMT_CUDA;
+#endif
+
constraints->valid_sw_formats[count++] = AV_PIX_FMT_NONE;
constraints->min_width = 1;
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]