From eeb61fc843d8c3128667ca5c37769d1da8b03c40 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 29 Nov 2023 14:04:48 +0100 Subject: [PATCH 01/11] re-open SPAR in OSBA BR switching between < and >= 384 kbps --- lib_dec/ivas_sba_dec.c | 7 ++++++- lib_enc/ivas_osba_enc.c | 12 +++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index d5b5d8ff14..1348f7832b 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -304,7 +304,12 @@ ivas_error ivas_sba_dec_reconfigure( hSpar->hPCA = NULL; } - if ( nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) || ( last_ivas_total_brate >= IVAS_512k && ivas_total_brate < IVAS_512k ) || ( last_ivas_total_brate < IVAS_512k && ivas_total_brate >= IVAS_512k ) ) + if ( nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) || + ( ( last_ivas_total_brate >= IVAS_512k && ivas_total_brate < IVAS_512k ) || + ( last_ivas_total_brate < IVAS_512k && ivas_total_brate >= IVAS_512k ) ) || + ( ( last_ivas_total_brate >= IVAS_384k && ivas_total_brate < IVAS_384k ) || + ( last_ivas_total_brate < IVAS_384k && ivas_total_brate >= IVAS_384k ) && st_ivas->ivas_format == SBA_ISM_FORMAT) + ) { ivas_spar_dec_close( &( st_ivas->hSpar ), hDecoderConfig->output_Fs, 1 ); diff --git a/lib_enc/ivas_osba_enc.c b/lib_enc/ivas_osba_enc.c index 675b89c6d6..5797b0e436 100644 --- a/lib_enc/ivas_osba_enc.c +++ b/lib_enc/ivas_osba_enc.c @@ -213,6 +213,13 @@ ivas_error ivas_osba_enc_reconfig( nbands_old = st_ivas->hQMetaData->q_direction->cfg.nbands; ndir_old = st_ivas->hQMetaData->no_directions; + /* + if ( ivas_total_brate == 256000 && hEncoderConfig->last_ivas_total_brate == 384000 ) + { + printf( "cccc" ); + } + */ + if ( ( analysis_order_old != st_ivas->sba_analysis_order ) || ( old_ism_mode != st_ivas->ism_mode ) ) { int16_t i, n_old; @@ -291,7 +298,10 @@ ivas_error ivas_osba_enc_reconfig( { hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; } - if ( nchan_transport_old != st_ivas->nchan_transport || ( ivas_total_brate < IVAS_512k && hEncoderConfig->last_ivas_total_brate >= IVAS_512k ) || ( ivas_total_brate >= IVAS_512k && hEncoderConfig->last_ivas_total_brate < IVAS_512k ) ) + if ( nchan_transport_old != st_ivas->nchan_transport || + ( ivas_total_brate < IVAS_384k && hEncoderConfig->last_ivas_total_brate >= IVAS_384k ) || + ( ivas_total_brate >= IVAS_384k && hEncoderConfig->last_ivas_total_brate < IVAS_384k ) + ) { /* FB mixer handle */ if ( hDirAC->hFbMixer != NULL ) -- GitLab From 7526d932a462d35982533b1fdfb2e6156d4e26a1 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 29 Nov 2023 14:19:16 +0100 Subject: [PATCH 02/11] fix compiler warning --- lib_dec/ivas_sba_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 1348f7832b..a387f94d5e 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -307,8 +307,8 @@ ivas_error ivas_sba_dec_reconfigure( if ( nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) || ( ( last_ivas_total_brate >= IVAS_512k && ivas_total_brate < IVAS_512k ) || ( last_ivas_total_brate < IVAS_512k && ivas_total_brate >= IVAS_512k ) ) || - ( ( last_ivas_total_brate >= IVAS_384k && ivas_total_brate < IVAS_384k ) || - ( last_ivas_total_brate < IVAS_384k && ivas_total_brate >= IVAS_384k ) && st_ivas->ivas_format == SBA_ISM_FORMAT) + ( ( ( last_ivas_total_brate >= IVAS_384k && ivas_total_brate < IVAS_384k ) || + ( last_ivas_total_brate < IVAS_384k && ivas_total_brate >= IVAS_384k ) ) && st_ivas->ivas_format == SBA_ISM_FORMAT) ) { ivas_spar_dec_close( &( st_ivas->hSpar ), hDecoderConfig->output_Fs, 1 ); -- GitLab From 5669a04a63059ffae6fd6c6836ffa779d0fa614f Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 29 Nov 2023 15:08:21 +0100 Subject: [PATCH 03/11] re-open SPAR encoder in OSBA bitrate switching between < and >= 512 kbps --- lib_enc/ivas_osba_enc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib_enc/ivas_osba_enc.c b/lib_enc/ivas_osba_enc.c index 5797b0e436..8dc058f777 100644 --- a/lib_enc/ivas_osba_enc.c +++ b/lib_enc/ivas_osba_enc.c @@ -299,8 +299,10 @@ ivas_error ivas_osba_enc_reconfig( hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; } if ( nchan_transport_old != st_ivas->nchan_transport || - ( ivas_total_brate < IVAS_384k && hEncoderConfig->last_ivas_total_brate >= IVAS_384k ) || - ( ivas_total_brate >= IVAS_384k && hEncoderConfig->last_ivas_total_brate < IVAS_384k ) + ( ivas_total_brate < IVAS_384k && hEncoderConfig->last_ivas_total_brate >= IVAS_384k ) || + ( ivas_total_brate >= IVAS_384k && hEncoderConfig->last_ivas_total_brate < IVAS_384k ) + ( ivas_total_brate < IVAS_512k && hEncoderConfig->last_ivas_total_brate >= IVAS_512k ) || + ( ivas_total_brate >= IVAS_512k && hEncoderConfig->last_ivas_total_brate < IVAS_512k ) ) { /* FB mixer handle */ -- GitLab From f32bba3c734977ac89edcdc54e585eee660a907c Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 29 Nov 2023 15:13:01 +0100 Subject: [PATCH 04/11] fix compile error --- lib_enc/ivas_osba_enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/ivas_osba_enc.c b/lib_enc/ivas_osba_enc.c index 8dc058f777..0f79bb7ee0 100644 --- a/lib_enc/ivas_osba_enc.c +++ b/lib_enc/ivas_osba_enc.c @@ -300,7 +300,7 @@ ivas_error ivas_osba_enc_reconfig( } if ( nchan_transport_old != st_ivas->nchan_transport || ( ivas_total_brate < IVAS_384k && hEncoderConfig->last_ivas_total_brate >= IVAS_384k ) || - ( ivas_total_brate >= IVAS_384k && hEncoderConfig->last_ivas_total_brate < IVAS_384k ) + ( ivas_total_brate >= IVAS_384k && hEncoderConfig->last_ivas_total_brate < IVAS_384k ) || ( ivas_total_brate < IVAS_512k && hEncoderConfig->last_ivas_total_brate >= IVAS_512k ) || ( ivas_total_brate >= IVAS_512k && hEncoderConfig->last_ivas_total_brate < IVAS_512k ) ) -- GitLab From 598931b62e7e49f16a77e92897b3223db460e2c1 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 29 Nov 2023 15:48:23 +0100 Subject: [PATCH 05/11] fix formatting --- lib_dec/ivas_sba_dec.c | 10 +++++----- lib_enc/ivas_osba_enc.c | 11 +++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index a387f94d5e..877842c91c 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -304,12 +304,12 @@ ivas_error ivas_sba_dec_reconfigure( hSpar->hPCA = NULL; } - if ( nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) || - ( ( last_ivas_total_brate >= IVAS_512k && ivas_total_brate < IVAS_512k ) || + if ( nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) || + ( ( last_ivas_total_brate >= IVAS_512k && ivas_total_brate < IVAS_512k ) || ( last_ivas_total_brate < IVAS_512k && ivas_total_brate >= IVAS_512k ) ) || - ( ( ( last_ivas_total_brate >= IVAS_384k && ivas_total_brate < IVAS_384k ) || - ( last_ivas_total_brate < IVAS_384k && ivas_total_brate >= IVAS_384k ) ) && st_ivas->ivas_format == SBA_ISM_FORMAT) - ) + ( ( ( last_ivas_total_brate >= IVAS_384k && ivas_total_brate < IVAS_384k ) || + ( last_ivas_total_brate < IVAS_384k && ivas_total_brate >= IVAS_384k ) ) && + st_ivas->ivas_format == SBA_ISM_FORMAT ) ) { ivas_spar_dec_close( &( st_ivas->hSpar ), hDecoderConfig->output_Fs, 1 ); diff --git a/lib_enc/ivas_osba_enc.c b/lib_enc/ivas_osba_enc.c index 0f79bb7ee0..7922be2dab 100644 --- a/lib_enc/ivas_osba_enc.c +++ b/lib_enc/ivas_osba_enc.c @@ -298,12 +298,11 @@ ivas_error ivas_osba_enc_reconfig( { hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; } - if ( nchan_transport_old != st_ivas->nchan_transport || - ( ivas_total_brate < IVAS_384k && hEncoderConfig->last_ivas_total_brate >= IVAS_384k ) || - ( ivas_total_brate >= IVAS_384k && hEncoderConfig->last_ivas_total_brate < IVAS_384k ) || - ( ivas_total_brate < IVAS_512k && hEncoderConfig->last_ivas_total_brate >= IVAS_512k ) || - ( ivas_total_brate >= IVAS_512k && hEncoderConfig->last_ivas_total_brate < IVAS_512k ) - ) + if ( nchan_transport_old != st_ivas->nchan_transport || + ( ivas_total_brate < IVAS_384k && hEncoderConfig->last_ivas_total_brate >= IVAS_384k ) || + ( ivas_total_brate >= IVAS_384k && hEncoderConfig->last_ivas_total_brate < IVAS_384k ) || + ( ivas_total_brate < IVAS_512k && hEncoderConfig->last_ivas_total_brate >= IVAS_512k ) || + ( ivas_total_brate >= IVAS_512k && hEncoderConfig->last_ivas_total_brate < IVAS_512k ) ) { /* FB mixer handle */ if ( hDirAC->hFbMixer != NULL ) -- GitLab From cdc5ebe78fb2a312766082d18b8aa93995b993a9 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 29 Nov 2023 17:02:15 +0100 Subject: [PATCH 06/11] wrap changes into the new define NONBE_FIX_908_OSBA_BR_SWITCHING_CRASH --- lib_dec/ivas_sba_dec.c | 10 +++++----- lib_enc/ivas_osba_enc.c | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 877842c91c..c4eef75896 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -305,11 +305,11 @@ ivas_error ivas_sba_dec_reconfigure( } if ( nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) || - ( ( last_ivas_total_brate >= IVAS_512k && ivas_total_brate < IVAS_512k ) || - ( last_ivas_total_brate < IVAS_512k && ivas_total_brate >= IVAS_512k ) ) || - ( ( ( last_ivas_total_brate >= IVAS_384k && ivas_total_brate < IVAS_384k ) || - ( last_ivas_total_brate < IVAS_384k && ivas_total_brate >= IVAS_384k ) ) && - st_ivas->ivas_format == SBA_ISM_FORMAT ) ) + ( ( last_ivas_total_brate >= IVAS_512k && ivas_total_brate < IVAS_512k ) || ( last_ivas_total_brate < IVAS_512k && ivas_total_brate >= IVAS_512k ) ) +#ifdef NONBE_FIX_908_OSBA_BR_SWITCHING_CRASH + || ( ( ( last_ivas_total_brate >= IVAS_384k && ivas_total_brate < IVAS_384k ) || ( last_ivas_total_brate < IVAS_384k && ivas_total_brate >= IVAS_384k ) ) && st_ivas->ivas_format == SBA_ISM_FORMAT ) +#endif + ) { ivas_spar_dec_close( &( st_ivas->hSpar ), hDecoderConfig->output_Fs, 1 ); diff --git a/lib_enc/ivas_osba_enc.c b/lib_enc/ivas_osba_enc.c index 7922be2dab..2ab81089e1 100644 --- a/lib_enc/ivas_osba_enc.c +++ b/lib_enc/ivas_osba_enc.c @@ -299,8 +299,10 @@ ivas_error ivas_osba_enc_reconfig( hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; } if ( nchan_transport_old != st_ivas->nchan_transport || +#ifdef NONBE_FIX_908_OSBA_BR_SWITCHING_CRASH ( ivas_total_brate < IVAS_384k && hEncoderConfig->last_ivas_total_brate >= IVAS_384k ) || ( ivas_total_brate >= IVAS_384k && hEncoderConfig->last_ivas_total_brate < IVAS_384k ) || +#endif ( ivas_total_brate < IVAS_512k && hEncoderConfig->last_ivas_total_brate >= IVAS_512k ) || ( ivas_total_brate >= IVAS_512k && hEncoderConfig->last_ivas_total_brate < IVAS_512k ) ) { -- GitLab From b192dbfd672319eee440c3f1fcd75d52f1f967f3 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 29 Nov 2023 17:10:47 +0100 Subject: [PATCH 07/11] enable define NONBE_FIX_908_OSBA_BR_SWITCHING_CRASH --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 94c706fa81..276bcbce2a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -176,7 +176,7 @@ #define NONBE_FIX_862_UBSAN_SPAR_DEC_BR_SW_PLC /* DLB: issue 862 : UBSAN: out-of-bound error in SPAR for OSBA bitrate switching with PLC*/ #define NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING /* FhG: fix handling of common and differing noise seeds in SCEs for ISM DTX */ #define NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION /* VA/Nok: issue 913: Resolve "Crash in OMASA encoder - DFT-Stereo bit-budget violated" */ - +#define NONBE_FIX_908_OSBA_BR_SWITCHING_CRASH /* FhG: issue 908: fix crash in OSBA BR switching with long test vectors */ /* ##################### End NON-BE switches ########################### */ -- GitLab From 3367bc2f50c8452010184930bc866d52d1a28783 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 30 Nov 2023 12:15:34 +0100 Subject: [PATCH 08/11] do not re-open SPAR but only PCA when switching to 256 kbps in OSBA decoding --- lib_dec/ivas_sba_dec.c | 15 +++++++-------- lib_enc/ivas_osba_enc.c | 15 +-------------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index c4eef75896..d63384836e 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -304,12 +304,7 @@ ivas_error ivas_sba_dec_reconfigure( hSpar->hPCA = NULL; } - if ( nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) || - ( ( last_ivas_total_brate >= IVAS_512k && ivas_total_brate < IVAS_512k ) || ( last_ivas_total_brate < IVAS_512k && ivas_total_brate >= IVAS_512k ) ) -#ifdef NONBE_FIX_908_OSBA_BR_SWITCHING_CRASH - || ( ( ( last_ivas_total_brate >= IVAS_384k && ivas_total_brate < IVAS_384k ) || ( last_ivas_total_brate < IVAS_384k && ivas_total_brate >= IVAS_384k ) ) && st_ivas->ivas_format == SBA_ISM_FORMAT ) -#endif - ) + if ( nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) || ( last_ivas_total_brate >= IVAS_512k && ivas_total_brate < IVAS_512k ) || ( last_ivas_total_brate < IVAS_512k && ivas_total_brate >= IVAS_512k ) ) { ivas_spar_dec_close( &( st_ivas->hSpar ), hDecoderConfig->output_Fs, 1 ); @@ -330,7 +325,11 @@ ivas_error ivas_sba_dec_reconfigure( } } +#ifdef NONBE_FIX_908_OSBA_BR_SWITCHING_CRASH + if ( hSpar->hPCA == NULL && st_ivas->hDecoderConfig->ivas_total_brate == PCA_BRATE && st_ivas->sba_order == 1 && ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT ) ) +#else if ( hSpar->hPCA == NULL && st_ivas->hDecoderConfig->ivas_total_brate == PCA_BRATE && st_ivas->sba_order == 1 && st_ivas->ivas_format == SBA_FORMAT ) +#endif { if ( ( hSpar->hPCA = (PCA_DEC_STATE *) malloc( sizeof( PCA_DEC_STATE ) ) ) == NULL ) { @@ -444,7 +443,7 @@ ivas_error ivas_sba_dec_reconfigure( 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 ), + 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 ); if ( st_ivas->hDirAC ) @@ -761,7 +760,7 @@ void ivas_sba_dec_digest_tc( float *decorr_signal[BINAURAL_CHANNELS]; float *p_tc[2 * BINAURAL_CHANNELS]; - default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + default_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); nSamplesLeftForTD = nSamplesForRendering; for ( ch_idx = 0; ch_idx < BINAURAL_CHANNELS; ch_idx++ ) diff --git a/lib_enc/ivas_osba_enc.c b/lib_enc/ivas_osba_enc.c index 2ab81089e1..675b89c6d6 100644 --- a/lib_enc/ivas_osba_enc.c +++ b/lib_enc/ivas_osba_enc.c @@ -213,13 +213,6 @@ ivas_error ivas_osba_enc_reconfig( nbands_old = st_ivas->hQMetaData->q_direction->cfg.nbands; ndir_old = st_ivas->hQMetaData->no_directions; - /* - if ( ivas_total_brate == 256000 && hEncoderConfig->last_ivas_total_brate == 384000 ) - { - printf( "cccc" ); - } - */ - if ( ( analysis_order_old != st_ivas->sba_analysis_order ) || ( old_ism_mode != st_ivas->ism_mode ) ) { int16_t i, n_old; @@ -298,13 +291,7 @@ ivas_error ivas_osba_enc_reconfig( { hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; } - if ( nchan_transport_old != st_ivas->nchan_transport || -#ifdef NONBE_FIX_908_OSBA_BR_SWITCHING_CRASH - ( ivas_total_brate < IVAS_384k && hEncoderConfig->last_ivas_total_brate >= IVAS_384k ) || - ( ivas_total_brate >= IVAS_384k && hEncoderConfig->last_ivas_total_brate < IVAS_384k ) || -#endif - ( ivas_total_brate < IVAS_512k && hEncoderConfig->last_ivas_total_brate >= IVAS_512k ) || - ( ivas_total_brate >= IVAS_512k && hEncoderConfig->last_ivas_total_brate < IVAS_512k ) ) + if ( nchan_transport_old != st_ivas->nchan_transport || ( ivas_total_brate < IVAS_512k && hEncoderConfig->last_ivas_total_brate >= IVAS_512k ) || ( ivas_total_brate >= IVAS_512k && hEncoderConfig->last_ivas_total_brate < IVAS_512k ) ) { /* FB mixer handle */ if ( hDirAC->hFbMixer != NULL ) -- GitLab From c2fc7af28350865ebf08a29c560934fbafc0fabd Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 30 Nov 2023 12:44:26 +0100 Subject: [PATCH 09/11] fix formatting --- lib_dec/ivas_sba_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index d63384836e..2092d7c2df 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -443,7 +443,7 @@ ivas_error ivas_sba_dec_reconfigure( 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 ), + 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 ); if ( st_ivas->hDirAC ) @@ -760,7 +760,7 @@ void ivas_sba_dec_digest_tc( float *decorr_signal[BINAURAL_CHANNELS]; float *p_tc[2 * BINAURAL_CHANNELS]; - default_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); nSamplesLeftForTD = nSamplesForRendering; for ( ch_idx = 0; ch_idx < BINAURAL_CHANNELS; ch_idx++ ) -- GitLab From 83f2132a6781facfe6bfe84db65920a29890ec7b Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 1 Dec 2023 13:48:22 +0100 Subject: [PATCH 10/11] fix condition for enabling PCA to allow OSBA format --- lib_enc/lib_enc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c index 62ea6dceb8..3471a9d791 100644 --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -990,8 +990,12 @@ static ivas_error configureEncoder( } #endif +#ifdef NONBE_FIX_908_OSBA_BR_SWITCHING_CRASH + if ( hEncoderConfig->Opt_PCA_ON && !( ( hEncoderConfig->ivas_format == SBA_FORMAT || hEncoderConfig->ivas_format == SBA_ISM_FORMAT ) && hEncoderConfig->ivas_total_brate == PCA_BRATE && hEncoderConfig->sba_order == SBA_FOA_ORDER ) ) +#else if ( hEncoderConfig->Opt_PCA_ON && !( hEncoderConfig->ivas_format == SBA_FORMAT && hEncoderConfig->ivas_total_brate == PCA_BRATE && hEncoderConfig->sba_order == SBA_FOA_ORDER ) ) - { +#endif + { return IVAS_ERROR( IVAS_ERR_NOT_SUPPORTED_OPTION, "PCA supported at SBA FOA 256 kbps only." ); } -- GitLab From f35a17db025079acf632f82794fc1c8496def91c Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 1 Dec 2023 14:03:32 +0100 Subject: [PATCH 11/11] fix formatting --- lib_enc/lib_enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c index 3471a9d791..a650bf8bd4 100644 --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -995,7 +995,7 @@ static ivas_error configureEncoder( #else if ( hEncoderConfig->Opt_PCA_ON && !( hEncoderConfig->ivas_format == SBA_FORMAT && hEncoderConfig->ivas_total_brate == PCA_BRATE && hEncoderConfig->sba_order == SBA_FOA_ORDER ) ) #endif - { + { return IVAS_ERROR( IVAS_ERR_NOT_SUPPORTED_OPTION, "PCA supported at SBA FOA 256 kbps only." ); } -- GitLab