hwcontext_vulkan: correctly set stride for host image uploads

Cursed.
This commit is contained in:
Lynne
2026-02-14 14:42:09 +01:00
parent 6452e0c56e
commit 61ca28d6e0

View File

@@ -4522,10 +4522,10 @@ static int vulkan_transfer_host(AVHWFramesContext *hwfc, AVFrame *hwf,
for (int i = 0; i < planes; i++) {
int img_idx = FFMIN(i, (nb_images - 1));
uint32_t p_w, p_h;
get_plane_wh(&p_w, &p_h, swf->format,
swf->linesize[i]/desc->comp[i].step, swf->height, i);
get_plane_wh(&p_w, &p_h, swf->format, swf->width, swf->height, i);
region_info.pHostPointer = swf->data[i];
region_info.memoryRowLength = swf->linesize[i] / desc->comp[i].step;
region_info.imageSubresource.aspectMask = ff_vk_aspect_flag(hwf, i);
region_info.imageExtent = (VkExtent3D){ p_w, p_h, 1 };
copy_info.dstImage = hwf_vk->img[img_idx];