Loading lib_com/ivas_prot.h +0 −6 Original line number Diff line number Diff line Loading @@ -5734,12 +5734,6 @@ int16_t ivas_get_num_bands_from_bw_idx( const int16_t bwidth /* i : audio bandwidth */ ); #ifdef FIX_163_SBA_TD_DECORR_OPT void ivas_get_td_decorr_flag( SPAR_DEC_HANDLE hSpar, /* i/o : IVAS SPAR handle structure */ Decoder_Struct *st_ivas /* i/o : IVAS decoder structure */ ); #endif /* clang-format on */ Loading lib_com/ivas_td_decorr.c +1 −30 Original line number Diff line number Diff line Loading @@ -211,6 +211,7 @@ ivas_error ivas_td_decorr_dec_open( num_out_chans = nchan_internal - 1; error = IVAS_ERR_OK; if ( ( hTdDecorr_loc = (ivas_td_decorr_state_t *) malloc( sizeof( ivas_td_decorr_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR COV decoder" ); Loading @@ -221,7 +222,6 @@ ivas_error ivas_td_decorr_dec_open( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR COV decoder" ); } set_f( hTdDecorr_loc->look_ahead_buf, 0, (int16_t) ( output_Fs * IVAS_DECORR_PARM_LOOKAHEAD_TAU ) ); #ifdef JBM_TSM_ON_TCS hTdDecorr_loc->offset = (int16_t) ( output_Fs * IVAS_DECORR_PARM_LOOKAHEAD_TAU ); #endif Loading Loading @@ -531,32 +531,3 @@ void ivas_td_decorr_process( return; } #ifdef FIX_163_SBA_TD_DECORR_OPT /*-----------------------------------------------------------------------------------------* * Function ivas_get_td_decorr_flag() * * TD decorr bitrate and output_config check call *-----------------------------------------------------------------------------------------*/ void ivas_get_td_decorr_flag( SPAR_DEC_HANDLE hSpar, /* i/o : IVAS SPAR handle structure */ Decoder_Struct *st_ivas /* i/o : IVAS decoder structure */ ) { int32_t ivas_total_brate; AUDIO_CONFIG output_config; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; output_config = st_ivas->hDecoderConfig->output_config; if ( ( st_ivas->ivas_format == SBA_FORMAT ) && ( ( output_config == AUDIO_CONFIG_MONO || output_config == AUDIO_CONFIG_STEREO ) || ( ivas_total_brate >= IVAS_256k && output_config == AUDIO_CONFIG_FOA ) ) ) { hSpar->td_decorr_flag = 0; } else { hSpar->td_decorr_flag = 1; } } #endif lib_dec/ivas_sba_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -461,7 +461,7 @@ ivas_error ivas_sba_dec_digest_tc( { int16_t nSamplesToDecorr = min( nSamplesLeftForTD, default_frame ); #ifdef FIX_163_SBA_TD_DECORR_OPT if ( st_ivas->ivas_format != SBA_FORMAT || ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->hSpar->td_decorr_flag ) ) if ( st_ivas->hDiracDecBin->hTdDecorr ) { #endif ivas_td_decorr_process( st_ivas->hDiracDecBin->hTdDecorr, p_tc, decorr_signal, nSamplesToDecorr ); Loading lib_dec/ivas_spar_decoder.c +10 −9 Original line number Diff line number Diff line Loading @@ -102,8 +102,11 @@ ivas_error ivas_spar_dec_open( /* TD decorr. */ #ifdef FIX_163_SBA_TD_DECORR_OPT ivas_get_td_decorr_flag( hSpar, st_ivas ); if ( hSpar->td_decorr_flag ) if ( ( st_ivas->ivas_format == SBA_FORMAT ) && ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) || ( st_ivas->hDecoderConfig->ivas_total_brate >= IVAS_256k && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_FOA ) ) ) { hSpar->hTdDecorr = NULL; } else { #endif if ( ( error = ivas_td_decorr_dec_open( &hSpar->hTdDecorr, output_Fs, num_decor_chs + 1, 1 ) ) != IVAS_ERR_OK ) Loading @@ -112,10 +115,6 @@ ivas_error ivas_spar_dec_open( } #ifdef FIX_163_SBA_TD_DECORR_OPT } else { hSpar->hTdDecorr = NULL; } #endif /* MD handle */ Loading Loading @@ -744,12 +743,13 @@ static void ivas_spar_dec_MD( { hSpar->hMdDec->table_idx = table_idx; #ifdef FIX_163_SBA_TD_DECORR_OPT if ( hSpar->td_decorr_flag ) if ( hSpar->hTdDecorr ) { #endif hSpar->hTdDecorr->ducking_flag = ivas_spar_br_table_consts[table_idx].td_ducking; #ifdef FIX_163_SBA_TD_DECORR_OPT } #endif ivas_spar_md_dec_init( hSpar->hMdDec, hDecoderConfig, num_channels, sba_order ); } Loading Loading @@ -1248,8 +1248,9 @@ void ivas_spar_dec_digest_tc( while ( nSamplesLeftForTD ) { int16_t nSamplesToDecorr = min( nSamplesLeftForTD, default_frame ); #ifdef FIX_163_SBA_TD_DECORR_OPT if ( hSpar->td_decorr_flag ) if ( hSpar->hTdDecorr ) { #endif ivas_td_decorr_process( hSpar->hTdDecorr, p_tc, pPcm_tmp, nSamplesToDecorr ); Loading Loading @@ -1337,7 +1338,7 @@ void ivas_spar_dec_upmixer( if ( hSpar->hMdDec->td_decorr_flag ) { #ifdef FIX_163_SBA_TD_DECORR_OPT if ( hSpar->td_decorr_flag ) if ( hSpar->hTdDecorr ) { #endif ivas_td_decorr_process( hSpar->hTdDecorr, st_ivas->hTcBuffer->tc, pPcm_tmp, output_frame ); Loading lib_dec/ivas_stat_dec.h +0 −3 Original line number Diff line number Diff line Loading @@ -922,9 +922,6 @@ typedef struct ivas_spar_dec_lib_t int16_t slots_rendered; int16_t num_slots; #endif #ifdef FIX_163_SBA_TD_DECORR_OPT int16_t td_decorr_flag; /* Disable malloc for td_decorr structure flag */ #endif } SPAR_DEC_DATA, *SPAR_DEC_HANDLE; Loading Loading
lib_com/ivas_prot.h +0 −6 Original line number Diff line number Diff line Loading @@ -5734,12 +5734,6 @@ int16_t ivas_get_num_bands_from_bw_idx( const int16_t bwidth /* i : audio bandwidth */ ); #ifdef FIX_163_SBA_TD_DECORR_OPT void ivas_get_td_decorr_flag( SPAR_DEC_HANDLE hSpar, /* i/o : IVAS SPAR handle structure */ Decoder_Struct *st_ivas /* i/o : IVAS decoder structure */ ); #endif /* clang-format on */ Loading
lib_com/ivas_td_decorr.c +1 −30 Original line number Diff line number Diff line Loading @@ -211,6 +211,7 @@ ivas_error ivas_td_decorr_dec_open( num_out_chans = nchan_internal - 1; error = IVAS_ERR_OK; if ( ( hTdDecorr_loc = (ivas_td_decorr_state_t *) malloc( sizeof( ivas_td_decorr_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR COV decoder" ); Loading @@ -221,7 +222,6 @@ ivas_error ivas_td_decorr_dec_open( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR COV decoder" ); } set_f( hTdDecorr_loc->look_ahead_buf, 0, (int16_t) ( output_Fs * IVAS_DECORR_PARM_LOOKAHEAD_TAU ) ); #ifdef JBM_TSM_ON_TCS hTdDecorr_loc->offset = (int16_t) ( output_Fs * IVAS_DECORR_PARM_LOOKAHEAD_TAU ); #endif Loading Loading @@ -531,32 +531,3 @@ void ivas_td_decorr_process( return; } #ifdef FIX_163_SBA_TD_DECORR_OPT /*-----------------------------------------------------------------------------------------* * Function ivas_get_td_decorr_flag() * * TD decorr bitrate and output_config check call *-----------------------------------------------------------------------------------------*/ void ivas_get_td_decorr_flag( SPAR_DEC_HANDLE hSpar, /* i/o : IVAS SPAR handle structure */ Decoder_Struct *st_ivas /* i/o : IVAS decoder structure */ ) { int32_t ivas_total_brate; AUDIO_CONFIG output_config; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; output_config = st_ivas->hDecoderConfig->output_config; if ( ( st_ivas->ivas_format == SBA_FORMAT ) && ( ( output_config == AUDIO_CONFIG_MONO || output_config == AUDIO_CONFIG_STEREO ) || ( ivas_total_brate >= IVAS_256k && output_config == AUDIO_CONFIG_FOA ) ) ) { hSpar->td_decorr_flag = 0; } else { hSpar->td_decorr_flag = 1; } } #endif
lib_dec/ivas_sba_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -461,7 +461,7 @@ ivas_error ivas_sba_dec_digest_tc( { int16_t nSamplesToDecorr = min( nSamplesLeftForTD, default_frame ); #ifdef FIX_163_SBA_TD_DECORR_OPT if ( st_ivas->ivas_format != SBA_FORMAT || ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->hSpar->td_decorr_flag ) ) if ( st_ivas->hDiracDecBin->hTdDecorr ) { #endif ivas_td_decorr_process( st_ivas->hDiracDecBin->hTdDecorr, p_tc, decorr_signal, nSamplesToDecorr ); Loading
lib_dec/ivas_spar_decoder.c +10 −9 Original line number Diff line number Diff line Loading @@ -102,8 +102,11 @@ ivas_error ivas_spar_dec_open( /* TD decorr. */ #ifdef FIX_163_SBA_TD_DECORR_OPT ivas_get_td_decorr_flag( hSpar, st_ivas ); if ( hSpar->td_decorr_flag ) if ( ( st_ivas->ivas_format == SBA_FORMAT ) && ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) || ( st_ivas->hDecoderConfig->ivas_total_brate >= IVAS_256k && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_FOA ) ) ) { hSpar->hTdDecorr = NULL; } else { #endif if ( ( error = ivas_td_decorr_dec_open( &hSpar->hTdDecorr, output_Fs, num_decor_chs + 1, 1 ) ) != IVAS_ERR_OK ) Loading @@ -112,10 +115,6 @@ ivas_error ivas_spar_dec_open( } #ifdef FIX_163_SBA_TD_DECORR_OPT } else { hSpar->hTdDecorr = NULL; } #endif /* MD handle */ Loading Loading @@ -744,12 +743,13 @@ static void ivas_spar_dec_MD( { hSpar->hMdDec->table_idx = table_idx; #ifdef FIX_163_SBA_TD_DECORR_OPT if ( hSpar->td_decorr_flag ) if ( hSpar->hTdDecorr ) { #endif hSpar->hTdDecorr->ducking_flag = ivas_spar_br_table_consts[table_idx].td_ducking; #ifdef FIX_163_SBA_TD_DECORR_OPT } #endif ivas_spar_md_dec_init( hSpar->hMdDec, hDecoderConfig, num_channels, sba_order ); } Loading Loading @@ -1248,8 +1248,9 @@ void ivas_spar_dec_digest_tc( while ( nSamplesLeftForTD ) { int16_t nSamplesToDecorr = min( nSamplesLeftForTD, default_frame ); #ifdef FIX_163_SBA_TD_DECORR_OPT if ( hSpar->td_decorr_flag ) if ( hSpar->hTdDecorr ) { #endif ivas_td_decorr_process( hSpar->hTdDecorr, p_tc, pPcm_tmp, nSamplesToDecorr ); Loading Loading @@ -1337,7 +1338,7 @@ void ivas_spar_dec_upmixer( if ( hSpar->hMdDec->td_decorr_flag ) { #ifdef FIX_163_SBA_TD_DECORR_OPT if ( hSpar->td_decorr_flag ) if ( hSpar->hTdDecorr ) { #endif ivas_td_decorr_process( hSpar->hTdDecorr, st_ivas->hTcBuffer->tc, pPcm_tmp, output_frame ); Loading
lib_dec/ivas_stat_dec.h +0 −3 Original line number Diff line number Diff line Loading @@ -922,9 +922,6 @@ typedef struct ivas_spar_dec_lib_t int16_t slots_rendered; int16_t num_slots; #endif #ifdef FIX_163_SBA_TD_DECORR_OPT int16_t td_decorr_flag; /* Disable malloc for td_decorr structure flag */ #endif } SPAR_DEC_DATA, *SPAR_DEC_HANDLE; Loading