From 4a88137b2f8faa4ccfbc0832e3364be914174765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Wed, 22 May 2024 14:50:11 +0200 Subject: [PATCH] vulkanh265dec: fix reference set `StdVideoDecodeH265PictureInfo.flags.IsReference` refers to section 3.132 ITU-T H.265 specification: reference picture: A picture that is a short-term reference picture or a long-term reference picture. `GstH265Picture.ref` doesn't reflect this, but we need to query the NAL type of the processed slice. This patch fixes the validation layer error `VUID-vkCmdBeginVideoCodingKHR-slotIndex-07239` while using the NVIDIA driver. Part-of: --- subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c b/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c index 64d53d8876..a5d5d1de27 100644 --- a/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c +++ b/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c @@ -1425,7 +1425,7 @@ gst_vulkan_h265_decoder_start_picture (GstH265Decoder * decoder, .flags = { .IrapPicFlag = GST_H265_IS_NAL_TYPE_IRAP (slice->nalu.type), .IdrPicFlag = GST_H265_IS_NAL_TYPE_IDR (slice->nalu.type), - .IsReference = picture->ref, + .IsReference = picture->RapPicFlag ? 1 : slice->nalu.type & 1, .short_term_ref_pic_set_sps_flag = slice->header.short_term_ref_pic_set_sps_flag, },