Skip to content

Commit

Permalink
utils/libav: Use Vulkan HW frames context dimensions
Browse files Browse the repository at this point in the history
Fixes mapping frames with padding (eg. 1080p ~ 1088).
  • Loading branch information
nowrep authored and haasn committed Jan 22, 2024
1 parent 4991c69 commit dd14fb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/include/libplacebo/utils/libav_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
));
Expand Down

0 comments on commit dd14fb1

Please sign in to comment.