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.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -923,9 +923,9 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_ · 922 unmodified lines | |||
| 923 | return AVERROR_EXTERNAL; | 923 | return AVERROR_EXTERNAL; |
| 924 | } | 924 | } |
| 925 | 925 | ||
| 926 | /* TODO: make dedicated_dpb tunable */ | ||
| 927 | dec->dedicated_dpb = !(dec_caps->flags & VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR); | 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 | if (dec->dedicated_dpb) { | 930 | if (dec->dedicated_dpb) { |
| 931 | fmt_info.imageUsage = VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR; | 931 | fmt_info.imageUsage = VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR; |