This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit 10aa978fff696c87c961aba810e495c830feeb8f Author: Philip Langdale <[email protected]> AuthorDate: Mon Jul 6 09:24:21 2026 -0700 Commit: Michael Niedermayer <[email protected]> CommitDate: Sat Nov 28 09:24:22 2026 +0100 avutil/hwcontext_vulkan: fix CUDA interop for packed formats The current export_to_cuda logic only works for planar and semi-planar formats. When presented with a single plane packed format, it will incorrectly calculate the number of channels, resulting in failures later on when cuda code tries to access the frame. Let's fix it. (cherry picked from commit 927f205eb8de44fc106a36f00ea9d713c813a4f3) Signed-off-by: Michael Niedermayer <[email protected]> --- libavutil/hwcontext_vulkan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index ea646e8101..d235a87e30 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -3953,6 +3953,7 @@ static int vulkan_export_to_cuda(AVHWFramesContext *hwfc, CudaFunctions *cu = cu_internal->cuda_dl; CUarray_format cufmt = desc->comp[0].depth > 8 ? CU_AD_FORMAT_UNSIGNED_INT16 : CU_AD_FORMAT_UNSIGNED_INT8; + const int elem_size = 1 + desc->comp[0].depth > 8; dst_f = (AVVkFrame *)frame->data[0]; dst_int = dst_f->internal; @@ -3997,7 +3998,7 @@ static int vulkan_export_to_cuda(AVHWFramesContext *hwfc, .arrayDesc = { .Depth = 0, .Format = cufmt, - .NumChannels = 1 + ((planes == 2) && i), + .NumChannels = desc->comp[i].step / elem_size, .Flags = 0, }, .numLevels = 1, -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
