[FFmpeg-cvslog] vulkan_decode: force layered_dpb to 0 when dedicated_dpb is 0
Lynne
git at videolan.org
Sun Aug 11 06:21:15 EEST 2024
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Sat Aug 10 17:13:57 2024 +0200| [ca591e6b50ee616fc36711cc66d594e51209dddb] | committer: Lynne
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.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ca591e6b50ee616fc36711cc66d594e51209dddb
---
libavcodec/vulkan_decode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index 67d9b27242..e86f128635 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -923,9 +923,9 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_
return AVERROR_EXTERNAL;
}
- /* TODO: make dedicated_dpb tunable */
dec->dedicated_dpb = !(dec_caps->flags & VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR);
- dec->layered_dpb = !(caps->flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR);
+ dec->layered_dpb = !dec->dedicated_dpb ? 0 :
+ !(caps->flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR);
if (dec->dedicated_dpb) {
fmt_info.imageUsage = VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR;
More information about the ffmpeg-cvslog
mailing list