Loading lib_dec/ivas_jbm_dec_fx.c +4 −3 Original line number Diff line number Diff line Loading @@ -1038,18 +1038,19 @@ ivas_error ivas_jbm_dec_tc_fx( { num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate ); SPAR_DEC_HANDLE hSpar = st_ivas->hSpar; Word16 Q_p_output = 14; move16(); Word16 nchan_transport; // num_bands_out = hSpar->hFbMixer->pFb->filterbank_num_bands; nchan_transport = hSpar->hMdDec->spar_md_cfg.nchan_transport; move16(); nchan_out = nchan_transport; move16(); Word16 Q_p_output = s_max( 3, sub( L_norm_arr( p_output_fx[sba_ch_idx], imult1616( output_frame, nchan_transport ) ), 1 ) ); Q_p_output = s_min( Q_p_output, 19 ); // to restrict Q-factor of p_ouptut to Q30 FOR( ch = 0; ch < nchan_transport; ch++ ) { Scale_sig32( p_output_fx[sba_ch_idx + ch], output_frame, sub( Q_p_output, Q11 ) ); // Q_p_output Scale_sig32( p_output_fx[sba_ch_idx + ch], output_frame, Q_p_output ); // Q_p_output + Q11 } Q_p_output = add( Q11, Q_p_output ); hSpar->hMdDec->Q_mixer_mat = 31; move16(); Loading lib_dec/ivas_sba_rendering_internal_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -505,7 +505,7 @@ void ivas_sba_mix_matrix_determiner_fx( temp_fx = MAX16B; /*Q0*/ move32(); } ELSE IF( LT_32( temp_fx, L_negate( PCM16_TO_FLT_FAC_FX ) ) ) ELSE IF( LT_32( temp_fx, -( PCM16_TO_FLT_FAC_FX ) ) ) { temp_fx = -( PCM16_TO_FLT_FAC_FX ); /*Q0*/ move32(); Loading lib_rend/ivas_dirac_dec_binaural_functions_fx.c +12 −5 Original line number Diff line number Diff line Loading @@ -596,7 +596,7 @@ static void ivas_dirac_dec_binaural_internal_fx( move16(); } } Word16 q_cldfb_temp = sub( q_input, 1 ); DIRAC_DEC_BIN_HANDLE hDiracDecBin; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; PARAMBIN_REND_CONFIG config_data; Loading @@ -616,7 +616,7 @@ static void ivas_dirac_dec_binaural_internal_fx( nBins = hSpatParamRendCom->num_freq_bands; move16(); offsetSamples = imult1616( hSpatParamRendCom->slots_rendered, nBins ); Word32 tmp_arr[CLDFB_NO_CHANNELS_MAX]; /* Setup internal config */ config_data.separateCenterChannelRendering = st_ivas->hOutSetup.separateChannelEnabled; move16(); Loading Loading @@ -711,13 +711,21 @@ static void ivas_dirac_dec_binaural_internal_fx( test(); IF( ch == 0 || EQ_16( nchan_transport, 2 ) ) { q_cldfb[ch][slot] = q_input; q_cldfb[ch][slot] = q_cldfb_temp; move16(); Copy_Scale_sig32( &( st_ivas->hTcBuffer->tc_fx[ch][nBins * slot + offsetSamples] ), tmp_arr, nBins, -1 ); scale_sig32( st_ivas->cldfbAnaDec[ch]->cldfb_state_fx, sub( st_ivas->cldfbAnaDec[ch]->p_filter_length, st_ivas->cldfbAnaDec[ch]->no_channels ), sub( q_cldfb_temp, st_ivas->cldfbAnaDec[ch]->Q_cldfb_state ) ); cldfbAnalysis_ts_fx_fixed_q( &( st_ivas->hTcBuffer->tc_fx[ch][add( imult1616( nBins, slot ), offsetSamples )] ), tmp_arr, Cldfb_RealBuffer_in_fx[ch][slot], Cldfb_ImagBuffer_in_fx[ch][slot], nBins, st_ivas->cldfbAnaDec[ch], &q_cldfb[ch][slot] ); scale_sig32( st_ivas->cldfbAnaDec[ch]->cldfb_state_fx, sub( st_ivas->cldfbAnaDec[ch]->p_filter_length, st_ivas->cldfbAnaDec[ch]->no_channels ), sub( q_input, st_ivas->cldfbAnaDec[ch]->Q_cldfb_state ) ); st_ivas->cldfbAnaDec[ch]->Q_cldfb_state = q_input; scale_sig32( Cldfb_RealBuffer_in_fx[ch][slot], nBins, 1 ); // Q6 scale_sig32( Cldfb_ImagBuffer_in_fx[ch][slot], nBins, 1 ); // Q6 q_cldfb[ch][slot] = add( q_cldfb[ch][slot], 1 ); move16(); } ELSE IF( EQ_16( config_data.nchan_transport, 2 ) ) /* Stereo signal transmitted as mono with DFT stereo */ { Loading Loading @@ -812,7 +820,6 @@ static void ivas_dirac_dec_binaural_internal_fx( IF( hDiracDecBin->useTdDecorr ) { Word32 tmp_arr[60]; FOR( ch = BINAURAL_CHANNELS; ch < ( 2 * BINAURAL_CHANNELS ); ch++ ) { q_cldfb[ch][slot] = sub( q_input, 1 ); Loading Loading
lib_dec/ivas_jbm_dec_fx.c +4 −3 Original line number Diff line number Diff line Loading @@ -1038,18 +1038,19 @@ ivas_error ivas_jbm_dec_tc_fx( { num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate ); SPAR_DEC_HANDLE hSpar = st_ivas->hSpar; Word16 Q_p_output = 14; move16(); Word16 nchan_transport; // num_bands_out = hSpar->hFbMixer->pFb->filterbank_num_bands; nchan_transport = hSpar->hMdDec->spar_md_cfg.nchan_transport; move16(); nchan_out = nchan_transport; move16(); Word16 Q_p_output = s_max( 3, sub( L_norm_arr( p_output_fx[sba_ch_idx], imult1616( output_frame, nchan_transport ) ), 1 ) ); Q_p_output = s_min( Q_p_output, 19 ); // to restrict Q-factor of p_ouptut to Q30 FOR( ch = 0; ch < nchan_transport; ch++ ) { Scale_sig32( p_output_fx[sba_ch_idx + ch], output_frame, sub( Q_p_output, Q11 ) ); // Q_p_output Scale_sig32( p_output_fx[sba_ch_idx + ch], output_frame, Q_p_output ); // Q_p_output + Q11 } Q_p_output = add( Q11, Q_p_output ); hSpar->hMdDec->Q_mixer_mat = 31; move16(); Loading
lib_dec/ivas_sba_rendering_internal_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -505,7 +505,7 @@ void ivas_sba_mix_matrix_determiner_fx( temp_fx = MAX16B; /*Q0*/ move32(); } ELSE IF( LT_32( temp_fx, L_negate( PCM16_TO_FLT_FAC_FX ) ) ) ELSE IF( LT_32( temp_fx, -( PCM16_TO_FLT_FAC_FX ) ) ) { temp_fx = -( PCM16_TO_FLT_FAC_FX ); /*Q0*/ move32(); Loading
lib_rend/ivas_dirac_dec_binaural_functions_fx.c +12 −5 Original line number Diff line number Diff line Loading @@ -596,7 +596,7 @@ static void ivas_dirac_dec_binaural_internal_fx( move16(); } } Word16 q_cldfb_temp = sub( q_input, 1 ); DIRAC_DEC_BIN_HANDLE hDiracDecBin; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; PARAMBIN_REND_CONFIG config_data; Loading @@ -616,7 +616,7 @@ static void ivas_dirac_dec_binaural_internal_fx( nBins = hSpatParamRendCom->num_freq_bands; move16(); offsetSamples = imult1616( hSpatParamRendCom->slots_rendered, nBins ); Word32 tmp_arr[CLDFB_NO_CHANNELS_MAX]; /* Setup internal config */ config_data.separateCenterChannelRendering = st_ivas->hOutSetup.separateChannelEnabled; move16(); Loading Loading @@ -711,13 +711,21 @@ static void ivas_dirac_dec_binaural_internal_fx( test(); IF( ch == 0 || EQ_16( nchan_transport, 2 ) ) { q_cldfb[ch][slot] = q_input; q_cldfb[ch][slot] = q_cldfb_temp; move16(); Copy_Scale_sig32( &( st_ivas->hTcBuffer->tc_fx[ch][nBins * slot + offsetSamples] ), tmp_arr, nBins, -1 ); scale_sig32( st_ivas->cldfbAnaDec[ch]->cldfb_state_fx, sub( st_ivas->cldfbAnaDec[ch]->p_filter_length, st_ivas->cldfbAnaDec[ch]->no_channels ), sub( q_cldfb_temp, st_ivas->cldfbAnaDec[ch]->Q_cldfb_state ) ); cldfbAnalysis_ts_fx_fixed_q( &( st_ivas->hTcBuffer->tc_fx[ch][add( imult1616( nBins, slot ), offsetSamples )] ), tmp_arr, Cldfb_RealBuffer_in_fx[ch][slot], Cldfb_ImagBuffer_in_fx[ch][slot], nBins, st_ivas->cldfbAnaDec[ch], &q_cldfb[ch][slot] ); scale_sig32( st_ivas->cldfbAnaDec[ch]->cldfb_state_fx, sub( st_ivas->cldfbAnaDec[ch]->p_filter_length, st_ivas->cldfbAnaDec[ch]->no_channels ), sub( q_input, st_ivas->cldfbAnaDec[ch]->Q_cldfb_state ) ); st_ivas->cldfbAnaDec[ch]->Q_cldfb_state = q_input; scale_sig32( Cldfb_RealBuffer_in_fx[ch][slot], nBins, 1 ); // Q6 scale_sig32( Cldfb_ImagBuffer_in_fx[ch][slot], nBins, 1 ); // Q6 q_cldfb[ch][slot] = add( q_cldfb[ch][slot], 1 ); move16(); } ELSE IF( EQ_16( config_data.nchan_transport, 2 ) ) /* Stereo signal transmitted as mono with DFT stereo */ { Loading Loading @@ -812,7 +820,6 @@ static void ivas_dirac_dec_binaural_internal_fx( IF( hDiracDecBin->useTdDecorr ) { Word32 tmp_arr[60]; FOR( ch = BINAURAL_CHANNELS; ch < ( 2 * BINAURAL_CHANNELS ); ch++ ) { q_cldfb[ch][slot] = sub( q_input, 1 ); Loading