[FFmpeg-cvslog] vulkan_decode: correct flipped condition in image layout

Lynne git at videolan.org
Wed Oct 25 23:03:02 EEST 2023


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Wed Oct 25 21:56:03 2023 +0200| [70864e6adba636daf4551ba9e65a19eeb93bced1] | committer: Lynne

vulkan_decode: correct flipped condition in image layout

Changed by the previous commit.
Caused validation issues on hardware with !reuse_dpb_dst but not layered_dpb.

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

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

diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index 7f575d1283..a89d84fcaa 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -449,7 +449,7 @@ 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 = (dec->layered_dpb && vp->dpb_frame) ?
+        .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],



More information about the ffmpeg-cvslog mailing list