layered_dpb only makes sense when dedicated_dpb is set to 1. For some mysterious reason, some Nvidia drivers stopped indicating SEPARATE_REFRENCES, but kept the COINCIDE flag, which broke the code.
Unified · Split
| @@ -923,9 +923,9 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_ · 922 unmodified lines | ||
| 923 | 923 | return AVERROR_EXTERNAL; |
| 924 | 924 | } |
| 925 | 925 | |
| 926 | − /* TODO: make dedicated_dpb tunable */ | |
| 927 | 926 | dec->dedicated_dpb = !(dec_caps->flags & VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR); |
| 928 | − dec->layered_dpb = !(caps->flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR); | |
| 927 | + dec->layered_dpb = !dec->dedicated_dpb ? 0 : | |
| 928 | + !(caps->flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR); | |
| 929 | 929 | |
| 930 | 930 | if (dec->dedicated_dpb) { |
| 931 | 931 | fmt_info.imageUsage = VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR; |