Loading lib_com/ivas_dirac_com.c +1 −1 Original line number Diff line number Diff line Loading @@ -396,7 +396,7 @@ ivas_error ivas_dirac_sba_config( { return error; } #ifdef HODIRAC_FIX_BR_SWITCHING_DTX #if defined( HODIRAC_FIX_BR_SWITCHING_DTX ) && !defined( FIX_DTX_428 ) if ( sba_order > 1 && sba_total_brate > IVAS_256k ) { int16_t dir, j; Loading lib_com/options.h 100644 → 100755 +5 −0 Original line number Diff line number Diff line Loading @@ -220,8 +220,13 @@ #define COMPLEXITY_LEVEL_INDICATION #define FIX_642 /* FhG: Fix for issue 642, buggy DoA-array access in DirAC head rotation*/ #define VARIABLE_SPEED_DECODING /* FhG: variable speed decoding employing the JBM functioniality */ #define JBM_TSM_ON_TCS /* FhG: run the TSM part of JBM on the TCs instead of the final output pcm waveforms */ #define FIX_DTX_428 /* FhG: fix for issue 428, crash with DTX and bitrate switching */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading lib_dec/ivas_dirac_dec.c +8 −3 Original line number Diff line number Diff line Loading @@ -2922,6 +2922,7 @@ void ivas_dirac_dec_render_sf( #endif #ifdef JBM_TSM_ON_TCS /* Another workaround for self test BE */ #ifndef FIX_642 if ( st_ivas->hHeadTrackData && st_ivas->hDecoderConfig->voip_active == 0 ) { QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], st_ivas->hHeadTrackData->Rmat ); Loading @@ -2942,6 +2943,7 @@ void ivas_dirac_dec_render_sf( { p_Rmat = 0; } #endif /* copy parameters into local buffers*/ Loading Loading @@ -2976,7 +2978,11 @@ void ivas_dirac_dec_render_sf( } #ifdef JBM_TSM_ON_TCS if ( st_ivas->hHeadTrackData && st_ivas->hDecoderConfig->voip_active == 1 ) if ( st_ivas->hHeadTrackData #ifndef FIX_642 && st_ivas->hDecoderConfig->voip_active == 1 #endif ) #else if ( st_ivas->hHeadTrackData ) #endif Loading @@ -2996,7 +3002,6 @@ void ivas_dirac_dec_render_sf( { #ifdef JBM_TSM_ON_TCS rotateAziEle_DirAC( azimuth[slot_idx], elevation[slot_idx], num_freq_bands, hDirAC->num_freq_bands, p_Rmat ); #else /* note, this seems wrong since it does not take the dirac read ptr into account */ index_slot = subframe_idx * hDirAC->subframe_nbslots + slot_idx; Loading @@ -3006,7 +3011,7 @@ void ivas_dirac_dec_render_sf( } } } #ifdef JBM_TSM_ON_TCS #if defined( JBM_TSM_ON_TCS ) & !defined( FIX_642 ) else if ( !st_ivas->hHeadTrackData ) #else else Loading lib_enc/ivas_sba_enc.c +26 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,10 @@ ivas_error ivas_sba_enc_reconfigure( SPAR_ENC_HANDLE hSpar; int16_t analysis_order_old; int16_t spar_reconfig_flag; #ifdef FIX_DTX_428 int16_t nbands_old; int16_t ndir_old; #endif spar_reconfig_flag = 0; nchan_transport_old = st_ivas->nchan_transport; Loading @@ -128,6 +132,10 @@ ivas_error ivas_sba_enc_reconfigure( nSCE_old = st_ivas->nSCE; st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, hEncoderConfig->sba_order ); analysis_order_old = ivas_sba_get_analysis_order( hEncoderConfig->last_ivas_total_brate, hEncoderConfig->sba_order ); #ifdef FIX_DTX_428 nbands_old = st_ivas->hQMetaData->q_direction->cfg.nbands; ndir_old = st_ivas->hQMetaData->no_directions; #endif if ( analysis_order_old != st_ivas->sba_analysis_order ) { Loading Loading @@ -246,6 +254,24 @@ ivas_error ivas_sba_enc_reconfigure( { return error; } #ifdef FIX_DTX_428 if ( st_ivas->hQMetaData->q_direction->cfg.nbands != nbands_old || st_ivas->hQMetaData->no_directions != ndir_old ) { int16_t dir, j, i; IVAS_QDIRECTION *q_direction = st_ivas->hQMetaData->q_direction; for ( dir = 0; dir < st_ivas->hQMetaData->no_directions; dir++ ) { for ( j = 0; j < q_direction[dir].cfg.nbands; j++ ) { for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { q_direction[dir].band_data[j].energy_ratio_index[i] = 0; q_direction[dir].band_data[j].energy_ratio_index_mod[i] = 0; } } } } #endif mvs2s( hDirAC->dirac_to_spar_md_bands, hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS ); hSpar->enc_param_start_band = hDirAC->hConfig->enc_param_start_band; /*-----------------------------------------------------------------* Loading Loading
lib_com/ivas_dirac_com.c +1 −1 Original line number Diff line number Diff line Loading @@ -396,7 +396,7 @@ ivas_error ivas_dirac_sba_config( { return error; } #ifdef HODIRAC_FIX_BR_SWITCHING_DTX #if defined( HODIRAC_FIX_BR_SWITCHING_DTX ) && !defined( FIX_DTX_428 ) if ( sba_order > 1 && sba_total_brate > IVAS_256k ) { int16_t dir, j; Loading
lib_com/options.h 100644 → 100755 +5 −0 Original line number Diff line number Diff line Loading @@ -220,8 +220,13 @@ #define COMPLEXITY_LEVEL_INDICATION #define FIX_642 /* FhG: Fix for issue 642, buggy DoA-array access in DirAC head rotation*/ #define VARIABLE_SPEED_DECODING /* FhG: variable speed decoding employing the JBM functioniality */ #define JBM_TSM_ON_TCS /* FhG: run the TSM part of JBM on the TCs instead of the final output pcm waveforms */ #define FIX_DTX_428 /* FhG: fix for issue 428, crash with DTX and bitrate switching */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading
lib_dec/ivas_dirac_dec.c +8 −3 Original line number Diff line number Diff line Loading @@ -2922,6 +2922,7 @@ void ivas_dirac_dec_render_sf( #endif #ifdef JBM_TSM_ON_TCS /* Another workaround for self test BE */ #ifndef FIX_642 if ( st_ivas->hHeadTrackData && st_ivas->hDecoderConfig->voip_active == 0 ) { QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], st_ivas->hHeadTrackData->Rmat ); Loading @@ -2942,6 +2943,7 @@ void ivas_dirac_dec_render_sf( { p_Rmat = 0; } #endif /* copy parameters into local buffers*/ Loading Loading @@ -2976,7 +2978,11 @@ void ivas_dirac_dec_render_sf( } #ifdef JBM_TSM_ON_TCS if ( st_ivas->hHeadTrackData && st_ivas->hDecoderConfig->voip_active == 1 ) if ( st_ivas->hHeadTrackData #ifndef FIX_642 && st_ivas->hDecoderConfig->voip_active == 1 #endif ) #else if ( st_ivas->hHeadTrackData ) #endif Loading @@ -2996,7 +3002,6 @@ void ivas_dirac_dec_render_sf( { #ifdef JBM_TSM_ON_TCS rotateAziEle_DirAC( azimuth[slot_idx], elevation[slot_idx], num_freq_bands, hDirAC->num_freq_bands, p_Rmat ); #else /* note, this seems wrong since it does not take the dirac read ptr into account */ index_slot = subframe_idx * hDirAC->subframe_nbslots + slot_idx; Loading @@ -3006,7 +3011,7 @@ void ivas_dirac_dec_render_sf( } } } #ifdef JBM_TSM_ON_TCS #if defined( JBM_TSM_ON_TCS ) & !defined( FIX_642 ) else if ( !st_ivas->hHeadTrackData ) #else else Loading
lib_enc/ivas_sba_enc.c +26 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,10 @@ ivas_error ivas_sba_enc_reconfigure( SPAR_ENC_HANDLE hSpar; int16_t analysis_order_old; int16_t spar_reconfig_flag; #ifdef FIX_DTX_428 int16_t nbands_old; int16_t ndir_old; #endif spar_reconfig_flag = 0; nchan_transport_old = st_ivas->nchan_transport; Loading @@ -128,6 +132,10 @@ ivas_error ivas_sba_enc_reconfigure( nSCE_old = st_ivas->nSCE; st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, hEncoderConfig->sba_order ); analysis_order_old = ivas_sba_get_analysis_order( hEncoderConfig->last_ivas_total_brate, hEncoderConfig->sba_order ); #ifdef FIX_DTX_428 nbands_old = st_ivas->hQMetaData->q_direction->cfg.nbands; ndir_old = st_ivas->hQMetaData->no_directions; #endif if ( analysis_order_old != st_ivas->sba_analysis_order ) { Loading Loading @@ -246,6 +254,24 @@ ivas_error ivas_sba_enc_reconfigure( { return error; } #ifdef FIX_DTX_428 if ( st_ivas->hQMetaData->q_direction->cfg.nbands != nbands_old || st_ivas->hQMetaData->no_directions != ndir_old ) { int16_t dir, j, i; IVAS_QDIRECTION *q_direction = st_ivas->hQMetaData->q_direction; for ( dir = 0; dir < st_ivas->hQMetaData->no_directions; dir++ ) { for ( j = 0; j < q_direction[dir].cfg.nbands; j++ ) { for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { q_direction[dir].band_data[j].energy_ratio_index[i] = 0; q_direction[dir].band_data[j].energy_ratio_index_mod[i] = 0; } } } } #endif mvs2s( hDirAC->dirac_to_spar_md_bands, hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS ); hSpar->enc_param_start_band = hDirAC->hConfig->enc_param_start_band; /*-----------------------------------------------------------------* Loading