Loading lib_com/phase_dispersion_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -114,12 +114,12 @@ void phase_dispersion( scale2 = getScaleFactor32( x32, L_subfr ); FOR( i = 0; i < L_subfr / 2 - 1; i++ ) { code[i] = round_fx_sat( L_shl_sat( x32[2 * i + 0], scale2 ) ); code[i] = round_fx_sat( L_shl_sat( x32[2 * i], scale2 ) ); code[L_subfr - 1 - i] = round_fx_sat( L_shl_sat( x32[2 * i + 3], scale2 ) ); } code[L_subfr / 2 - 1] = round_fx( L_shl( x32[L_subfr - 2], scale2 ) ); code[L_subfr / 2] = round_fx( L_shl( x32[1], scale2 ) ); code[L_subfr / 2 - 1] = round_fx_sat( L_shl_sat( x32[L_subfr - 2], scale2 ) ); code[L_subfr / 2] = round_fx_sat( L_shl_sat( x32[1], scale2 ) ); j = sub( j, scale2 ); Loading lib_dec/evs_dec_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -1151,7 +1151,7 @@ ivas_error evs_dec_fx( FOR( i = 0; i < tmps; i++ ) { output_sp[i + delay_comp] = msu_r_sat( L_mult_sat( output_sp[i + delay_comp], alpha ), shr( hHQ_core->old_out_fx[i + nz], timeIn_e ), add( alpha, -32768 ) ); /*timeIn_e*/ output_sp[i + delay_comp] = msu_r_sat( L_mult_sat( output_sp[i + delay_comp], alpha ), shr_sat( hHQ_core->old_out_fx[i + nz], timeIn_e ), add( alpha, -32768 ) ); /*timeIn_e*/ move16(); alpha = add( alpha, step ); } Loading lib_dec/ivas_stereo_dft_dec_fx.c +2 −0 Original line number Diff line number Diff line Loading @@ -402,6 +402,8 @@ ivas_error stereo_dft_dec_create_fx( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TCX-LTP handle\n" ) ); } set_zero_fx( hStereoDft_loc->hb_nrg_subr_fx, STEREO_DFT_NBDIV ); /*Setting hb_nrg_subr_fx to zero*/ hStereoDft_loc->q_hb_nrg_subr = Q31; move16(); hStereoDft_loc->hConfig->force_mono_transmission = 0; move16(); Loading lib_enc/ivas_core_enc_fx.c +6 −13 Original line number Diff line number Diff line Loading @@ -675,12 +675,6 @@ ivas_error ivas_core_enc_fx( wb_bwe_enc_ivas_fx( st, new_inp_resamp16k_fx[n] ); } IF( st->hBWE_FD != NULL ) { Scale_sig( st->hBWE_FD->L_old_wtda_swb_fx, L_FRAME48k, Q1 ); // Q-1 -> Q0 st->Q_old_wtda = add( st->Q_old_wtda, Q1 ); move16(); } /*---------------------------------------------------------------------* * SWB(FB) TBE encoding Loading Loading @@ -725,8 +719,6 @@ ivas_error ivas_core_enc_fx( Scale_sig( st->hBWE_FD->L_old_wtda_swb_fx, L_FRAME48k, shift ); // st->Q_old_wtda } Word16 q_new_swb_speech_buffer = getScaleFactor16( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX ); Scale_sig( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX, q_new_swb_speech_buffer ); // Q0->q_new_swb_speech_buffer /* SWB TBE encoder */ test(); Loading @@ -751,10 +743,8 @@ ivas_error ivas_core_enc_fx( ELSE IF( EQ_16( st->extl, SWB_BWE ) || EQ_16( st->extl, FB_BWE ) ) { Copy_Scale_sig_32_16( shb_speech_fx32, shb_speech_fx, L_FRAME16k, -Q16 ); // Q_shb_spch - 16 Scale_sig( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX, negate( q_new_swb_speech_buffer ) ); // q_new_swb_speech_buffer -> Q0 /* SWB(FB) BWE encoder */ swb_bwe_enc_ivas_fx( st, last_element_mode, old_inp_12k8_fx[n], old_inp_16k_fx[n], old_syn_12k8_16k_fx[n], new_swb_speech_fx_16, shb_speech_fx, sub( Q_shb_spch, Q16 ), sub( Q_new[n], 1 ) ); Scale_sig( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX, q_new_swb_speech_buffer ); // Q0 -> q_new_swb_speech_buffer swb_bwe_enc_ivas_fx( st, last_element_mode, old_inp_12k8_fx[n], old_inp_16k_fx[n], old_syn_12k8_16k_fx[n], new_swb_speech_fx_16, st->q_inp, shb_speech_fx, sub( Q_shb_spch, Q16 ), sub( Q_new[n], 1 ) ); } Scale_sig( old_syn_12k8_16k_fx[n], L_FRAME16k, sub( Q1, Q_new[n] ) ); // Q0 Loading @@ -776,6 +766,9 @@ ivas_error ivas_core_enc_fx( * Inter-channel BWE encoding *-------------------------------------------------------------------*/ Word16 q_new_swb_speech_buffer = getScaleFactor16( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX ); Scale_sig( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX, q_new_swb_speech_buffer ); // st->q_inp+q_new_swb_speech_buffer q_new_swb_speech_buffer = add( st->q_inp, q_new_swb_speech_buffer ); test(); test(); IF( n == 0 && GE_32( input_Fs, 32000 ) && hStereoICBWE != NULL ) Loading @@ -784,7 +777,7 @@ ivas_error ivas_core_enc_fx( stereo_icBWE_preproc_fx( hCPE, input_frame, new_swb_speech_buffer_fx_16 /*tmp buffer*/, q_new_swb_speech_buffer ); q_new_swb_speech_buffer = add( q_new_swb_speech_buffer, 16 ); Copy_Scale_sig_16_32_no_sat( new_swb_speech_buffer_fx_16, new_swb_speech_buffer_fx, L_FRAME48k + STEREO_DFT_OVL_MAX, Q16 ); // q_new_swb_speech_buffer - 16 - > q_new_swb_speech_buffer Copy_Scale_sig_16_32_no_sat( new_swb_speech_buffer_fx_16, new_swb_speech_buffer_fx, L_FRAME48k + STEREO_DFT_OVL_MAX, Q16 ); // q_new_swb_speech_buffer+st->q_inp - 16 - > q_new_swb_speech_buffer+st->q_inp Copy_Scale_sig_16_32_no_sat( voice_factors_fx[0], voice_factors_fx32[0], NB_SUBFR16k, Q16 ); // Q31 stereo_icBWE_enc_ivas_fx( hCPE, shb_speech_fx32, sub( Q31, Q_shb_spch ), new_swb_speech_buffer_fx, sub( Q31, q_new_swb_speech_buffer ), voice_factors_fx32[0] ); Loading lib_enc/ivas_core_pre_proc_front_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -1425,7 +1425,7 @@ ivas_error pre_proc_front_ivas_fx( * TC frame selection *-----------------------------------------------------------------*/ st->clas = signal_clas_fx( st, inp_12k8_fx, ee_fx, *relE_fx, L_look, tdm_SM_last_clas ); /* Q0 */ st->clas = signal_clas_ivas_fx( st, inp_12k8_fx, ee_fx, *relE_fx, L_look, tdm_SM_last_clas ); /* Q0 */ move16(); select_TC_fx( MODE1, st->tc_cnt, &st->coder_type, st->localVAD ); Loading Loading
lib_com/phase_dispersion_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -114,12 +114,12 @@ void phase_dispersion( scale2 = getScaleFactor32( x32, L_subfr ); FOR( i = 0; i < L_subfr / 2 - 1; i++ ) { code[i] = round_fx_sat( L_shl_sat( x32[2 * i + 0], scale2 ) ); code[i] = round_fx_sat( L_shl_sat( x32[2 * i], scale2 ) ); code[L_subfr - 1 - i] = round_fx_sat( L_shl_sat( x32[2 * i + 3], scale2 ) ); } code[L_subfr / 2 - 1] = round_fx( L_shl( x32[L_subfr - 2], scale2 ) ); code[L_subfr / 2] = round_fx( L_shl( x32[1], scale2 ) ); code[L_subfr / 2 - 1] = round_fx_sat( L_shl_sat( x32[L_subfr - 2], scale2 ) ); code[L_subfr / 2] = round_fx_sat( L_shl_sat( x32[1], scale2 ) ); j = sub( j, scale2 ); Loading
lib_dec/evs_dec_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -1151,7 +1151,7 @@ ivas_error evs_dec_fx( FOR( i = 0; i < tmps; i++ ) { output_sp[i + delay_comp] = msu_r_sat( L_mult_sat( output_sp[i + delay_comp], alpha ), shr( hHQ_core->old_out_fx[i + nz], timeIn_e ), add( alpha, -32768 ) ); /*timeIn_e*/ output_sp[i + delay_comp] = msu_r_sat( L_mult_sat( output_sp[i + delay_comp], alpha ), shr_sat( hHQ_core->old_out_fx[i + nz], timeIn_e ), add( alpha, -32768 ) ); /*timeIn_e*/ move16(); alpha = add( alpha, step ); } Loading
lib_dec/ivas_stereo_dft_dec_fx.c +2 −0 Original line number Diff line number Diff line Loading @@ -402,6 +402,8 @@ ivas_error stereo_dft_dec_create_fx( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TCX-LTP handle\n" ) ); } set_zero_fx( hStereoDft_loc->hb_nrg_subr_fx, STEREO_DFT_NBDIV ); /*Setting hb_nrg_subr_fx to zero*/ hStereoDft_loc->q_hb_nrg_subr = Q31; move16(); hStereoDft_loc->hConfig->force_mono_transmission = 0; move16(); Loading
lib_enc/ivas_core_enc_fx.c +6 −13 Original line number Diff line number Diff line Loading @@ -675,12 +675,6 @@ ivas_error ivas_core_enc_fx( wb_bwe_enc_ivas_fx( st, new_inp_resamp16k_fx[n] ); } IF( st->hBWE_FD != NULL ) { Scale_sig( st->hBWE_FD->L_old_wtda_swb_fx, L_FRAME48k, Q1 ); // Q-1 -> Q0 st->Q_old_wtda = add( st->Q_old_wtda, Q1 ); move16(); } /*---------------------------------------------------------------------* * SWB(FB) TBE encoding Loading Loading @@ -725,8 +719,6 @@ ivas_error ivas_core_enc_fx( Scale_sig( st->hBWE_FD->L_old_wtda_swb_fx, L_FRAME48k, shift ); // st->Q_old_wtda } Word16 q_new_swb_speech_buffer = getScaleFactor16( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX ); Scale_sig( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX, q_new_swb_speech_buffer ); // Q0->q_new_swb_speech_buffer /* SWB TBE encoder */ test(); Loading @@ -751,10 +743,8 @@ ivas_error ivas_core_enc_fx( ELSE IF( EQ_16( st->extl, SWB_BWE ) || EQ_16( st->extl, FB_BWE ) ) { Copy_Scale_sig_32_16( shb_speech_fx32, shb_speech_fx, L_FRAME16k, -Q16 ); // Q_shb_spch - 16 Scale_sig( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX, negate( q_new_swb_speech_buffer ) ); // q_new_swb_speech_buffer -> Q0 /* SWB(FB) BWE encoder */ swb_bwe_enc_ivas_fx( st, last_element_mode, old_inp_12k8_fx[n], old_inp_16k_fx[n], old_syn_12k8_16k_fx[n], new_swb_speech_fx_16, shb_speech_fx, sub( Q_shb_spch, Q16 ), sub( Q_new[n], 1 ) ); Scale_sig( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX, q_new_swb_speech_buffer ); // Q0 -> q_new_swb_speech_buffer swb_bwe_enc_ivas_fx( st, last_element_mode, old_inp_12k8_fx[n], old_inp_16k_fx[n], old_syn_12k8_16k_fx[n], new_swb_speech_fx_16, st->q_inp, shb_speech_fx, sub( Q_shb_spch, Q16 ), sub( Q_new[n], 1 ) ); } Scale_sig( old_syn_12k8_16k_fx[n], L_FRAME16k, sub( Q1, Q_new[n] ) ); // Q0 Loading @@ -776,6 +766,9 @@ ivas_error ivas_core_enc_fx( * Inter-channel BWE encoding *-------------------------------------------------------------------*/ Word16 q_new_swb_speech_buffer = getScaleFactor16( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX ); Scale_sig( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX, q_new_swb_speech_buffer ); // st->q_inp+q_new_swb_speech_buffer q_new_swb_speech_buffer = add( st->q_inp, q_new_swb_speech_buffer ); test(); test(); IF( n == 0 && GE_32( input_Fs, 32000 ) && hStereoICBWE != NULL ) Loading @@ -784,7 +777,7 @@ ivas_error ivas_core_enc_fx( stereo_icBWE_preproc_fx( hCPE, input_frame, new_swb_speech_buffer_fx_16 /*tmp buffer*/, q_new_swb_speech_buffer ); q_new_swb_speech_buffer = add( q_new_swb_speech_buffer, 16 ); Copy_Scale_sig_16_32_no_sat( new_swb_speech_buffer_fx_16, new_swb_speech_buffer_fx, L_FRAME48k + STEREO_DFT_OVL_MAX, Q16 ); // q_new_swb_speech_buffer - 16 - > q_new_swb_speech_buffer Copy_Scale_sig_16_32_no_sat( new_swb_speech_buffer_fx_16, new_swb_speech_buffer_fx, L_FRAME48k + STEREO_DFT_OVL_MAX, Q16 ); // q_new_swb_speech_buffer+st->q_inp - 16 - > q_new_swb_speech_buffer+st->q_inp Copy_Scale_sig_16_32_no_sat( voice_factors_fx[0], voice_factors_fx32[0], NB_SUBFR16k, Q16 ); // Q31 stereo_icBWE_enc_ivas_fx( hCPE, shb_speech_fx32, sub( Q31, Q_shb_spch ), new_swb_speech_buffer_fx, sub( Q31, q_new_swb_speech_buffer ), voice_factors_fx32[0] ); Loading
lib_enc/ivas_core_pre_proc_front_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -1425,7 +1425,7 @@ ivas_error pre_proc_front_ivas_fx( * TC frame selection *-----------------------------------------------------------------*/ st->clas = signal_clas_fx( st, inp_12k8_fx, ee_fx, *relE_fx, L_look, tdm_SM_last_clas ); /* Q0 */ st->clas = signal_clas_ivas_fx( st, inp_12k8_fx, ee_fx, *relE_fx, L_look, tdm_SM_last_clas ); /* Q0 */ move16(); select_TC_fx( MODE1, st->tc_cnt, &st->coder_type, st->localVAD ); Loading