From 6cab974b7b1aece8d17078ef33f8f0923a6c0b8c Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Fri, 21 Apr 2023 08:26:37 +0200 Subject: [PATCH] fixed issue 416, added CDLFB reconfiguration to ISM bitrate switching decoding, under define FIX_416_ISM_BR_SWITCHING --- lib_com/options.h | 1 + lib_dec/ivas_ism_dec.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 5b8ab37e69..047b931d56 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -170,6 +170,7 @@ #define FIX_401_DIRAC_RENDERER_META_READ_INDICES /* Nokia: Issue 401: Fix metadata reading indices in DirAC renderer. */ #define FIX_406_IVAS_POSITION /* Eri: Issue 406: Unify IVAS_POSITION to use IVAS_VECTOR3 instead */ #define REND_DEBUGGING_REVISION /* VA: encapsulate rendering debugging options with DEBUGGING */ +#define FIX_416_ISM_BR_SWITCHING /* FhG: add missing CLDFB reconfig to ISM BR switching */ diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index e6571e83d9..3cdb68366f 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -59,12 +59,19 @@ static ivas_error ivas_ism_bitrate_switching( ivas_error error; int32_t element_brate_tmp[MAX_NUM_OBJECTS]; int16_t nSCE_old, nCPE_old; +#ifdef FIX_416_ISM_BR_SWITCHING + int16_t numCldfbAnalyses_old, numCldfbSyntheses_old; +#endif error = IVAS_ERR_OK; nCPE_old = st_ivas->nCPE; nSCE_old = st_ivas->nSCE; +#ifdef FIX_416_ISM_BR_SWITCHING + ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old ); +#endif + #ifdef NCHAN_ISM_PARAMETER if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->nchan_ism, NULL, NULL, NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK ) #else @@ -229,6 +236,17 @@ static ivas_error ivas_ism_bitrate_switching( } } +#ifdef FIX_416_ISM_BR_SWITCHING + /*-----------------------------------------------------------------* + * CLDFB instances + *-----------------------------------------------------------------*/ + + if ( ( error = ivas_cldfb_dec_reconfig( st_ivas, nchan_transport_old, numCldfbAnalyses_old, numCldfbSyntheses_old ) ) != IVAS_ERR_OK ) + { + return error; + } +#endif + return error; } -- GitLab