This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 713e3c4f918cdf37d7f3ad921c536ac749835733 Author: Lynne <[email protected]> AuthorDate: Mon Jan 19 11:33:02 2026 +0100 Commit: Lynne <[email protected]> CommitDate: Mon Jan 19 16:37:16 2026 +0100 vulkan_decode: do not align single-plane images to subsampling Unlike multiplane images, single-plane images do not need to be aligned to chroma width. Saves a bit of memory. --- libavcodec/vulkan_decode.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c index 5ed963eacc..9ab8d45aa9 100644 --- a/libavcodec/vulkan_decode.c +++ b/libavcodec/vulkan_decode.c @@ -1150,7 +1150,10 @@ int ff_vk_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx) if (err < 0) return err; + frames_ctx->format = AV_PIX_FMT_VULKAN; frames_ctx->sw_format = avctx->sw_pix_fmt; + frames_ctx->width = avctx->coded_width; + frames_ctx->height = avctx->coded_height; if (!DECODER_IS_SDR(avctx->codec_id)) { prof = av_mallocz(sizeof(FFVulkanDecodeProfileData)); @@ -1166,6 +1169,9 @@ int ff_vk_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx) return err; } + const AVPixFmtDescriptor *pdesc = av_pix_fmt_desc_get(frames_ctx->sw_format); + frames_ctx->width = FFALIGN(frames_ctx->width, 1 << pdesc->log2_chroma_w); + frames_ctx->height = FFALIGN(frames_ctx->height, 1 << pdesc->log2_chroma_h); frames_ctx->user_opaque = prof; frames_ctx->free = free_profile_data; @@ -1211,11 +1217,6 @@ int ff_vk_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx) } } - const AVPixFmtDescriptor *pdesc = av_pix_fmt_desc_get(frames_ctx->sw_format); - frames_ctx->width = FFALIGN(avctx->coded_width, 1 << pdesc->log2_chroma_w); - frames_ctx->height = FFALIGN(avctx->coded_height, 1 << pdesc->log2_chroma_h); - frames_ctx->format = AV_PIX_FMT_VULKAN; - hwfc->tiling = VK_IMAGE_TILING_OPTIMAL; hwfc->usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_STORAGE_BIT | _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
