This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 3110b21964fa8317abd1a33975ae6233a30c1e7c Author: Lynne <[email protected]> AuthorDate: Wed Sep 9 02:59:13 2026 +0900 Commit: Lynne <[email protected]> CommitDate: Sun Sep 20 16:45:59 2026 +0900 vulkan_apv: remove unnecessary image clear We moved to using a dedicated buffer for the intermediate data. --- libavcodec/vulkan/apv_decode.comp.glsl | 2 +- libavcodec/vulkan_apv.c | 30 +++--------------------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/libavcodec/vulkan/apv_decode.comp.glsl b/libavcodec/vulkan/apv_decode.comp.glsl index fba896f696..914c130b0c 100644 --- a/libavcodec/vulkan/apv_decode.comp.glsl +++ b/libavcodec/vulkan/apv_decode.comp.glsl @@ -192,7 +192,7 @@ void decode_block(uint cbase, int cstride, ivec2 pos, uint comp) if (coeff_zero_run > APV_BLK_COEFFS - scan_pos) return; - /* image was already pre-cleared to all zeroes */ + /* the coefficient buffer was zero-filled, so runs need no writes */ scan_pos += coeff_zero_run; prev_run = coeff_zero_run; diff --git a/libavcodec/vulkan_apv.c b/libavcodec/vulkan_apv.c index fe115428c6..1ad5ab0a41 100644 --- a/libavcodec/vulkan_apv.c +++ b/libavcodec/vulkan_apv.c @@ -213,34 +213,10 @@ static int vk_apv_end_frame(AVCodecContext *avctx) vkf->layout[0] = VK_IMAGE_LAYOUT_UNDEFINED; vkf->access[0] = VK_ACCESS_2_NONE; - ff_vk_frame_barrier(&ctx->s, exec, apv->output_frame, - img_bar, &nb_img_bar, - VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, - VK_PIPELINE_STAGE_2_CLEAR_BIT, - VK_ACCESS_2_TRANSFER_WRITE_BIT, - VK_IMAGE_LAYOUT_GENERAL, - VK_QUEUE_FAMILY_IGNORED); - vk->CmdPipelineBarrier2(exec->buf, &(VkDependencyInfo) { - .sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO, - .pImageMemoryBarriers = img_bar, - .imageMemoryBarrierCount = nb_img_bar, - }); - nb_img_bar = 0; - - /* Zero frame */ - for (int i = 0; i < ff_vk_count_images(vkf); i++) - vk->CmdClearColorImage(exec->buf, vkf->img[i], - VK_IMAGE_LAYOUT_GENERAL, - &((VkClearColorValue) { 0 }), - 1, &((VkImageSubresourceRange) { - .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, - .levelCount = 1, - .layerCount = 1, - })); - - /* Wait for the frame to get zeroed out before continuing */ + /* The IDCT shader writes every sample of the coded area, so the frame + * does not need to be cleared first. */ ff_vk_frame_barrier(&ctx->s, exec, apv->output_frame, img_bar, &nb_img_bar, - VK_PIPELINE_STAGE_2_CLEAR_BIT, + VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT, VK_IMAGE_LAYOUT_GENERAL, -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
