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 6789df8b4e avutil/hwcontext_vulkan: disable host image transfers for 
multi-plane images on NVIDIA
6789df8b4e is described below

commit 6789df8b4e87d95c586206eb372b3a460a64d0d2
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Fri Sep 11 00:31:48 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Sat Sep 12 23:50:56 2026 +0000

    avutil/hwcontext_vulkan: disable host image transfers for multi-plane 
images on NVIDIA
    
    NVIDIA's host image copy resolves every plane's parameters as if it
    were plane 0, so a plain hwupload,hwdownload round trip returns a
    corrupted frame. Frames with one image per plane and single-plane
    formats are not affected. Exclude HIC for multi-plane images instead of
    restoring the full blocklist dropped in 4ec050211a.
    
    Fixes: https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/24451
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavutil/hwcontext_vulkan.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index aa0efdd755..2859ee17c3 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -3033,6 +3033,18 @@ static int vulkan_host_transfer_usable(AVHWFramesContext 
*hwfc)
     FFVulkanFunctions *vk = &p->vkctx.vkfn;
     VkResult ret;
 
+    /* NVIDIA's host image copy resolves every plane's parameters as if it were
+     * plane 0, so every plane but the first is corrupted on both upload and
+     * download. Frames with one image per plane are unaffected.
+     */
+    const struct FFVkFormatEntry *fmt = vk_find_format_entry(hwfc->sw_format);
+    if (p->dprops.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY &&
+        fmt && fmt->vk_planes > 1 && hwctx->format[0] == fmt->vkf) {
+        av_log(hwfc, AV_LOG_VERBOSE, "Disabling host image transfers: "
+               "NVIDIA drivers mishandle multi-plane images\n");
+        return 0;
+    }
+
     const VkImageDrmFormatModifierListCreateInfoEXT *mod_list =
         ff_vk_find_struct(hwctx->create_pnext,
                           
VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT);

-- 
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]

Reply via email to