From c37d1f7f5c9890e42a62b30b19453dd336a01113 Mon Sep 17 00:00:00 2001 From: azmill Date: Thu, 17 Aug 2023 17:18:40 +1000 Subject: [PATCH 1/4] Fixing the SBA MSAN issue properly, with non-BE Switch in the right place --- lib_com/ivas_prot.h | 11 ++-- lib_com/ivas_spar_com_quant_util.c | 30 ---------- lib_dec/ivas_spar_md_dec.c | 94 ++++++++++++++++++------------ lib_enc/ivas_spar_md_enc.c | 4 -- 4 files changed, 62 insertions(+), 77 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index a0d220df2a..8eafeff51a 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -4485,8 +4485,11 @@ void ivas_spar_update_md_hist( ); int16_t ivas_spar_chk_zero_coefs( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + Decoder_Struct *st_ivas /* i/o: IVAS decoder handle */ +#ifndef CR_FIX_698_SBA_MSAN + , const int16_t sba_order /* i : Ambisonic (SBA) order */ +#endif ); void ivas_spar_smooth_md_dtx( @@ -4892,13 +4895,7 @@ void ivas_copy_band_coeffs_idx_to_arr( void ivas_clear_band_coeffs( ivas_band_coeffs_t *pband_coeffs, -#ifdef CR_FIX_698_SBA_MSAN - const uint16_t num_bands, - const uint16_t num_ts -#else const uint16_t num_bands -#endif - ); void ivas_clear_band_coeff_idx( diff --git a/lib_com/ivas_spar_com_quant_util.c b/lib_com/ivas_spar_com_quant_util.c index 863177130b..f993fa41f1 100644 --- a/lib_com/ivas_spar_com_quant_util.c +++ b/lib_com/ivas_spar_com_quant_util.c @@ -293,46 +293,16 @@ void ivas_copy_band_coeffs_idx_to_arr( void ivas_clear_band_coeffs( ivas_band_coeffs_t *pband_coeffs, -#ifdef CR_FIX_698_SBA_MSAN - const uint16_t num_bands, - const uint16_t num_ts ) -#else const uint16_t num_bands ) -#endif { -#ifdef CR_FIX_698_SBA_MSAN - uint16_t i, j; -#else uint16_t i; -#endif - -#ifdef CR_FIX_698_SBA_MSAN - for ( j = 0; j < num_ts; j++ ) -#else for ( i = 0; i < num_bands; i++ ) -#endif { -#ifndef CR_FIX_698_SBA_MSAN set_zero( (float *) pband_coeffs[i].C_re, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) ); set_zero( (float *) pband_coeffs[i].P_re, ( IVAS_SPAR_MAX_CH - 1 ) ); set_zero( (float *) pband_coeffs[i].C_quant_re, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) ); set_zero( (float *) pband_coeffs[i].P_quant_re, ( IVAS_SPAR_MAX_CH - 1 ) ); set_zero( pband_coeffs[i].pred_re, ( IVAS_SPAR_MAX_CH - 1 ) ); -#endif -#ifdef CR_FIX_698_SBA_MSAN - for ( i = 0; i < num_bands; i++ ) - { - set_zero( (float *) pband_coeffs[i + j * num_bands].C_re, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) ); - set_zero( (float *) pband_coeffs[i + j * num_bands].P_re, ( IVAS_SPAR_MAX_CH - 1 ) ); - set_zero( (float *) pband_coeffs[i + j * num_bands].C_quant_re, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) ); - set_zero( (float *) pband_coeffs[i + j * num_bands].P_quant_re, ( IVAS_SPAR_MAX_CH - 1 ) ); - set_zero( pband_coeffs[i + j * num_bands].pred_re, ( IVAS_SPAR_MAX_CH - 1 ) ); - - set_zero( pband_coeffs[i + j * num_bands].pred_quant_re, ( IVAS_SPAR_MAX_CH - 1 ) ); - } -#else - set_zero( pband_coeffs[i].pred_quant_re, ( IVAS_SPAR_MAX_CH - 1 ) ); -#endif } return; diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index 909284d810..fc30545095 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -498,11 +498,7 @@ ivas_error ivas_spar_md_dec_init( ) { int16_t i, j; -#ifdef CR_FIX_698_SBA_MSAN - int16_t nchan_transport, num_md_sub_frames; -#else int16_t nchan_transport; -#endif float pFC[IVAS_MAX_NUM_BANDS], PR_minmax[2]; ivas_sba_get_spar_hoa_md_flag( sba_order, hDecoderConfig->ivas_total_brate, &hMdDec->spar_hoa_md_flag, &hMdDec->spar_hoa_dirac2spar_md_flag ); @@ -545,13 +541,7 @@ ivas_error ivas_spar_md_dec_init( hMdDec->spar_plc_enable_fadeout_flag = 1; hMdDec->dtx_md_smoothing_cntr = 1; -#ifdef CR_FIX_698_SBA_MSAN - num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( sba_order, hDecoderConfig->ivas_total_brate, hDecoderConfig->ivas_total_brate ); - - ivas_clear_band_coeffs( hMdDec->spar_md.band_coeffs, IVAS_MAX_NUM_BANDS, num_md_sub_frames ); -#else ivas_clear_band_coeffs( hMdDec->spar_md.band_coeffs, IVAS_MAX_NUM_BANDS ); -#endif ivas_clear_band_coeff_idx( hMdDec->spar_md.band_coeffs_idx, IVAS_MAX_NUM_BANDS ); ivas_clear_band_coeff_idx( hMdDec->spar_md_prev.band_coeffs_idx, IVAS_MAX_NUM_BANDS ); ivas_clear_band_coeff_idx( hMdDec->spar_md_prev.band_coeffs_idx_mapped, IVAS_MAX_NUM_BANDS ); @@ -646,9 +636,12 @@ static ivas_error ivas_spar_set_dec_config( *-----------------------------------------------------------------------------------------*/ static void ivas_dec_mono_sba_handling( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + Decoder_Struct *st_ivas /* i/o: IVAS decoder handle */ +#ifndef CR_FIX_698_SBA_MSAN + , const int16_t sba_order /* i : Ambisonic (SBA) order */ -) +#endif + ) { int16_t mono_flag, b, block; @@ -671,7 +664,11 @@ static void ivas_dec_mono_sba_handling( } } /* Combine the SPAR prediction coefs flag with the azimuth, elevation and energy ratio flag.*/ - mono_flag = mono_flag && ivas_spar_chk_zero_coefs( st_ivas, sba_order ); + #ifdef CR_FIX_698_SBA_MSAN + mono_flag = mono_flag && ivas_spar_chk_zero_coefs( st_ivas ); + #else + mono_flag = mono_flag && ivas_spar_chk_zero_coefs( st_ivas, sba_order ); + #endif if ( mono_flag ) { @@ -756,7 +753,11 @@ void ivas_spar_md_dec_process( ivas_spar_dec_parse_md_bs( hMdDec, st0, &nB, &bw, &dtx_vad, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->hQMetaData->sba_inactive_mode, st_ivas->last_active_ivas_total_brate ); +#ifdef CR_FIX_698_SBA_MSAN + ivas_dec_mono_sba_handling( st_ivas ); +#else ivas_dec_mono_sba_handling( st_ivas, sba_order ); +#endif /* SPAR to DirAC conversion */ if ( hMdDec->spar_hoa_dirac2spar_md_flag == 1 ) @@ -868,54 +869,75 @@ void ivas_spar_md_dec_process( *-----------------------------------------------------------------------------------------*/ int16_t ivas_spar_chk_zero_coefs( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + Decoder_Struct *st_ivas /* i/o: IVAS decoder handle */ +#ifndef CR_FIX_698_SBA_MSAN + , const int16_t sba_order /* i : Ambisonic (SBA) order */ +#endif ) { +#ifdef CR_FIX_698_SBA_MSAN + int16_t j, k, b; +#else int16_t j, k, b, i_ts; - ivas_spar_md_dec_state_t *hMdDec; int16_t num_md_sub_frames; +#endif + ivas_spar_md_dec_state_t *hMdDec; int16_t mono = 1; int16_t ndec, ndm; hMdDec = st_ivas->hSpar->hMdDec; - - num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( sba_order, st_ivas->hDecoderConfig->ivas_total_brate, - st_ivas->last_active_ivas_total_brate ); - ndec = hMdDec->spar_md_cfg.num_decorr_per_band[0]; ndm = hMdDec->spar_md_cfg.num_dmx_chans_per_band[0]; +#ifndef CR_FIX_698_SBA_MSAN + num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( sba_order, st_ivas->hDecoderConfig->ivas_total_brate, + st_ivas->last_active_ivas_total_brate ); for ( i_ts = 0; i_ts < num_md_sub_frames; i_ts++ ) { - for ( b = 0; b < min( hMdDec->spar_md.num_bands, SPAR_DIRAC_SPLIT_START_BAND ); b++ ) - { - for ( j = 0; j < ndm + ndec - 1; j++ ) +#endif + for ( b = 0; b < min( hMdDec->spar_md.num_bands, SPAR_DIRAC_SPLIT_START_BAND ); b++ ) { - if ( hMdDec->spar_md.band_coeffs[b + i_ts * IVAS_MAX_NUM_BANDS].pred_re[j] != 0.0f ) + for ( j = 0; j < ndm + ndec - 1; j++ ) { - mono = 0; +#ifdef CR_FIX_698_SBA_MSAN + if ( hMdDec->spar_md.band_coeffs[b].pred_re[j] != 0.0f ) +#else + if ( hMdDec->spar_md.band_coeffs[b + i_ts * IVAS_MAX_NUM_BANDS].pred_re[j] != 0.0f ) +#endif + { + mono = 0; + } } - } - for ( j = 0; j < ndec; j++ ) - { - for ( k = 0; k < ndm - 1; k++ ) + for ( j = 0; j < ndec; j++ ) { - if ( hMdDec->spar_md.band_coeffs[b + i_ts * IVAS_MAX_NUM_BANDS].C_re[j][k] != 0.0f ) + for ( k = 0; k < ndm - 1; k++ ) { - mono = 0; +#ifdef CR_FIX_698_SBA_MSAN + if ( hMdDec->spar_md.band_coeffs[b].C_re[j][k] != 0.0f ) +#else + if ( hMdDec->spar_md.band_coeffs[b + i_ts * IVAS_MAX_NUM_BANDS].C_re[j][k] != 0.0f ) +#endif + { + mono = 0; + } } } - } - for ( j = 0; j < ndec; j++ ) - { - if ( hMdDec->spar_md.band_coeffs[b + i_ts * IVAS_MAX_NUM_BANDS].P_re[j] != 0.0f ) + for ( j = 0; j < ndec; j++ ) { - mono = 0; +#ifdef CR_FIX_698_SBA_MSAN + if ( hMdDec->spar_md.band_coeffs[b].P_re[j] != 0.0f ) +#else + if ( hMdDec->spar_md.band_coeffs[b + i_ts * IVAS_MAX_NUM_BANDS].P_re[j] != 0.0f ) +#endif + { + mono = 0; + } } } +#ifndef CR_FIX_698_SBA_MSAN } - } +#endif return mono; } diff --git a/lib_enc/ivas_spar_md_enc.c b/lib_enc/ivas_spar_md_enc.c index 3aa05843ad..94ae5e0b1b 100644 --- a/lib_enc/ivas_spar_md_enc.c +++ b/lib_enc/ivas_spar_md_enc.c @@ -303,11 +303,7 @@ ivas_error ivas_spar_md_enc_init( } } -#ifdef CR_FIX_698_SBA_MSAN - ivas_clear_band_coeffs( hMdEnc->spar_md.band_coeffs, IVAS_MAX_NUM_BANDS, 1 ); -#else ivas_clear_band_coeffs( hMdEnc->spar_md.band_coeffs, IVAS_MAX_NUM_BANDS ); -#endif ivas_clear_band_coeff_idx( hMdEnc->spar_md.band_coeffs_idx, IVAS_MAX_NUM_BANDS ); ivas_clear_band_coeff_idx( hMdEnc->spar_md_prior.band_coeffs_idx, IVAS_MAX_NUM_BANDS ); ivas_clear_band_coeff_idx( hMdEnc->spar_md_prior.band_coeffs_idx_mapped, IVAS_MAX_NUM_BANDS ); -- GitLab From d901ae9d84244a8d0a7927b68c6c0670d37625e1 Mon Sep 17 00:00:00 2001 From: azmill Date: Fri, 18 Aug 2023 10:16:14 +1000 Subject: [PATCH 2/4] Fixing formatting --- lib_dec/ivas_spar_md_dec.c | 62 +++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index fc30545095..20cc77d960 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -639,9 +639,9 @@ static void ivas_dec_mono_sba_handling( Decoder_Struct *st_ivas /* i/o: IVAS decoder handle */ #ifndef CR_FIX_698_SBA_MSAN , - const int16_t sba_order /* i : Ambisonic (SBA) order */ + const int16_t sba_order /* i : Ambisonic (SBA) order */ #endif - ) +) { int16_t mono_flag, b, block; @@ -663,12 +663,12 @@ static void ivas_dec_mono_sba_handling( } } } - /* Combine the SPAR prediction coefs flag with the azimuth, elevation and energy ratio flag.*/ - #ifdef CR_FIX_698_SBA_MSAN - mono_flag = mono_flag && ivas_spar_chk_zero_coefs( st_ivas ); - #else - mono_flag = mono_flag && ivas_spar_chk_zero_coefs( st_ivas, sba_order ); - #endif +/* Combine the SPAR prediction coefs flag with the azimuth, elevation and energy ratio flag.*/ +#ifdef CR_FIX_698_SBA_MSAN + mono_flag = mono_flag && ivas_spar_chk_zero_coefs( st_ivas ); +#else + mono_flag = mono_flag && ivas_spar_chk_zero_coefs( st_ivas, sba_order ); +#endif if ( mono_flag ) { @@ -869,10 +869,10 @@ void ivas_spar_md_dec_process( *-----------------------------------------------------------------------------------------*/ int16_t ivas_spar_chk_zero_coefs( - Decoder_Struct *st_ivas /* i/o: IVAS decoder handle */ + Decoder_Struct *st_ivas /* i/o: IVAS decoder handle */ #ifndef CR_FIX_698_SBA_MSAN , - const int16_t sba_order /* i : Ambisonic (SBA) order */ + const int16_t sba_order /* i : Ambisonic (SBA) order */ #endif ) { @@ -896,47 +896,47 @@ int16_t ivas_spar_chk_zero_coefs( for ( i_ts = 0; i_ts < num_md_sub_frames; i_ts++ ) { #endif - for ( b = 0; b < min( hMdDec->spar_md.num_bands, SPAR_DIRAC_SPLIT_START_BAND ); b++ ) + for ( b = 0; b < min( hMdDec->spar_md.num_bands, SPAR_DIRAC_SPLIT_START_BAND ); b++ ) + { + for ( j = 0; j < ndm + ndec - 1; j++ ) { - for ( j = 0; j < ndm + ndec - 1; j++ ) - { #ifdef CR_FIX_698_SBA_MSAN - if ( hMdDec->spar_md.band_coeffs[b].pred_re[j] != 0.0f ) + if ( hMdDec->spar_md.band_coeffs[b].pred_re[j] != 0.0f ) #else if ( hMdDec->spar_md.band_coeffs[b + i_ts * IVAS_MAX_NUM_BANDS].pred_re[j] != 0.0f ) #endif - { - mono = 0; - } + { + mono = 0; } - for ( j = 0; j < ndec; j++ ) + } + for ( j = 0; j < ndec; j++ ) + { + for ( k = 0; k < ndm - 1; k++ ) { - for ( k = 0; k < ndm - 1; k++ ) - { #ifdef CR_FIX_698_SBA_MSAN - if ( hMdDec->spar_md.band_coeffs[b].C_re[j][k] != 0.0f ) + if ( hMdDec->spar_md.band_coeffs[b].C_re[j][k] != 0.0f ) #else if ( hMdDec->spar_md.band_coeffs[b + i_ts * IVAS_MAX_NUM_BANDS].C_re[j][k] != 0.0f ) #endif - { - mono = 0; - } + { + mono = 0; } } - for ( j = 0; j < ndec; j++ ) - { + } + for ( j = 0; j < ndec; j++ ) + { #ifdef CR_FIX_698_SBA_MSAN - if ( hMdDec->spar_md.band_coeffs[b].P_re[j] != 0.0f ) + if ( hMdDec->spar_md.band_coeffs[b].P_re[j] != 0.0f ) #else if ( hMdDec->spar_md.band_coeffs[b + i_ts * IVAS_MAX_NUM_BANDS].P_re[j] != 0.0f ) #endif - { - mono = 0; - } + { + mono = 0; } } -#ifndef CR_FIX_698_SBA_MSAN } +#ifndef CR_FIX_698_SBA_MSAN + } #endif return mono; } -- GitLab From ea21fcf5a1420d627a589d51eb0af69e60463558 Mon Sep 17 00:00:00 2001 From: rtyag Date: Thu, 31 Aug 2023 10:33:42 +1000 Subject: [PATCH 3/4] fixed the comment in options.h --- 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 be3261f808..c6f5b69f76 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -179,7 +179,7 @@ #define CR_FIX_639_HQ_ACELP_TRANSITION /* Ericsson: Issue 639: Wrong sampling rate of SWB TBE excitation memory in 16 kHz core for DFT Stereo@32 kbps */ #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_698_SBA_MSAN /* Dlb: issue 698: Uninitialized memory read in SBA mono detector */ /* ##################### End NON-BE CR switches ########################### */ -- GitLab From 719307ed8af805a6b3672c0f7e029c9adf3a6ee1 Mon Sep 17 00:00:00 2001 From: azmill Date: Wed, 6 Sep 2023 13:27:32 +1000 Subject: [PATCH 4/4] Reverting initialisation changes --- lib_com/ivas_prot.h | 8 +------- lib_com/ivas_spar_com_quant_util.c | 28 ---------------------------- lib_dec/ivas_spar_md_dec.c | 10 ---------- lib_enc/ivas_spar_md_enc.c | 4 ---- 4 files changed, 1 insertion(+), 49 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index a786cfea57..14226ddbd9 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -4931,14 +4931,8 @@ void ivas_copy_band_coeffs_idx_to_arr( ); void ivas_clear_band_coeffs( - ivas_band_coeffs_t *pband_coeffs, -#ifdef NONBE_FIX_698_SBA_MSAN - const uint16_t num_bands, - const uint16_t num_ts -#else + ivas_band_coeffs_t *pband_coeffs, const uint16_t num_bands -#endif - ); void ivas_clear_band_coeff_idx( diff --git a/lib_com/ivas_spar_com_quant_util.c b/lib_com/ivas_spar_com_quant_util.c index 88f84ad9ce..977f36e374 100644 --- a/lib_com/ivas_spar_com_quant_util.c +++ b/lib_com/ivas_spar_com_quant_util.c @@ -293,46 +293,18 @@ void ivas_copy_band_coeffs_idx_to_arr( void ivas_clear_band_coeffs( ivas_band_coeffs_t *pband_coeffs, -#ifdef NONBE_FIX_698_SBA_MSAN - const uint16_t num_bands, - const uint16_t num_ts ) -#else const uint16_t num_bands ) -#endif { -#ifdef NONBE_FIX_698_SBA_MSAN - uint16_t i, j; -#else uint16_t i; -#endif -#ifdef NONBE_FIX_698_SBA_MSAN - for ( j = 0; j < num_ts; j++ ) -#else for ( i = 0; i < num_bands; i++ ) -#endif { -#ifndef NONBE_FIX_698_SBA_MSAN set_zero( (float *) pband_coeffs[i].C_re, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) ); set_zero( (float *) pband_coeffs[i].P_re, ( IVAS_SPAR_MAX_CH - 1 ) ); set_zero( (float *) pband_coeffs[i].C_quant_re, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) ); set_zero( (float *) pband_coeffs[i].P_quant_re, ( IVAS_SPAR_MAX_CH - 1 ) ); set_zero( pband_coeffs[i].pred_re, ( IVAS_SPAR_MAX_CH - 1 ) ); -#endif -#ifdef NONBE_FIX_698_SBA_MSAN - for ( i = 0; i < num_bands; i++ ) - { - set_zero( (float *) pband_coeffs[i + j * num_bands].C_re, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) ); - set_zero( (float *) pband_coeffs[i + j * num_bands].P_re, ( IVAS_SPAR_MAX_CH - 1 ) ); - set_zero( (float *) pband_coeffs[i + j * num_bands].C_quant_re, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) ); - set_zero( (float *) pband_coeffs[i + j * num_bands].P_quant_re, ( IVAS_SPAR_MAX_CH - 1 ) ); - set_zero( pband_coeffs[i + j * num_bands].pred_re, ( IVAS_SPAR_MAX_CH - 1 ) ); - - set_zero( pband_coeffs[i + j * num_bands].pred_quant_re, ( IVAS_SPAR_MAX_CH - 1 ) ); - } -#else set_zero( pband_coeffs[i].pred_quant_re, ( IVAS_SPAR_MAX_CH - 1 ) ); -#endif } return; diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index 307fcbdcce..fd7df428ae 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -498,11 +498,7 @@ ivas_error ivas_spar_md_dec_init( ) { int16_t i, j; -#ifdef NONBE_FIX_698_SBA_MSAN - int16_t nchan_transport, num_md_sub_frames; -#else int16_t nchan_transport; -#endif float pFC[IVAS_MAX_NUM_BANDS], PR_minmax[2]; ivas_sba_get_spar_hoa_md_flag( sba_order, hDecoderConfig->ivas_total_brate, &hMdDec->spar_hoa_md_flag, &hMdDec->spar_hoa_dirac2spar_md_flag ); @@ -545,13 +541,7 @@ ivas_error ivas_spar_md_dec_init( hMdDec->spar_plc_enable_fadeout_flag = 1; hMdDec->dtx_md_smoothing_cntr = 1; -#ifdef NONBE_FIX_698_SBA_MSAN - num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( sba_order, hDecoderConfig->ivas_total_brate, hDecoderConfig->ivas_total_brate ); - - ivas_clear_band_coeffs( hMdDec->spar_md.band_coeffs, IVAS_MAX_NUM_BANDS, num_md_sub_frames ); -#else ivas_clear_band_coeffs( hMdDec->spar_md.band_coeffs, IVAS_MAX_NUM_BANDS ); -#endif ivas_clear_band_coeff_idx( hMdDec->spar_md.band_coeffs_idx, IVAS_MAX_NUM_BANDS ); ivas_clear_band_coeff_idx( hMdDec->spar_md_prev.band_coeffs_idx, IVAS_MAX_NUM_BANDS ); ivas_clear_band_coeff_idx( hMdDec->spar_md_prev.band_coeffs_idx_mapped, IVAS_MAX_NUM_BANDS ); diff --git a/lib_enc/ivas_spar_md_enc.c b/lib_enc/ivas_spar_md_enc.c index e11ac1d7ea..94ae5e0b1b 100644 --- a/lib_enc/ivas_spar_md_enc.c +++ b/lib_enc/ivas_spar_md_enc.c @@ -303,11 +303,7 @@ ivas_error ivas_spar_md_enc_init( } } -#ifdef NONBE_FIX_698_SBA_MSAN - ivas_clear_band_coeffs( hMdEnc->spar_md.band_coeffs, IVAS_MAX_NUM_BANDS, 1 ); -#else ivas_clear_band_coeffs( hMdEnc->spar_md.band_coeffs, IVAS_MAX_NUM_BANDS ); -#endif ivas_clear_band_coeff_idx( hMdEnc->spar_md.band_coeffs_idx, IVAS_MAX_NUM_BANDS ); ivas_clear_band_coeff_idx( hMdEnc->spar_md_prior.band_coeffs_idx, IVAS_MAX_NUM_BANDS ); ivas_clear_band_coeff_idx( hMdEnc->spar_md_prior.band_coeffs_idx_mapped, IVAS_MAX_NUM_BANDS ); -- GitLab