Loading lib_com/ivas_fb_mixer.c +7 −6 Original line number Diff line number Diff line Loading @@ -1051,8 +1051,7 @@ static void ivas_get_active_bins( static ivas_error ivas_filterbank_setup( IVAS_FB_MIXER_HANDLE hFbMixer, const int32_t sampling_rate ) const int32_t sampling_rate ) { int16_t i, j; const float *pAll_fb_fr[2]; Loading @@ -1069,6 +1068,7 @@ static ivas_error ivas_filterbank_setup( set_s( hFbMixer->first_frame, 1, pCfg->num_out_chans ); set_s( hFbMixer->first_frame + pCfg->num_out_chans, 0, IVAS_SPAR_MAX_CH - pCfg->num_out_chans ); #endif if ( pCfg->num_out_chans > 0 ) { hFbMixer->pFb->filterbank_num_bands = ivas_get_num_bands( sampling_rate ); Loading Loading @@ -1100,6 +1100,7 @@ static ivas_error ivas_filterbank_setup( { return error; } if ( pCfg->num_out_chans > 0 ) { ivas_filterbank_t *pFb = hFbMixer->pFb; Loading @@ -1114,7 +1115,6 @@ static ivas_error ivas_filterbank_setup( pFb->fb_bin_to_band.num_cldfb_bands = (int16_t) ( sampling_rate * INV_CLDFB_BANDWIDTH + 0.5f ); /*pFb->fb_bin_to_band.cldfb_stride = ( int16_t )( ( sampling_rate / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX );*/ /* equals num_cldfb_bands*/ pFb->fb_bin_to_band.short_stride = (int16_t) ( ( sampling_rate / FRAMES_PER_SEC ) / 4 ); set_f( pFb->fb_bin_to_band.p_short_stride_bin_to_band, 0.0f, 2 * MDFT_FB_BANDS_240 ); set_s( pFb->fb_bin_to_band.p_cldfb_map_to_spar_band, 0, CLDFB_NO_CHANNELS_MAX ); set_s( pFb->fb_bin_to_band.p_spar_start_bands, 0, CLDFB_NO_CHANNELS_MAX ); Loading Loading @@ -1192,6 +1192,7 @@ static ivas_error ivas_filterbank_setup( ivas_calculate_abs_fr( pFb, sampling_rate, pCfg->active_w_mixing ); } } return error; } Loading lib_dec/ivas_sba_dec.c +5 −7 Original line number Diff line number Diff line Loading @@ -659,6 +659,7 @@ ivas_error ivas_sba_dec_reconfigure( #ifndef SBA_BR_SWITCHING_CLEAN_UP if ( hSpar != NULL && nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) ) { // VE: dirty patch -> reconfiguration of SPAR modules should be used instead !! IVAS_FB_CFG *fb_cfg; int16_t active_w_mixing; Loading Loading @@ -719,8 +720,7 @@ ivas_error ivas_sba_dec_reconfigure( #else if ( hSpar != NULL ) { if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE) || (sba_order_internal != 1 ) ) ) if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( sba_order_internal != 1 ) ) ) { free( st_ivas->hSpar->hPCA ); hSpar->hPCA = NULL; Loading Loading @@ -792,7 +792,6 @@ ivas_error ivas_sba_dec_reconfigure( hDirAC = st_ivas->hDirAC; } #ifndef SBA_BR_SWITCHING_RECONFIG if ( hDirAC != NULL ) #else Loading Loading @@ -892,8 +891,7 @@ ivas_error ivas_sba_dec_reconfigure( } #ifdef SBA_BR_SWITCHING_RECONFIG #ifdef SBA_BR_SWITCHING_CLEAN_UP if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( sba_mode_old != st_ivas->sba_mode ) || ( st_ivas->sba_mode == SBA_MODE_SPAR ) ) && (( (hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) ) if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( sba_mode_old != st_ivas->sba_mode ) || ( st_ivas->sba_mode == SBA_MODE_SPAR ) ) && ( ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) ) { DIRAC_CONFIG_FLAG flag_config; flag_config = DIRAC_OPEN; Loading Loading @@ -974,7 +972,6 @@ ivas_error ivas_sba_dec_reconfigure( #endif #endif #ifdef SBA_BR_SWITCHING else if ( st_ivas->renderer_type == RENDERER_DISABLE || ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->sba_mode != SBA_MODE_SPAR ) ) { if ( st_ivas->hDirAC != NULL ) Loading @@ -988,6 +985,7 @@ ivas_error ivas_sba_dec_reconfigure( vbap_free_data( &( st_ivas->hVBAPdata ) ); } } if ( st_ivas->hDirAC != NULL && st_ivas->sba_mode == SBA_MODE_SPAR ) { mvs2s( st_ivas->hDirAC->dirac_to_spar_md_bands, st_ivas->hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS ); Loading lib_dec/ivas_spar_decoder.c +5 −3 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ ivas_error ivas_spar_dec_open( ivas_pca_dec_init( hSpar->hPCA ); } /* mixer_mat intitialization */ for ( i = 0; i < num_channels_internal; i++ ) { Loading Loading @@ -180,6 +181,7 @@ ivas_error ivas_spar_dec_open( ivas_output_init( &( st_ivas->hTransSetup ), st_ivas->transport_config ); st_ivas->hSpar = hSpar; return error; } Loading lib_enc/ivas_sba_enc.c +4 −2 Original line number Diff line number Diff line Loading @@ -355,6 +355,7 @@ ivas_error ivas_sba_enc_reconfigure( st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, hEncoderConfig->sba_order ); #ifdef SBA_BR_SWITCHING st_ivas->sba_mode = ivas_sba_mode_select( ivas_total_brate ); if ( st_ivas->sba_mode == SBA_MODE_SPAR ) { if ( st_ivas->hSpar == NULL ) Loading Loading @@ -602,5 +603,6 @@ ivas_error ivas_sba_enc_reconfigure( } #endif } return error; } lib_enc/ivas_spar_encoder.c +13 −11 Original line number Diff line number Diff line Loading @@ -156,7 +156,6 @@ ivas_error ivas_spar_enc_open( return error; } } /* PCA handle */ hSpar->hPCA = NULL; if ( hEncoderConfig->Opt_PCA_ON ) Loading @@ -174,8 +173,10 @@ ivas_error ivas_spar_enc_open( /*-----------------------------------------------------------------* * Configuration - set SPAR high-level parameters *-----------------------------------------------------------------*/ ivas_spar_config( hEncoderConfig->ivas_total_brate, min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ), &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &hSpar->core_nominal_brate, -1 ); if ( st_ivas->nchan_transport == 1 ) { hEncoderConfig->element_mode_init = IVAS_SCE; Loading Loading @@ -224,15 +225,17 @@ ivas_error ivas_spar_enc_open( hSpar->hFrontVad = NULL; } /*-----------------------------------------------------------------* * Final assignment *-----------------------------------------------------------------*/ #ifdef SBA_BR_SWITCHING_CLEAN_UP } #endif /*-----------------------------------------------------------------* * Final assignment *-----------------------------------------------------------------*/ st_ivas->hSpar = hSpar; return error; } Loading Loading @@ -290,8 +293,7 @@ void ivas_spar_enc_close( ivas_FB_mixer_close( &hSpar->hFbMixer, input_Fs, spar_reconfig_flag ); #else ivas_FB_mixer_close( &hSpar->hFbMixer, input_Fs ); #endif #ifndef SBA_BR_SWITCHING_CLEAN_UP /* Trans Det handle */ ivas_spar_transient_det_close( &hSpar->hTranDet ); #endif Loading Loading
lib_com/ivas_fb_mixer.c +7 −6 Original line number Diff line number Diff line Loading @@ -1051,8 +1051,7 @@ static void ivas_get_active_bins( static ivas_error ivas_filterbank_setup( IVAS_FB_MIXER_HANDLE hFbMixer, const int32_t sampling_rate ) const int32_t sampling_rate ) { int16_t i, j; const float *pAll_fb_fr[2]; Loading @@ -1069,6 +1068,7 @@ static ivas_error ivas_filterbank_setup( set_s( hFbMixer->first_frame, 1, pCfg->num_out_chans ); set_s( hFbMixer->first_frame + pCfg->num_out_chans, 0, IVAS_SPAR_MAX_CH - pCfg->num_out_chans ); #endif if ( pCfg->num_out_chans > 0 ) { hFbMixer->pFb->filterbank_num_bands = ivas_get_num_bands( sampling_rate ); Loading Loading @@ -1100,6 +1100,7 @@ static ivas_error ivas_filterbank_setup( { return error; } if ( pCfg->num_out_chans > 0 ) { ivas_filterbank_t *pFb = hFbMixer->pFb; Loading @@ -1114,7 +1115,6 @@ static ivas_error ivas_filterbank_setup( pFb->fb_bin_to_band.num_cldfb_bands = (int16_t) ( sampling_rate * INV_CLDFB_BANDWIDTH + 0.5f ); /*pFb->fb_bin_to_band.cldfb_stride = ( int16_t )( ( sampling_rate / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX );*/ /* equals num_cldfb_bands*/ pFb->fb_bin_to_band.short_stride = (int16_t) ( ( sampling_rate / FRAMES_PER_SEC ) / 4 ); set_f( pFb->fb_bin_to_band.p_short_stride_bin_to_band, 0.0f, 2 * MDFT_FB_BANDS_240 ); set_s( pFb->fb_bin_to_band.p_cldfb_map_to_spar_band, 0, CLDFB_NO_CHANNELS_MAX ); set_s( pFb->fb_bin_to_band.p_spar_start_bands, 0, CLDFB_NO_CHANNELS_MAX ); Loading Loading @@ -1192,6 +1192,7 @@ static ivas_error ivas_filterbank_setup( ivas_calculate_abs_fr( pFb, sampling_rate, pCfg->active_w_mixing ); } } return error; } Loading
lib_dec/ivas_sba_dec.c +5 −7 Original line number Diff line number Diff line Loading @@ -659,6 +659,7 @@ ivas_error ivas_sba_dec_reconfigure( #ifndef SBA_BR_SWITCHING_CLEAN_UP if ( hSpar != NULL && nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) ) { // VE: dirty patch -> reconfiguration of SPAR modules should be used instead !! IVAS_FB_CFG *fb_cfg; int16_t active_w_mixing; Loading Loading @@ -719,8 +720,7 @@ ivas_error ivas_sba_dec_reconfigure( #else if ( hSpar != NULL ) { if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE) || (sba_order_internal != 1 ) ) ) if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( sba_order_internal != 1 ) ) ) { free( st_ivas->hSpar->hPCA ); hSpar->hPCA = NULL; Loading Loading @@ -792,7 +792,6 @@ ivas_error ivas_sba_dec_reconfigure( hDirAC = st_ivas->hDirAC; } #ifndef SBA_BR_SWITCHING_RECONFIG if ( hDirAC != NULL ) #else Loading Loading @@ -892,8 +891,7 @@ ivas_error ivas_sba_dec_reconfigure( } #ifdef SBA_BR_SWITCHING_RECONFIG #ifdef SBA_BR_SWITCHING_CLEAN_UP if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( sba_mode_old != st_ivas->sba_mode ) || ( st_ivas->sba_mode == SBA_MODE_SPAR ) ) && (( (hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) ) if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( sba_mode_old != st_ivas->sba_mode ) || ( st_ivas->sba_mode == SBA_MODE_SPAR ) ) && ( ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) ) { DIRAC_CONFIG_FLAG flag_config; flag_config = DIRAC_OPEN; Loading Loading @@ -974,7 +972,6 @@ ivas_error ivas_sba_dec_reconfigure( #endif #endif #ifdef SBA_BR_SWITCHING else if ( st_ivas->renderer_type == RENDERER_DISABLE || ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->sba_mode != SBA_MODE_SPAR ) ) { if ( st_ivas->hDirAC != NULL ) Loading @@ -988,6 +985,7 @@ ivas_error ivas_sba_dec_reconfigure( vbap_free_data( &( st_ivas->hVBAPdata ) ); } } if ( st_ivas->hDirAC != NULL && st_ivas->sba_mode == SBA_MODE_SPAR ) { mvs2s( st_ivas->hDirAC->dirac_to_spar_md_bands, st_ivas->hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS ); Loading
lib_dec/ivas_spar_decoder.c +5 −3 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ ivas_error ivas_spar_dec_open( ivas_pca_dec_init( hSpar->hPCA ); } /* mixer_mat intitialization */ for ( i = 0; i < num_channels_internal; i++ ) { Loading Loading @@ -180,6 +181,7 @@ ivas_error ivas_spar_dec_open( ivas_output_init( &( st_ivas->hTransSetup ), st_ivas->transport_config ); st_ivas->hSpar = hSpar; return error; } Loading
lib_enc/ivas_sba_enc.c +4 −2 Original line number Diff line number Diff line Loading @@ -355,6 +355,7 @@ ivas_error ivas_sba_enc_reconfigure( st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, hEncoderConfig->sba_order ); #ifdef SBA_BR_SWITCHING st_ivas->sba_mode = ivas_sba_mode_select( ivas_total_brate ); if ( st_ivas->sba_mode == SBA_MODE_SPAR ) { if ( st_ivas->hSpar == NULL ) Loading Loading @@ -602,5 +603,6 @@ ivas_error ivas_sba_enc_reconfigure( } #endif } return error; }
lib_enc/ivas_spar_encoder.c +13 −11 Original line number Diff line number Diff line Loading @@ -156,7 +156,6 @@ ivas_error ivas_spar_enc_open( return error; } } /* PCA handle */ hSpar->hPCA = NULL; if ( hEncoderConfig->Opt_PCA_ON ) Loading @@ -174,8 +173,10 @@ ivas_error ivas_spar_enc_open( /*-----------------------------------------------------------------* * Configuration - set SPAR high-level parameters *-----------------------------------------------------------------*/ ivas_spar_config( hEncoderConfig->ivas_total_brate, min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ), &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &hSpar->core_nominal_brate, -1 ); if ( st_ivas->nchan_transport == 1 ) { hEncoderConfig->element_mode_init = IVAS_SCE; Loading Loading @@ -224,15 +225,17 @@ ivas_error ivas_spar_enc_open( hSpar->hFrontVad = NULL; } /*-----------------------------------------------------------------* * Final assignment *-----------------------------------------------------------------*/ #ifdef SBA_BR_SWITCHING_CLEAN_UP } #endif /*-----------------------------------------------------------------* * Final assignment *-----------------------------------------------------------------*/ st_ivas->hSpar = hSpar; return error; } Loading Loading @@ -290,8 +293,7 @@ void ivas_spar_enc_close( ivas_FB_mixer_close( &hSpar->hFbMixer, input_Fs, spar_reconfig_flag ); #else ivas_FB_mixer_close( &hSpar->hFbMixer, input_Fs ); #endif #ifndef SBA_BR_SWITCHING_CLEAN_UP /* Trans Det handle */ ivas_spar_transient_det_close( &hSpar->hTranDet ); #endif Loading