[FFmpeg-cvslog] vulkan_decode: fix another validation issue

Lynne git at videolan.org
Wed Oct 25 22:47:33 EEST 2023


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Wed Oct 25 01:32:20 2023 +0200| [0b3616231d330ff25b28a20795394777a3f91b6d] | committer: Lynne

vulkan_decode: fix another validation issue

Surprising no one, the insane usage rule has a catch.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b3616231d330ff25b28a20795394777a3f91b6d
---

 libavcodec/vulkan_decode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index c01eeb9cdc..7f575d1283 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -449,7 +449,8 @@ int ff_vk_decode_frame(AVCodecContext *avctx,
         .srcAccessMask = VK_ACCESS_2_NONE,
         .dstAccessMask = VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR,
         .oldLayout = vkf->layout[0],
-        .newLayout = vp->dpb_frame ? VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR :
+        .newLayout = (dec->layered_dpb && vp->dpb_frame) ?
+                     VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR :
                      VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR, /* Spec, 07252 utter madness */
         .srcQueueFamilyIndex = vkf->queue_family[0],
         .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,



More information about the ffmpeg-cvslog mailing list