mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
hwcontext_vulkan: correctly set stride for host image uploads
Cursed.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user