History

vulkan_decode: force layered_dpb to 0 when dedicated_dpb is 0

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.

Lynne committed 2 years ago

Commit ca591e61 parent 8eac1111 file · +2 −2Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/vulkan_decode.c+2−2
@@ -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;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t