From cd61f09a4d08faf2b1025160a1bbeedb6f0232e8 Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Fri, 25 Aug 2023 10:30:37 +0530 Subject: [PATCH 1/7] Fix issue#736: FOA BR switchig decoding crashes in ivas_spar_to_dirac --- lib_com/options.h | 2 +- lib_dec/ivas_sba_dec.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index be3261f808..92e8296c50 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -167,7 +167,7 @@ #define FIX_718_JBM_MD_UDPATE /* Fhg: fix issue #718, wrong setting of the update flag in the TD obj renderer in the JBM path */ #define FIX_719_CRASH_IN_CLEANUP /* VA: issue 719: fix Decoder crash after call to goto to cleanup */ - +#define FIX_736_FOA_BR_SWITCH /* Dlb: fix issue 736: FOA BR switching crash at decoder*/ /* ################## End BE DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 500b95f5e8..81f7e0a8eb 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -273,8 +273,11 @@ ivas_error ivas_sba_dec_reconfigure( { ivas_binRenderer_close( &st_ivas->hBinRenderer ); } - +#ifndef FIX_736_FOA_BR_SWITCH if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) || ( last_ivas_total_brate > IVAS_256k && ivas_total_brate <= IVAS_256k ) || ( last_ivas_total_brate <= IVAS_256k && ivas_total_brate > IVAS_256k ) ) +#else + if ( ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) && ( ( last_ivas_total_brate > IVAS_256k && ivas_total_brate <= IVAS_256k ) || ( last_ivas_total_brate <= IVAS_256k && ivas_total_brate > IVAS_256k ) ) ) +#endif { DIRAC_CONFIG_FLAG flag_config; -- GitLab From a8b196a48fc8e80a01526f580cc2100f9a7c2637 Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Fri, 25 Aug 2023 13:41:06 +0530 Subject: [PATCH 2/7] Modifications to resolve pipeline errors --- lib_dec/ivas_sba_dec.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 81f7e0a8eb..386244c8da 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -276,7 +276,7 @@ ivas_error ivas_sba_dec_reconfigure( #ifndef FIX_736_FOA_BR_SWITCH if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) || ( last_ivas_total_brate > IVAS_256k && ivas_total_brate <= IVAS_256k ) || ( last_ivas_total_brate <= IVAS_256k && ivas_total_brate > IVAS_256k ) ) #else - if ( ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) && ( ( last_ivas_total_brate > IVAS_256k && ivas_total_brate <= IVAS_256k ) || ( last_ivas_total_brate <= IVAS_256k && ivas_total_brate > IVAS_256k ) ) ) + if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) #endif { DIRAC_CONFIG_FLAG flag_config; @@ -302,12 +302,22 @@ ivas_error ivas_sba_dec_reconfigure( mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpatParamRendCom->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); } } - - if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) ) != IVAS_ERR_OK ) +#ifdef FIX_736_FOA_BR_SWITCH + else { - return error; +#endif + if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) ) != IVAS_ERR_OK ) + { + return error; + } +#ifdef FIX_736_FOA_BR_SWITCH + if ( ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ) + { + set_c( (int8_t *) st_ivas->hQMetaData->twoDirBands, (int8_t) 1, st_ivas->hQMetaData->q_direction[0].cfg.nbands ); + st_ivas->hQMetaData->numTwoDirBands = (uint8_t) st_ivas->hQMetaData->q_direction[0].cfg.nbands; + } } - +#endif if ( st_ivas->renderer_type == RENDERER_DISABLE ) { ivas_dirac_rend_close( &( st_ivas->hDirACRend ) ); -- GitLab From 5fc451d40fa795ae5d8cdb672d35079a208c851b Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Fri, 25 Aug 2023 15:17:49 +0530 Subject: [PATCH 3/7] Resolving the bitstream mismatch between encoder and decoder while BR switching for FOA long vector. --- lib_dec/ivas_sba_dec.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 386244c8da..3077bebf6b 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -214,6 +214,18 @@ ivas_error ivas_sba_dec_reconfigure( return error; } } +#ifdef FIX_736_FOA_BR_SWITCH + if ( ( hSpar->hPCA == NULL ) && + ( st_ivas->hDecoderConfig->ivas_total_brate == PCA_BRATE && sba_order_internal == 1 ) ) + { + if ( ( hSpar->hPCA = (PCA_DEC_STATE *) malloc( sizeof( PCA_DEC_STATE ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for PCA decoder" ); + } + + ivas_pca_dec_init( hSpar->hPCA ); + } +#endif ivas_spar_config( ivas_total_brate, sba_order_internal, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &hSpar->core_nominal_brate, st_ivas->sid_format ); } else -- GitLab From 4b7c6a8babc6e18305170c402a628416c313aca8 Mon Sep 17 00:00:00 2001 From: Shikha Shetgeri <100861@ittiam.com> Date: Mon, 28 Aug 2023 13:46:00 +0530 Subject: [PATCH 4/7] addressing review comments --- lib_dec/ivas_sba_dec.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 3077bebf6b..488c21d0f0 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -183,7 +183,11 @@ ivas_error ivas_sba_dec_reconfigure( if ( hSpar != NULL ) { +#ifdef FIX_736_FOA_BR_SWITCH + if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( st_ivas->sba_order == 1 ) ) ) +#else if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( sba_order_internal != 1 ) ) ) +#endif { free( st_ivas->hSpar->hPCA ); hSpar->hPCA = NULL; @@ -216,7 +220,7 @@ ivas_error ivas_sba_dec_reconfigure( } #ifdef FIX_736_FOA_BR_SWITCH if ( ( hSpar->hPCA == NULL ) && - ( st_ivas->hDecoderConfig->ivas_total_brate == PCA_BRATE && sba_order_internal == 1 ) ) + ( st_ivas->hDecoderConfig->ivas_total_brate == PCA_BRATE && st_ivas->sba_order == 1 ) && ( st_ivas->ivas_format == SBA_FORMAT ) ) { if ( ( hSpar->hPCA = (PCA_DEC_STATE *) malloc( sizeof( PCA_DEC_STATE ) ) ) == NULL ) { @@ -285,6 +289,12 @@ ivas_error ivas_sba_dec_reconfigure( { ivas_binRenderer_close( &st_ivas->hBinRenderer ); } +#ifdef FIX_736_FOA_BR_SWITCH + if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) ) != IVAS_ERR_OK ) + { + return error; + } +#endif #ifndef FIX_736_FOA_BR_SWITCH if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) || ( last_ivas_total_brate > IVAS_256k && ivas_total_brate <= IVAS_256k ) || ( last_ivas_total_brate <= IVAS_256k && ivas_total_brate > IVAS_256k ) ) #else @@ -318,16 +328,26 @@ ivas_error ivas_sba_dec_reconfigure( else { #endif +#ifndef FIX_736_FOA_BR_SWITCH if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) ) != IVAS_ERR_OK ) { return error; } +#endif #ifdef FIX_736_FOA_BR_SWITCH + int16_t band_grouping[IVAS_MAX_NUM_BANDS + 1]; + + st_ivas->hSpar->enc_param_start_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND ); if ( ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ) { + st_ivas->hSpar->enc_param_start_band = 0; + set_c( (int8_t *) st_ivas->hQMetaData->twoDirBands, (int8_t) 1, st_ivas->hQMetaData->q_direction[0].cfg.nbands ); st_ivas->hQMetaData->numTwoDirBands = (uint8_t) st_ivas->hQMetaData->q_direction[0].cfg.nbands; } + + ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), + st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0 ); } #endif if ( st_ivas->renderer_type == RENDERER_DISABLE ) -- GitLab From 4145d85d39bcedf17fa79cdedf7e66cc07eeb3dc Mon Sep 17 00:00:00 2001 From: Shikha Shetgeri <100861@ittiam.com> Date: Mon, 28 Aug 2023 17:53:45 +0530 Subject: [PATCH 5/7] minor fix --- lib_dec/ivas_sba_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 488c21d0f0..1516eeb491 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -184,7 +184,7 @@ ivas_error ivas_sba_dec_reconfigure( if ( hSpar != NULL ) { #ifdef FIX_736_FOA_BR_SWITCH - if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( st_ivas->sba_order == 1 ) ) ) + if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( st_ivas->sba_order != 1 ) ) ) #else if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( sba_order_internal != 1 ) ) ) #endif -- GitLab From b85d2882462774ccaefc01ca6eba6a77e499c958 Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Wed, 30 Aug 2023 10:43:06 +0530 Subject: [PATCH 6/7] Renamed the switch with CR_* tag --- lib_com/options.h | 2 +- lib_dec/ivas_sba_dec.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 92e8296c50..8fa68bba2a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -167,7 +167,6 @@ #define FIX_718_JBM_MD_UDPATE /* Fhg: fix issue #718, wrong setting of the update flag in the TD obj renderer in the JBM path */ #define FIX_719_CRASH_IN_CLEANUP /* VA: issue 719: fix Decoder crash after call to goto to cleanup */ -#define FIX_736_FOA_BR_SWITCH /* Dlb: fix issue 736: FOA BR switching crash at decoder*/ /* ################## End BE DEVELOPMENT switches ######################### */ @@ -180,6 +179,7 @@ #define CR_FIX_586_BPF_DFT_MEM /* FhG: issue 586: set input memory of DFT analysis of BPF signal to zero for HQ core to fix issue with PLC and bitrate switching */ #define CR_FIX_ISM_DTX_INFINITE_CNG_ON_TRAILING_SILENCE /* FhG: fix for cng in ISM DTX on sudden silence periods */ #define CR_FIX_698_SBA_MSAN /* Dlb: issue 698: Uninitialized memory read in SBA init */ +#define CR_FIX_736_FOA_BR_SWITCH /* Dlb: fix issue 736: FOA BR switching crash at decoder*/ /* ##################### End NON-BE CR switches ########################### */ diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 1516eeb491..72a4a40ec1 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -183,7 +183,7 @@ ivas_error ivas_sba_dec_reconfigure( if ( hSpar != NULL ) { -#ifdef FIX_736_FOA_BR_SWITCH +#ifdef CR_FIX_736_FOA_BR_SWITCH if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( st_ivas->sba_order != 1 ) ) ) #else if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( sba_order_internal != 1 ) ) ) @@ -218,7 +218,7 @@ ivas_error ivas_sba_dec_reconfigure( return error; } } -#ifdef FIX_736_FOA_BR_SWITCH +#ifdef CR_FIX_736_FOA_BR_SWITCH if ( ( hSpar->hPCA == NULL ) && ( st_ivas->hDecoderConfig->ivas_total_brate == PCA_BRATE && st_ivas->sba_order == 1 ) && ( st_ivas->ivas_format == SBA_FORMAT ) ) { @@ -289,13 +289,13 @@ ivas_error ivas_sba_dec_reconfigure( { ivas_binRenderer_close( &st_ivas->hBinRenderer ); } -#ifdef FIX_736_FOA_BR_SWITCH +#ifdef CR_FIX_736_FOA_BR_SWITCH if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) ) != IVAS_ERR_OK ) { return error; } #endif -#ifndef FIX_736_FOA_BR_SWITCH +#ifndef CR_FIX_736_FOA_BR_SWITCH if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) || ( last_ivas_total_brate > IVAS_256k && ivas_total_brate <= IVAS_256k ) || ( last_ivas_total_brate <= IVAS_256k && ivas_total_brate > IVAS_256k ) ) #else if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) @@ -324,17 +324,17 @@ ivas_error ivas_sba_dec_reconfigure( mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpatParamRendCom->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); } } -#ifdef FIX_736_FOA_BR_SWITCH +#ifdef CR_FIX_736_FOA_BR_SWITCH else { #endif -#ifndef FIX_736_FOA_BR_SWITCH +#ifndef CR_FIX_736_FOA_BR_SWITCH if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) ) != IVAS_ERR_OK ) { return error; } #endif -#ifdef FIX_736_FOA_BR_SWITCH +#ifdef CR_FIX_736_FOA_BR_SWITCH int16_t band_grouping[IVAS_MAX_NUM_BANDS + 1]; st_ivas->hSpar->enc_param_start_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND ); -- GitLab From 9ce21a9dbeb1caa182003dc708766d08cfe2f767 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 31 Aug 2023 16:08:19 +0200 Subject: [PATCH 7/7] rename define CR_FIX_736_FOA_BR_SWITCH to NONBE_FIX_736_FOA_BR_SWITCH --- lib_com/options.h | 1 + lib_dec/ivas_sba_dec.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 35c8b466de..d945683e41 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -165,6 +165,7 @@ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ +#define NONBE_FIX_736_FOA_BR_SWITCH /* FhG/Dlb : Issue 736: FOA bitrate switching decoding crashes in in ivas_spar_to_dirac */ #define NONBE_FIX_746_NONDIEGETIC_MD /* Eri: Issue 746: The non-diegetic panning flag affects the encoder bitstream even if extended metadata is not enabled. Crashes the decoder.*/ /* ##################### End NON-BE switches ############################# */ diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 3860d73091..29136f5a93 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -183,7 +183,7 @@ ivas_error ivas_sba_dec_reconfigure( if ( hSpar != NULL ) { -#ifdef CR_FIX_736_FOA_BR_SWITCH +#ifdef NONBE_FIX_736_FOA_BR_SWITCH if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( st_ivas->sba_order != 1 ) ) ) #else if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( sba_order_internal != 1 ) ) ) @@ -218,7 +218,7 @@ ivas_error ivas_sba_dec_reconfigure( return error; } } -#ifdef CR_FIX_736_FOA_BR_SWITCH +#ifdef NONBE_FIX_736_FOA_BR_SWITCH if ( ( hSpar->hPCA == NULL ) && ( st_ivas->hDecoderConfig->ivas_total_brate == PCA_BRATE && st_ivas->sba_order == 1 ) && ( st_ivas->ivas_format == SBA_FORMAT ) ) { @@ -289,13 +289,13 @@ ivas_error ivas_sba_dec_reconfigure( { ivas_binRenderer_close( &st_ivas->hBinRenderer ); } -#ifdef CR_FIX_736_FOA_BR_SWITCH +#ifdef NONBE_FIX_736_FOA_BR_SWITCH if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) ) != IVAS_ERR_OK ) { return error; } #endif -#ifndef CR_FIX_736_FOA_BR_SWITCH +#ifndef NONBE_FIX_736_FOA_BR_SWITCH if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) || ( last_ivas_total_brate > IVAS_256k && ivas_total_brate <= IVAS_256k ) || ( last_ivas_total_brate <= IVAS_256k && ivas_total_brate > IVAS_256k ) ) #else if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) @@ -324,17 +324,17 @@ ivas_error ivas_sba_dec_reconfigure( mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpatParamRendCom->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); } } -#ifdef CR_FIX_736_FOA_BR_SWITCH +#ifdef NONBE_FIX_736_FOA_BR_SWITCH else { #endif -#ifndef CR_FIX_736_FOA_BR_SWITCH +#ifndef NONBE_FIX_736_FOA_BR_SWITCH if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) ) != IVAS_ERR_OK ) { return error; } #endif -#ifdef CR_FIX_736_FOA_BR_SWITCH +#ifdef NONBE_FIX_736_FOA_BR_SWITCH int16_t band_grouping[IVAS_MAX_NUM_BANDS + 1]; st_ivas->hSpar->enc_param_start_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND ); -- GitLab