From 0f35ba20f2f357637fe1d805a26b0fe110201a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Wed, 27 Nov 2024 15:07:03 +0100 Subject: [PATCH] EncoderConfigAV1: Fix GetMaxBFrameCount MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To support driver which does not support B Frame, GetMaxBFrameCount has been introduced in https://github.com/nvpro-samples/vk_video_samples/pull/103 but AV1 was not supported yet. Signed-off-by: Stéphane Cerveau --- vk_video_encoder/libs/VkVideoEncoder/VkEncoderConfigAV1.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vk_video_encoder/libs/VkVideoEncoder/VkEncoderConfigAV1.h b/vk_video_encoder/libs/VkVideoEncoder/VkEncoderConfigAV1.h index 39c3e8f..f4e3e8d 100644 --- a/vk_video_encoder/libs/VkVideoEncoder/VkEncoderConfigAV1.h +++ b/vk_video_encoder/libs/VkVideoEncoder/VkEncoderConfigAV1.h @@ -117,6 +117,8 @@ struct EncoderConfigAV1 : public EncoderConfig { virtual bool InitRateControl() override; + virtual uint8_t GetMaxBFrameCount() { return static_cast(av1EncodeCapabilities.maxBidirectionalCompoundReferenceCount); } + bool GetRateControlParameters(VkVideoEncodeRateControlInfoKHR* rcInfo, VkVideoEncodeRateControlLayerInfoKHR* rcLayerInfo, VkVideoEncodeAV1RateControlInfoKHR* rcInfoAV1,