From 67a606c61194a3a21aedd703e3523325e08f8cfb Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 3 Mar 2023 14:26:05 +1000 Subject: [PATCH] radv/video: fix used for reference flags. These weren't getting programmed properly for interlaced videos Fixes: 3e2c768aa860 ("radv/vcn: enable dynamic dpb tier 2 for h264/h265 on navi21+") Part-of: --- src/amd/vulkan/radv_video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_video.c b/src/amd/vulkan/radv_video.c index 1bd5364..e8d939c 100644 --- a/src/amd/vulkan/radv_video.c +++ b/src/amd/vulkan/radv_video.c @@ -709,7 +709,9 @@ static rvcn_dec_message_avc_t get_h264_msg(struct radv_video_session *vid, result.used_for_reference_flags |= (1 << (2 * idx)); if (dpb_slot->pStdReferenceInfo->flags.bottom_field_flag) result.used_for_reference_flags |= (1 << (2 * idx + 1)); - else + + if (!dpb_slot->pStdReferenceInfo->flags.top_field_flag && + !dpb_slot->pStdReferenceInfo->flags.bottom_field_flag) result.used_for_reference_flags |= (3 << (2 * idx)); if (dpb_slot->pStdReferenceInfo->flags.used_for_long_term_reference) -- 2.7.4