Skip to content

Commit

Permalink
Encoder: fallback to layered if separate not present
Browse files Browse the repository at this point in the history
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 <scerveau@igalia.com>
  • Loading branch information
dabrain34 committed Oct 25, 2024
1 parent 17d7b2d commit 0f6f166
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vk_video_encoder/libs/VkVideoEncoder/VkVideoEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ VkResult VkVideoEncoder::InitEncoder(VkSharedBaseObj<EncoderConfig>& 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
Expand Down

0 comments on commit 0f6f166

Please sign in to comment.