From 34e019bfedaa5a64f268d8f9263db352c0a8f67f Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sun, 7 Jan 2024 07:23:06 +0100 Subject: [PATCH] utils/libav: Use Vulkan HW frames context dimensions Fixes mapping frames with padding (eg. 1080p ~ 1088). --- src/include/libplacebo/utils/libav_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/libplacebo/utils/libav_internal.h b/src/include/libplacebo/utils/libav_internal.h index b2711f3d..4c269e5d 100644 --- a/src/include/libplacebo/utils/libav_internal.h +++ b/src/include/libplacebo/utils/libav_internal.h @@ -1137,8 +1137,8 @@ static bool pl_map_avframe_vulkan(pl_gpu gpu, struct pl_frame *out, plane->texture = pl_vulkan_wrap(gpu, pl_vulkan_wrap_params( .image = vkf->img[n], - .width = AV_CEIL_RSHIFT(frame->width, chroma ? desc->log2_chroma_w : 0), - .height = AV_CEIL_RSHIFT(frame->height, chroma ? desc->log2_chroma_h : 0), + .width = AV_CEIL_RSHIFT(hwfc->width, chroma ? desc->log2_chroma_w : 0), + .height = AV_CEIL_RSHIFT(hwfc->height, chroma ? desc->log2_chroma_h : 0), .format = vk_fmt[n], .usage = vkfc->usage, ));