From 0f6f1666d0612126879a78f8dc835b28e8d3489c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Wed, 16 Oct 2024 12:18:21 +0200 Subject: [PATCH] Encoder: fallback to layered if separate not present MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR is optional support, the DPB mode should fallback to layered dpb if the implementation does not support separate dpb. Signed-off-by: Stéphane Cerveau --- vk_video_encoder/libs/VkVideoEncoder/VkVideoEncoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vk_video_encoder/libs/VkVideoEncoder/VkVideoEncoder.cpp b/vk_video_encoder/libs/VkVideoEncoder/VkVideoEncoder.cpp index fd91088..a1f7ea5 100644 --- a/vk_video_encoder/libs/VkVideoEncoder/VkVideoEncoder.cpp +++ b/vk_video_encoder/libs/VkVideoEncoder/VkVideoEncoder.cpp @@ -351,8 +351,8 @@ VkResult VkVideoEncoder::InitEncoder(VkSharedBaseObj& encoderConf if (encoderConfig->useDpbArray == false && (encoderConfig->videoCapabilities.flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR) == 0) { std::cout << "Separate DPB was requested, but the implementation does not support it!" << std::endl; - assert(!"Separate DPB is not supported"); - return VK_ERROR_INITIALIZATION_FAILED; + std::cout << "Fallback to layered DPB!" << std::endl; + encoderConfig->useDpbArray = true; } // Reconfigure the gopStructure structure because the device may not support