From 5ac4de11b1f4c56c90591240701f67ff01249630 Mon Sep 17 00:00:00 2001 From: Chen_Hao5 Date: Wed, 25 Sep 2024 16:05:58 +0800 Subject: [PATCH] [Encode] Remove per frame SeqParams and only update for new ones There is VPL patch to remove per frame SeqParams and keep this params submitted with I frames or with BRC reset scenarios. Accordingly Driver only need to update new seq params. --- .../common/codec/hal/enc/av1/features/encode_av1_brc.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/media_softlet/agnostic/common/codec/hal/enc/av1/features/encode_av1_brc.cpp b/media_softlet/agnostic/common/codec/hal/enc/av1/features/encode_av1_brc.cpp index 5a7a67fa9b8..5b9caf55b05 100644 --- a/media_softlet/agnostic/common/codec/hal/enc/av1/features/encode_av1_brc.cpp +++ b/media_softlet/agnostic/common/codec/hal/enc/av1/features/encode_av1_brc.cpp @@ -70,7 +70,12 @@ namespace encode EncoderParams *encodeParams = (EncoderParams *)params; - ENCODE_CHK_STATUS_RETURN(SetSequenceStructs()); + // If new seq, need to set sequence structs + // If RATECONTROL_CQL, need to update quality and bitrate .etc + if (encodeParams->bNewSeq || m_basicFeature->m_av1SeqParams->RateControlMethod == RATECONTROL_CQL) + { + ENCODE_CHK_STATUS_RETURN(SetSequenceStructs()); + } const auto& seqParams = *m_basicFeature->m_av1SeqParams;