Loading lib_com/ivas_qspherical_com.c +19 −0 Original line number Diff line number Diff line Loading @@ -50,7 +50,25 @@ * ivas_qmetadata_reorder_generic() * *------------------------------------------------------------------------*/ #ifdef IVAS_FLOAT_FIXED UWord16 ivas_qmetadata_reorder_generic( const Word16 signed_value ) { UWord16 unsigned_value; IF( signed_value < 0 ) { // unsigned_value = ( ( UWord16 ) - ( signed_value + 1 ) << 1 ) + 1; unsigned_value = (UWord16) L_add( L_shl( negate( add( signed_value, 1 ) ), 1 ), 1 ); } ELSE { unsigned_value = (UWord16) L_shl( signed_value, 1 ); } return unsigned_value; } #else uint16_t ivas_qmetadata_reorder_generic( const int16_t signed_value ) { Loading @@ -67,6 +85,7 @@ uint16_t ivas_qmetadata_reorder_generic( return unsigned_value; } #endif /*------------------------------------------------------------------------- Loading lib_enc/ivas_core_enc.c +0 −6 Original line number Diff line number Diff line Loading @@ -1407,12 +1407,6 @@ ivas_error ivas_core_enc( IF( EQ_16( st->element_mode, IVAS_CPE_DFT ) ) { hStereoICBWE->mem_nrg_L[0] = hCPE->hStereoDft->nrg_L[0]; hStereoICBWE->mem_nrg_R[0] = hCPE->hStereoDft->nrg_R[0]; hStereoICBWE->mem_nrg_DMX[0] = hCPE->hStereoDft->nrg_DMX[0]; hStereoICBWE->mem_nrg_L[1] = hCPE->hStereoDft->nrg_L[1]; hStereoICBWE->mem_nrg_R[1] = hCPE->hStereoDft->nrg_R[1]; hStereoICBWE->mem_nrg_DMX[1] = hCPE->hStereoDft->nrg_DMX[1]; hStereoICBWE->prevSpecMapping = fixedToFloat( hStereoICBWE->prevSpecMapping_fx, 31 ); IF( ( st->extl == SWB_TBE || st->extl == FB_TBE ) && st->flag_ACELP16k == 1 ) { Loading lib_enc/ivas_core_pre_proc_front.c +3 −27 Original line number Diff line number Diff line Loading @@ -2792,17 +2792,9 @@ ivas_error pre_proc_front_ivas_fx( #ifdef IVAS_FLOAT_FIXED_CONVERSIONS Word16 non_staX_e, sp_div_e, epsP_e, max_e_Etot; floatToFixed_arr32( lsf_new, lsf_new_fx, Q15, M ); f2me( hStereoClassif->ratio_L, &hStereoClassif->ratio_L_fx, &hStereoClassif->ratio_L_e ); f2me_buf( hStereoClassif->voicing_ch1, hStereoClassif->voicing_ch1_fx, &hStereoClassif->voicing_ch1_e, 3 ); f2me_buf_16( st->voicing, st->voicing_fx, &st->voicing_e, 3 ); f2me( non_staX, &non_staX_fx, &non_staX_e ); f2me_buf( epsP, epsP_fx, &epsP_e, 17 ); f2me( hStereoClassif->non_sta_ch1, &hStereoClassif->non_sta_ch1_fx, &hStereoClassif->non_sta_ch1_e ); f2me( hStereoClassif->sp_div_ch1, &hStereoClassif->sp_div_ch1_fx, &hStereoClassif->sp_div_ch1_e ); f2me( hStereoClassif->ps_diff_ch1, &hStereoClassif->ps_diff_ch1_fx, &hStereoClassif->ps_diff_ch1_e ); f2me( hStereoClassif->ps_sta_ch1, &hStereoClassif->ps_sta_ch1_fx, &hStereoClassif->ps_sta_ch1_e ); f2me( hStereoClassif->ps_diff_ch2, &hStereoClassif->ps_diff_ch2_fx, &hStereoClassif->ps_diff_ch2_e ); f2me( hStereoClassif->ps_sta_ch2, &hStereoClassif->ps_sta_ch2_fx, &hStereoClassif->ps_sta_ch2_e ); f2me( sp_div, &sp_div_fx, &sp_div_e ); #endif // IVAS_FLOAT_FIXED_CONVERSIONS max_e_Etot = max( hStereoClassif->e_Etot_buf_fx, max( hStereoClassif->Etot_up_e, hStereoClassif->Etot_dn_e ) ); Loading @@ -2813,15 +2805,7 @@ ivas_error pre_proc_front_ivas_fx( stereo_classifier_features_ivas_fx( hStereoClassif, st->idchan, element_mode, localVAD_HE_SAD, lsf_new_fx, epsP_fx, st->pitch, st->voicing_fx, cor_map_sum_fx, non_staX_fx, sp_div_fx, st->clas, epsP_e, st->voicing_e, cor_map_sum_e, non_staX_e, sp_div_e ); #ifdef IVAS_FLOAT_FIXED_CONVERSIONS me2f_buf( hStereoClassif->voicing_ch1_fx, hStereoClassif->voicing_ch1_e, hStereoClassif->voicing_ch1, 3 ); hStereoClassif->non_sta_ch1 = me2f( hStereoClassif->non_sta_ch1_fx, hStereoClassif->non_sta_ch1_e ); hStereoClassif->sp_div_ch1 = me2f( hStereoClassif->sp_div_ch1_fx, hStereoClassif->sp_div_ch1_e ); hStereoClassif->ps_diff_ch1 = me2f( hStereoClassif->ps_diff_ch1_fx, hStereoClassif->ps_diff_ch1_e ); hStereoClassif->ps_sta_ch1 = me2f( hStereoClassif->ps_sta_ch1_fx, hStereoClassif->ps_sta_ch1_e ); hStereoClassif->ps_diff_ch2 = me2f( hStereoClassif->ps_diff_ch2_fx, hStereoClassif->ps_diff_ch2_e ); hStereoClassif->ps_sta_ch2 = me2f( hStereoClassif->ps_sta_ch2_fx, hStereoClassif->ps_sta_ch2_e ); #endif #else stereo_classifier_features( hStereoClassif, st->idchan, element_mode, localVAD_HE_SAD, lsf_new, epsP, st->pitch, st->voicing, *cor_map_sum, non_staX, sp_div, st->clas ); #endif // IVAS_FLOAT_FIXED Loading @@ -2842,7 +2826,7 @@ ivas_error pre_proc_front_ivas_fx( Word16 non_sta_fx = float_to_fix16( non_staX, Q6 ); Word16 Etot_fx_0 = float_to_fix16( Etot, Q8 ); floatToFixed_arr( lsp_new, lsp_new_fx, Q15, M ); hSpMusClas->wdlp_0_95_sp_fx = float_to_fix16( hSpMusClas->wdlp_0_95_sp, Q8 ); hSpMusClas->wdlp_0_95_sp_32fx = float_to_fix( hSpMusClas->wdlp_0_95_sp, Q24 ); hSpMusClas->wdlp_xtalk_fx = floatToFixed( hSpMusClas->wdlp_xtalk, Q19 ); hSpMusClas->wrise_fx = float_to_fix16( hSpMusClas->wrise, 9 ); relE_fx = float_to_fix16( *relE, 8 ); Loading Loading @@ -2872,7 +2856,7 @@ ivas_error pre_proc_front_ivas_fx( hSpMusClas->wdrop = fixedToFloat( hSpMusClas->wdrop_fx, Q9 ); // Q8 hSpMusClas->wrise = fixedToFloat( hSpMusClas->wrise_fx, Q9 ); // Q8 hSpMusClas->lt_dec_thres = fixedToFloat( hSpMusClas->lt_dec_thres_fx, Q9 ); // Q8 hSpMusClas->wdlp_0_95_sp = fixedToFloat( hSpMusClas->wdlp_0_95_sp_fx, Q8 ); hSpMusClas->wdlp_0_95_sp = fixedToFloat( hSpMusClas->wdlp_0_95_sp_32fx, Q24 ); hSpMusClas->dlp_mean_LT = fixedToFloat_32( hSpMusClas->dlp_mean_LT_fx, Q19 ); hSpMusClas->wdlp_xtalk = fixedToFloat( hSpMusClas->wdlp_xtalk_fx, Q19 ); hSpMusClas->dlp_var_LT = fixedToFloat_32( hSpMusClas->dlp_var_LT_fx, Q19 ); Loading @@ -2884,14 +2868,6 @@ ivas_error pre_proc_front_ivas_fx( fixedToFloat_arrL32( hSpMusClas->prev_FV_fx, hSpMusClas->prev_FV, Q20, 15 ); fixedToFloat_arrL32( hSpMusClas->past_dlp_mean_ST_fx, hSpMusClas->past_dlp_mean_ST, Q19, 7 ); hSpMusClas->dlp_mean_ST = fixedToFloat( hSpMusClas->dlp_mean_ST_fx, Q19 ); if ( hStereoClassif != NULL ) { hStereoClassif->ps_diff_ch1 = me2f( hStereoClassif->ps_diff_ch1_fx, hStereoClassif->ps_diff_ch1_e ); // Qfact_PS_past - 7 hStereoClassif->ps_sta_ch1 = me2f( hStereoClassif->ps_sta_ch1_fx, hStereoClassif->ps_sta_ch1_e ); // logf( ps_sta + 1e-5f );Q25 hStereoClassif->ps_diff_ch2 = me2f( hStereoClassif->ps_diff_ch2_fx, hStereoClassif->ps_diff_ch2_e ); hStereoClassif->ps_sta_ch2 = me2f( hStereoClassif->ps_sta_ch2_fx, hStereoClassif->ps_sta_ch2_e ); } #endif #endif Loading lib_enc/ivas_cpe_enc.c +11 −72 Original line number Diff line number Diff line Loading @@ -211,16 +211,11 @@ ivas_error ivas_cpe_enc( { #ifdef IVAS_FLOAT_FIXED #ifdef IVAS_FLOAT_FIXED_CONVERSIONS hCPE->hStereoClassif->is_speech_fx = floatToFixed_32( hCPE->hStereoClassif->is_speech, Q9 ); hCPE->hCoreCoder[0]->hSpMusClas->past_dlp_fx[0] = float_to_fix16( hCPE->hCoreCoder[0]->hSpMusClas->past_dlp[0], Q9 ); hCPE->hCoreCoder[0]->hSpMusClas->wdlp_xtalk_fx = floatToFixed( hCPE->hCoreCoder[0]->hSpMusClas->wdlp_xtalk, Q19 ); #endif hCPE->element_mode = select_stereo_mode( hCPE, ivas_format ); #ifdef IVAS_FLOAT_FIXED_CONVERSIONS hCPE->hStereoClassif->is_speech = fixedToFloat_32( hCPE->hStereoClassif->is_speech_fx, Q9 ); #endif #else hCPE->element_mode = select_stereo_mode( hCPE, ivas_format ); #endif Loading Loading @@ -700,34 +695,15 @@ ivas_error ivas_cpe_enc( floatToFixed_arr( &hCPE->hStereoDft->input_mem_itd[i][0], &hCPE->hStereoDft->input_mem_itd_fx[i][0], hCPE->hStereoDft->q_input_mem_itd[i], STEREO_DFT_OVL_MAX ); #endif // MSAN_FIX } floatToFixed_arrL( hCPE->hStereoDft->side_gain, hCPE->hStereoDft->side_gain_fx, Q31, STEREO_DFT_ENC_DFT_NB * STEREO_DFT_BAND_MAX ); floatToFixed_arrL( hCPE->hStereoDft->gipd, hCPE->hStereoDft->gipd_fx, Q13, STEREO_DFT_ENC_DFT_NB ); /* flt2fix end */ /*flt2fix: dft_td_itd*/ for ( i = 0; i < STEREO_DFT_N_32k_ENC; i++ ) { f2me( hCPE->hStereoDft->xspec_smooth[i], &hCPE->hStereoDft->xspec_smooth_fx[i], &hCPE->hStereoDft->xspec_smooth_fx_e[i] ); } f2me_buf( hCPE->hStereoDft->Spd_L_smooth, hCPE->hStereoDft->Spd_L_smooth_fx, &hCPE->hStereoDft->Spd_L_smooth_fx_e, STEREO_DFT_N_32k_ENC / 2 ); f2me_buf( hCPE->hStereoDft->Spd_R_smooth, hCPE->hStereoDft->Spd_R_smooth_fx, &hCPE->hStereoDft->Spd_R_smooth_fx_e, STEREO_DFT_N_32k_ENC / 2 ); floatToFixed_arrL( hCPE->hStereoDft->hItd->itd, hCPE->hStereoDft->hItd->itd_fx, 16, STEREO_DFT_ENC_DFT_NB ); floatToFixed_arrL( hCPE->hStereoClassif->unclr_fv, hCPE->hStereoClassif->unclr_fv_fx, 15, SSC_MAX_NFEA ); #ifndef MSAN_FIX hCPE->hStereoClassif->xtalk_score_fx = floatToFixed( hCPE->hStereoClassif->xtalk_score, 31 ); #endif // !MSAN_FIX /*flt2fix: dft_compute_prm*/ floatToFixed_arrL( hCPE->hStereoDft->sidSideGain, hCPE->hStereoDft->sidSideGain_fx, Q31, STEREO_DFT_ERB4_BANDS ); hCPE->hStereoDft->sid_gipd_fx = floatToFixed( hCPE->hStereoDft->sid_gipd, Q13 ); for ( i = 0; i < 2; i++ ) { f2me( hCPE->hStereoDft->nrg_L[i], &hCPE->hStereoDft->nrg_L_fx[i], &hCPE->hStereoDft->nrg_L_fx_e[i] ); f2me( hCPE->hStereoDft->nrg_R[i], &hCPE->hStereoDft->nrg_R_fx[i], &hCPE->hStereoDft->nrg_R_fx_e[i] ); f2me( hCPE->hStereoDft->nrg_DMX[i], &hCPE->hStereoDft->nrg_DMX_fx[i], &hCPE->hStereoDft->nrg_DMX_fx_e[i] ); } for ( i = 0; i < STEREO_DFT_BAND_MAX; i++ ) { f2me( hCPE->hStereoDft->res_cod_NRG_M[i], &hCPE->hStereoDft->res_cod_NRG_M_fx[i], &hCPE->hStereoDft->res_cod_NRG_M_fx_e[i] ); Loading @@ -751,6 +727,7 @@ ivas_error ivas_cpe_enc( floatToFixed_arrL( hCPE->hStereoDft->output_mem_dmx_16k, hCPE->hStereoDft->output_mem_dmx_16k_fx, 16, STEREO_DFT_OVL_16k ); floatToFixed_arrL( hCPE->hStereoDft->output_mem_dmx_16k_shb, hCPE->hStereoDft->output_mem_dmx_16k_shb_fx, 16, STEREO_DFT_OVL_16k ); floatToFixed_arrL( hCPE->hStereoDft->output_mem_dmx_32k, hCPE->hStereoDft->output_mem_dmx_32k_fx, 16, STEREO_DFT_OVL_32k ); /*flt2fix end*/ #endif #ifdef IVAS_FLOAT_FIXED Loading Loading @@ -877,18 +854,18 @@ ivas_error ivas_cpe_enc( hCPE->hStereoTD->tdm_last_ratio_fx = floatToFixed( hCPE->hStereoTD->tdm_last_ratio, Q31 ); hCPE->hStereoTD->tdm_last_ratio_SM_fx = floatToFixed( hCPE->hStereoTD->tdm_last_ratio_SM, Q31 ); #endif Word16 tmp; Word16 tdm_SM_flag; IF( hCPE->hStereoTD->tdm_LRTD_flag == 0 ) { tmp = tdm_SM_or_LRTD_Pri; tdm_SM_flag = tdm_SM_or_LRTD_Pri; move16(); } ELSE { tmp = 0; tdm_SM_flag = 0; move16(); } stereo_tdm_downmix_ivas_fx( hCPE->hStereoTD, input_fx[0], input_fx[1], input_frame, tdm_ratio_idx, tmp, tdm_ratio_idx_SM ); stereo_tdm_downmix_ivas_fx( hCPE->hStereoTD, input_fx[0], input_fx[1], input_frame, tdm_ratio_idx, tdm_SM_flag, tdm_ratio_idx_SM ); #ifdef IVAS_FLOAT_FIXED_CONVERSIONS hCPE->hStereoTD->tdm_last_ratio = fixedToFloat( hCPE->hStereoTD->tdm_last_ratio_fx, Q31 ); Loading Loading @@ -1008,48 +985,20 @@ ivas_error ivas_cpe_enc( #ifdef IVAS_FLOAT_FIXED_CONVERSIONS Word16 i; /* fix2flt: to be removed */ fixedToFloat_arrL( hCPE->hStereoDft->side_gain_fx, hCPE->hStereoDft->side_gain, Q31, STEREO_DFT_ENC_DFT_NB * STEREO_DFT_BAND_MAX ); fixedToFloat_arrL( hCPE->hStereoDft->gipd_fx, hCPE->hStereoDft->gipd, Q13, STEREO_DFT_ENC_DFT_NB ); FOR( i = 0; i < CPE_CHANNELS; i++ ) { // fixedToFloat_arr( sts[i]->input_fx, sts[i]->input, sts[i]->q_inp, 1965 ); // fixedToFloat_arr(sts[i]->old_input_signal_fx, sts[i]->old_input_signal, sts[i]->q_old_inp, 1965); fixedToFloat_arr( &hCPE->input_mem_fx[i][0], &hCPE->input_mem[i][0], hCPE->q_input_mem[i], NS2SA( input_Fs, STEREO_DFT_OVL_NS ) ); me2f_buf( hCPE->hStereoDft->DFT_fx[i], hCPE->hStereoDft->DFT_fx_e[i], hCPE->hStereoDft->DFT[i], STEREO_DFT_N_MAX_ENC ); #ifdef MSAN_FIX IF( hCPE->hStereoDft->hItd->td_itd[STEREO_DFT_OFFSET] != 0 && EQ_16( sts[0]->element_mode, IVAS_CPE_DFT ) ) { fixedToFloat_arr( &hCPE->hStereoDft->input_mem_itd_fx[i][0], &hCPE->hStereoDft->input_mem_itd[i][0], hCPE->hStereoDft->q_input_mem_itd[i], hCPE->hStereoDft->dft_ovl ); } #else fixedToFloat_arr( &hCPE->hStereoDft->input_mem_itd_fx[i][0], &hCPE->hStereoDft->input_mem_itd[i][0], hCPE->hStereoDft->q_input_mem_itd[i], STEREO_DFT_OVL_MAX ); #endif // MSAN_FIX } /* fix2flt end */ /*fix2flt: dft_td_itd*/ for ( i = 0; i < STEREO_DFT_N_32k_ENC; i++ ) { hCPE->hStereoDft->xspec_smooth[i] = me2f( hCPE->hStereoDft->xspec_smooth_fx[i], hCPE->hStereoDft->xspec_smooth_fx_e[i] ); } me2f_buf( hCPE->hStereoDft->Spd_L_smooth_fx, hCPE->hStereoDft->Spd_L_smooth_fx_e, hCPE->hStereoDft->Spd_L_smooth, STEREO_DFT_N_32k_ENC / 2 ); me2f_buf( hCPE->hStereoDft->Spd_R_smooth_fx, hCPE->hStereoDft->Spd_R_smooth_fx_e, hCPE->hStereoDft->Spd_R_smooth, STEREO_DFT_N_32k_ENC / 2 ); fixedToFloat_arrL( hCPE->hStereoDft->hItd->itd_fx, hCPE->hStereoDft->hItd->itd, 16, STEREO_DFT_ENC_DFT_NB ); fixedToFloat_arrL( hCPE->hStereoClassif->unclr_fv_fx, hCPE->hStereoClassif->unclr_fv, 15, SSC_MAX_NFEA ); fixedToFloat_arrL( hCPE->hStereoDft->sidSideGain_fx, hCPE->hStereoDft->sidSideGain, Q31, STEREO_DFT_ERB4_BANDS ); hCPE->hStereoDft->sid_gipd = fixedToFloat( hCPE->hStereoDft->sid_gipd_fx, Q13 ); /*local fix2flt*/ for ( i = 0; i < 2; i++ ) { hCPE->hStereoDft->nrg_L[i] = me2f( hCPE->hStereoDft->nrg_L_fx[i], hCPE->hStereoDft->nrg_L_fx_e[i] ); hCPE->hStereoDft->nrg_R[i] = me2f( hCPE->hStereoDft->nrg_R_fx[i], hCPE->hStereoDft->nrg_R_fx_e[i] ); hCPE->hStereoDft->nrg_DMX[i] = me2f( hCPE->hStereoDft->nrg_DMX_fx[i], hCPE->hStereoDft->nrg_DMX_fx_e[i] ); } for ( i = 0; i < STEREO_DFT_BAND_MAX; i++ ) { hCPE->hStereoDft->res_cod_NRG_M[i] = me2f( hCPE->hStereoDft->res_cod_NRG_M_fx[i], hCPE->hStereoDft->res_cod_NRG_M_fx_e[i] ); Loading @@ -1073,6 +1022,7 @@ ivas_error ivas_cpe_enc( fixedToFloat_arrL( hCPE->hStereoDft->output_mem_dmx_16k_fx, hCPE->hStereoDft->output_mem_dmx_16k, 16, STEREO_DFT_OVL_16k ); fixedToFloat_arrL( hCPE->hStereoDft->output_mem_dmx_16k_shb_fx, hCPE->hStereoDft->output_mem_dmx_16k_shb, 16, STEREO_DFT_OVL_16k ); fixedToFloat_arrL( hCPE->hStereoDft->output_mem_dmx_32k_fx, hCPE->hStereoDft->output_mem_dmx_32k, 16, STEREO_DFT_OVL_32k ); /*fix2flt end*/ #endif #else Loading Loading @@ -1410,21 +1360,7 @@ ivas_error ivas_cpe_enc( } ELSE { #ifdef IVAS_FLOAT_FIXED_CONVERSIONS /*flt2fix: dft_td_itd*/ for ( Word16 i = 0; i < STEREO_DFT_N_32k_ENC; i++ ) { f2me( hCPE->hStereoDft->xspec_smooth[i], &hCPE->hStereoDft->xspec_smooth_fx[i], &hCPE->hStereoDft->xspec_smooth_fx_e[i] ); } #endif stereo_dft_enc_write_BS_fx( hCPE, &nb_bits ); #ifdef IVAS_FLOAT_FIXED_CONVERSIONS /*fix2flt: dft_td_itd*/ for ( Word16 i = 0; i < STEREO_DFT_N_32k_ENC; i++ ) { hCPE->hStereoDft->xspec_smooth[i] = me2f( hCPE->hStereoDft->xspec_smooth_fx[i], hCPE->hStereoDft->xspec_smooth_fx_e[i] ); } #endif } /* Residual coding in MDCT domain */ Loading Loading @@ -2580,6 +2516,9 @@ ivas_error create_cpe_enc( } stereo_icBWE_init_enc( hCPE->hStereoICBWE ); #ifdef IVAS_FLOAT_FIXED stereo_icBWE_init_enc_fx( hCPE->hStereoICBWE ); #endif } /*-----------------------------------------------------------------* Loading lib_enc/ivas_front_vad.c +9 −8 Original line number Diff line number Diff line Loading @@ -1274,7 +1274,7 @@ ivas_error front_vad_spar( // Word32 epsP_fx[M + 1]; Word16 Etot_fx_0 = float_to_fix16( Etot[0], Q8 ); floatToFixed_arr( lsp_new, lsp_new_fx, Q15, M ); hSpMusClas->wdlp_0_95_sp_fx = float_to_fix16( hSpMusClas->wdlp_0_95_sp, Q8 ); hSpMusClas->wdlp_0_95_sp_32fx = float_to_fix( hSpMusClas->wdlp_0_95_sp, Q24 ); hSpMusClas->wdlp_xtalk_fx = floatToFixed( hSpMusClas->wdlp_xtalk, Q19 ); hSpMusClas->wrise_fx = float_to_fix16( hSpMusClas->wrise, 9 ); relE_fx = float_to_fix16( relE, 8 ); Loading @@ -1293,6 +1293,7 @@ ivas_error front_vad_spar( hSpMusClas->dlp_mean_ST_fx = float_to_fix( hSpMusClas->dlp_mean_ST, Q19 ); floatToFixed_arr32( hSpMusClas->past_dlp_mean_ST, hSpMusClas->past_dlp_mean_ST_fx, Q19, 7 ); floatToFixed_arr32( hSpMusClas->prev_FV, hSpMusClas->prev_FV_fx, Q20, 15 ); floatToFixed_arrL( hSpMusClas->FV_st, hSpMusClas->FV_st_fx, Q20, 15 ); #endif ivas_smc_gmm_fx( st, NULL, localVAD_HE_SAD[0], Etot_fx_0, lsp_new_fx, cor_map_sum_fx, epsP_fx, PS_fx, non_sta_fx, relE_fx, &high_lpn_flag, flag_spitch, Qfact_PS, Q_esp, Qfact_PS_past ); #if 1 Loading @@ -1300,10 +1301,10 @@ ivas_error front_vad_spar( hSpMusClas->lpm = fixedToFloat( hSpMusClas->lpm_fx, Q7 ); // Q7 hSpMusClas->lps = fixedToFloat( hSpMusClas->lps_fx, Q7 ); // Q7 hSpMusClas->lpn = fixedToFloat( hSpMusClas->lpn_fx, Q7 ); // Q7 hSpMusClas->wdrop = fixedToFloat( hSpMusClas->wdrop_fx, Q9 ); // Q8 hSpMusClas->wrise = fixedToFloat( hSpMusClas->wrise_fx, Q9 ); // Q8 hSpMusClas->lt_dec_thres = fixedToFloat( hSpMusClas->lt_dec_thres_fx, Q9 ); // Q8 hSpMusClas->wdlp_0_95_sp = fixedToFloat( hSpMusClas->wdlp_0_95_sp_fx, Q8 ); hSpMusClas->wdrop = fixedToFloat( hSpMusClas->wdrop_fx, Q9 ); // Q9 hSpMusClas->wrise = fixedToFloat( hSpMusClas->wrise_fx, Q9 ); // Q9 hSpMusClas->lt_dec_thres = fixedToFloat( hSpMusClas->lt_dec_thres_fx, Q9 ); // Q9 hSpMusClas->wdlp_0_95_sp = fixedToFloat( hSpMusClas->wdlp_0_95_sp_32fx, Q24 ); // Q24 hSpMusClas->dlp_mean_LT = fixedToFloat_32( hSpMusClas->dlp_mean_LT_fx, Q19 ); hSpMusClas->wdlp_xtalk = fixedToFloat( hSpMusClas->wdlp_xtalk_fx, Q19 ); hSpMusClas->dlp_var_LT = fixedToFloat_32( hSpMusClas->dlp_var_LT_fx, Q19 ); Loading Loading
lib_com/ivas_qspherical_com.c +19 −0 Original line number Diff line number Diff line Loading @@ -50,7 +50,25 @@ * ivas_qmetadata_reorder_generic() * *------------------------------------------------------------------------*/ #ifdef IVAS_FLOAT_FIXED UWord16 ivas_qmetadata_reorder_generic( const Word16 signed_value ) { UWord16 unsigned_value; IF( signed_value < 0 ) { // unsigned_value = ( ( UWord16 ) - ( signed_value + 1 ) << 1 ) + 1; unsigned_value = (UWord16) L_add( L_shl( negate( add( signed_value, 1 ) ), 1 ), 1 ); } ELSE { unsigned_value = (UWord16) L_shl( signed_value, 1 ); } return unsigned_value; } #else uint16_t ivas_qmetadata_reorder_generic( const int16_t signed_value ) { Loading @@ -67,6 +85,7 @@ uint16_t ivas_qmetadata_reorder_generic( return unsigned_value; } #endif /*------------------------------------------------------------------------- Loading
lib_enc/ivas_core_enc.c +0 −6 Original line number Diff line number Diff line Loading @@ -1407,12 +1407,6 @@ ivas_error ivas_core_enc( IF( EQ_16( st->element_mode, IVAS_CPE_DFT ) ) { hStereoICBWE->mem_nrg_L[0] = hCPE->hStereoDft->nrg_L[0]; hStereoICBWE->mem_nrg_R[0] = hCPE->hStereoDft->nrg_R[0]; hStereoICBWE->mem_nrg_DMX[0] = hCPE->hStereoDft->nrg_DMX[0]; hStereoICBWE->mem_nrg_L[1] = hCPE->hStereoDft->nrg_L[1]; hStereoICBWE->mem_nrg_R[1] = hCPE->hStereoDft->nrg_R[1]; hStereoICBWE->mem_nrg_DMX[1] = hCPE->hStereoDft->nrg_DMX[1]; hStereoICBWE->prevSpecMapping = fixedToFloat( hStereoICBWE->prevSpecMapping_fx, 31 ); IF( ( st->extl == SWB_TBE || st->extl == FB_TBE ) && st->flag_ACELP16k == 1 ) { Loading
lib_enc/ivas_core_pre_proc_front.c +3 −27 Original line number Diff line number Diff line Loading @@ -2792,17 +2792,9 @@ ivas_error pre_proc_front_ivas_fx( #ifdef IVAS_FLOAT_FIXED_CONVERSIONS Word16 non_staX_e, sp_div_e, epsP_e, max_e_Etot; floatToFixed_arr32( lsf_new, lsf_new_fx, Q15, M ); f2me( hStereoClassif->ratio_L, &hStereoClassif->ratio_L_fx, &hStereoClassif->ratio_L_e ); f2me_buf( hStereoClassif->voicing_ch1, hStereoClassif->voicing_ch1_fx, &hStereoClassif->voicing_ch1_e, 3 ); f2me_buf_16( st->voicing, st->voicing_fx, &st->voicing_e, 3 ); f2me( non_staX, &non_staX_fx, &non_staX_e ); f2me_buf( epsP, epsP_fx, &epsP_e, 17 ); f2me( hStereoClassif->non_sta_ch1, &hStereoClassif->non_sta_ch1_fx, &hStereoClassif->non_sta_ch1_e ); f2me( hStereoClassif->sp_div_ch1, &hStereoClassif->sp_div_ch1_fx, &hStereoClassif->sp_div_ch1_e ); f2me( hStereoClassif->ps_diff_ch1, &hStereoClassif->ps_diff_ch1_fx, &hStereoClassif->ps_diff_ch1_e ); f2me( hStereoClassif->ps_sta_ch1, &hStereoClassif->ps_sta_ch1_fx, &hStereoClassif->ps_sta_ch1_e ); f2me( hStereoClassif->ps_diff_ch2, &hStereoClassif->ps_diff_ch2_fx, &hStereoClassif->ps_diff_ch2_e ); f2me( hStereoClassif->ps_sta_ch2, &hStereoClassif->ps_sta_ch2_fx, &hStereoClassif->ps_sta_ch2_e ); f2me( sp_div, &sp_div_fx, &sp_div_e ); #endif // IVAS_FLOAT_FIXED_CONVERSIONS max_e_Etot = max( hStereoClassif->e_Etot_buf_fx, max( hStereoClassif->Etot_up_e, hStereoClassif->Etot_dn_e ) ); Loading @@ -2813,15 +2805,7 @@ ivas_error pre_proc_front_ivas_fx( stereo_classifier_features_ivas_fx( hStereoClassif, st->idchan, element_mode, localVAD_HE_SAD, lsf_new_fx, epsP_fx, st->pitch, st->voicing_fx, cor_map_sum_fx, non_staX_fx, sp_div_fx, st->clas, epsP_e, st->voicing_e, cor_map_sum_e, non_staX_e, sp_div_e ); #ifdef IVAS_FLOAT_FIXED_CONVERSIONS me2f_buf( hStereoClassif->voicing_ch1_fx, hStereoClassif->voicing_ch1_e, hStereoClassif->voicing_ch1, 3 ); hStereoClassif->non_sta_ch1 = me2f( hStereoClassif->non_sta_ch1_fx, hStereoClassif->non_sta_ch1_e ); hStereoClassif->sp_div_ch1 = me2f( hStereoClassif->sp_div_ch1_fx, hStereoClassif->sp_div_ch1_e ); hStereoClassif->ps_diff_ch1 = me2f( hStereoClassif->ps_diff_ch1_fx, hStereoClassif->ps_diff_ch1_e ); hStereoClassif->ps_sta_ch1 = me2f( hStereoClassif->ps_sta_ch1_fx, hStereoClassif->ps_sta_ch1_e ); hStereoClassif->ps_diff_ch2 = me2f( hStereoClassif->ps_diff_ch2_fx, hStereoClassif->ps_diff_ch2_e ); hStereoClassif->ps_sta_ch2 = me2f( hStereoClassif->ps_sta_ch2_fx, hStereoClassif->ps_sta_ch2_e ); #endif #else stereo_classifier_features( hStereoClassif, st->idchan, element_mode, localVAD_HE_SAD, lsf_new, epsP, st->pitch, st->voicing, *cor_map_sum, non_staX, sp_div, st->clas ); #endif // IVAS_FLOAT_FIXED Loading @@ -2842,7 +2826,7 @@ ivas_error pre_proc_front_ivas_fx( Word16 non_sta_fx = float_to_fix16( non_staX, Q6 ); Word16 Etot_fx_0 = float_to_fix16( Etot, Q8 ); floatToFixed_arr( lsp_new, lsp_new_fx, Q15, M ); hSpMusClas->wdlp_0_95_sp_fx = float_to_fix16( hSpMusClas->wdlp_0_95_sp, Q8 ); hSpMusClas->wdlp_0_95_sp_32fx = float_to_fix( hSpMusClas->wdlp_0_95_sp, Q24 ); hSpMusClas->wdlp_xtalk_fx = floatToFixed( hSpMusClas->wdlp_xtalk, Q19 ); hSpMusClas->wrise_fx = float_to_fix16( hSpMusClas->wrise, 9 ); relE_fx = float_to_fix16( *relE, 8 ); Loading Loading @@ -2872,7 +2856,7 @@ ivas_error pre_proc_front_ivas_fx( hSpMusClas->wdrop = fixedToFloat( hSpMusClas->wdrop_fx, Q9 ); // Q8 hSpMusClas->wrise = fixedToFloat( hSpMusClas->wrise_fx, Q9 ); // Q8 hSpMusClas->lt_dec_thres = fixedToFloat( hSpMusClas->lt_dec_thres_fx, Q9 ); // Q8 hSpMusClas->wdlp_0_95_sp = fixedToFloat( hSpMusClas->wdlp_0_95_sp_fx, Q8 ); hSpMusClas->wdlp_0_95_sp = fixedToFloat( hSpMusClas->wdlp_0_95_sp_32fx, Q24 ); hSpMusClas->dlp_mean_LT = fixedToFloat_32( hSpMusClas->dlp_mean_LT_fx, Q19 ); hSpMusClas->wdlp_xtalk = fixedToFloat( hSpMusClas->wdlp_xtalk_fx, Q19 ); hSpMusClas->dlp_var_LT = fixedToFloat_32( hSpMusClas->dlp_var_LT_fx, Q19 ); Loading @@ -2884,14 +2868,6 @@ ivas_error pre_proc_front_ivas_fx( fixedToFloat_arrL32( hSpMusClas->prev_FV_fx, hSpMusClas->prev_FV, Q20, 15 ); fixedToFloat_arrL32( hSpMusClas->past_dlp_mean_ST_fx, hSpMusClas->past_dlp_mean_ST, Q19, 7 ); hSpMusClas->dlp_mean_ST = fixedToFloat( hSpMusClas->dlp_mean_ST_fx, Q19 ); if ( hStereoClassif != NULL ) { hStereoClassif->ps_diff_ch1 = me2f( hStereoClassif->ps_diff_ch1_fx, hStereoClassif->ps_diff_ch1_e ); // Qfact_PS_past - 7 hStereoClassif->ps_sta_ch1 = me2f( hStereoClassif->ps_sta_ch1_fx, hStereoClassif->ps_sta_ch1_e ); // logf( ps_sta + 1e-5f );Q25 hStereoClassif->ps_diff_ch2 = me2f( hStereoClassif->ps_diff_ch2_fx, hStereoClassif->ps_diff_ch2_e ); hStereoClassif->ps_sta_ch2 = me2f( hStereoClassif->ps_sta_ch2_fx, hStereoClassif->ps_sta_ch2_e ); } #endif #endif Loading
lib_enc/ivas_cpe_enc.c +11 −72 Original line number Diff line number Diff line Loading @@ -211,16 +211,11 @@ ivas_error ivas_cpe_enc( { #ifdef IVAS_FLOAT_FIXED #ifdef IVAS_FLOAT_FIXED_CONVERSIONS hCPE->hStereoClassif->is_speech_fx = floatToFixed_32( hCPE->hStereoClassif->is_speech, Q9 ); hCPE->hCoreCoder[0]->hSpMusClas->past_dlp_fx[0] = float_to_fix16( hCPE->hCoreCoder[0]->hSpMusClas->past_dlp[0], Q9 ); hCPE->hCoreCoder[0]->hSpMusClas->wdlp_xtalk_fx = floatToFixed( hCPE->hCoreCoder[0]->hSpMusClas->wdlp_xtalk, Q19 ); #endif hCPE->element_mode = select_stereo_mode( hCPE, ivas_format ); #ifdef IVAS_FLOAT_FIXED_CONVERSIONS hCPE->hStereoClassif->is_speech = fixedToFloat_32( hCPE->hStereoClassif->is_speech_fx, Q9 ); #endif #else hCPE->element_mode = select_stereo_mode( hCPE, ivas_format ); #endif Loading Loading @@ -700,34 +695,15 @@ ivas_error ivas_cpe_enc( floatToFixed_arr( &hCPE->hStereoDft->input_mem_itd[i][0], &hCPE->hStereoDft->input_mem_itd_fx[i][0], hCPE->hStereoDft->q_input_mem_itd[i], STEREO_DFT_OVL_MAX ); #endif // MSAN_FIX } floatToFixed_arrL( hCPE->hStereoDft->side_gain, hCPE->hStereoDft->side_gain_fx, Q31, STEREO_DFT_ENC_DFT_NB * STEREO_DFT_BAND_MAX ); floatToFixed_arrL( hCPE->hStereoDft->gipd, hCPE->hStereoDft->gipd_fx, Q13, STEREO_DFT_ENC_DFT_NB ); /* flt2fix end */ /*flt2fix: dft_td_itd*/ for ( i = 0; i < STEREO_DFT_N_32k_ENC; i++ ) { f2me( hCPE->hStereoDft->xspec_smooth[i], &hCPE->hStereoDft->xspec_smooth_fx[i], &hCPE->hStereoDft->xspec_smooth_fx_e[i] ); } f2me_buf( hCPE->hStereoDft->Spd_L_smooth, hCPE->hStereoDft->Spd_L_smooth_fx, &hCPE->hStereoDft->Spd_L_smooth_fx_e, STEREO_DFT_N_32k_ENC / 2 ); f2me_buf( hCPE->hStereoDft->Spd_R_smooth, hCPE->hStereoDft->Spd_R_smooth_fx, &hCPE->hStereoDft->Spd_R_smooth_fx_e, STEREO_DFT_N_32k_ENC / 2 ); floatToFixed_arrL( hCPE->hStereoDft->hItd->itd, hCPE->hStereoDft->hItd->itd_fx, 16, STEREO_DFT_ENC_DFT_NB ); floatToFixed_arrL( hCPE->hStereoClassif->unclr_fv, hCPE->hStereoClassif->unclr_fv_fx, 15, SSC_MAX_NFEA ); #ifndef MSAN_FIX hCPE->hStereoClassif->xtalk_score_fx = floatToFixed( hCPE->hStereoClassif->xtalk_score, 31 ); #endif // !MSAN_FIX /*flt2fix: dft_compute_prm*/ floatToFixed_arrL( hCPE->hStereoDft->sidSideGain, hCPE->hStereoDft->sidSideGain_fx, Q31, STEREO_DFT_ERB4_BANDS ); hCPE->hStereoDft->sid_gipd_fx = floatToFixed( hCPE->hStereoDft->sid_gipd, Q13 ); for ( i = 0; i < 2; i++ ) { f2me( hCPE->hStereoDft->nrg_L[i], &hCPE->hStereoDft->nrg_L_fx[i], &hCPE->hStereoDft->nrg_L_fx_e[i] ); f2me( hCPE->hStereoDft->nrg_R[i], &hCPE->hStereoDft->nrg_R_fx[i], &hCPE->hStereoDft->nrg_R_fx_e[i] ); f2me( hCPE->hStereoDft->nrg_DMX[i], &hCPE->hStereoDft->nrg_DMX_fx[i], &hCPE->hStereoDft->nrg_DMX_fx_e[i] ); } for ( i = 0; i < STEREO_DFT_BAND_MAX; i++ ) { f2me( hCPE->hStereoDft->res_cod_NRG_M[i], &hCPE->hStereoDft->res_cod_NRG_M_fx[i], &hCPE->hStereoDft->res_cod_NRG_M_fx_e[i] ); Loading @@ -751,6 +727,7 @@ ivas_error ivas_cpe_enc( floatToFixed_arrL( hCPE->hStereoDft->output_mem_dmx_16k, hCPE->hStereoDft->output_mem_dmx_16k_fx, 16, STEREO_DFT_OVL_16k ); floatToFixed_arrL( hCPE->hStereoDft->output_mem_dmx_16k_shb, hCPE->hStereoDft->output_mem_dmx_16k_shb_fx, 16, STEREO_DFT_OVL_16k ); floatToFixed_arrL( hCPE->hStereoDft->output_mem_dmx_32k, hCPE->hStereoDft->output_mem_dmx_32k_fx, 16, STEREO_DFT_OVL_32k ); /*flt2fix end*/ #endif #ifdef IVAS_FLOAT_FIXED Loading Loading @@ -877,18 +854,18 @@ ivas_error ivas_cpe_enc( hCPE->hStereoTD->tdm_last_ratio_fx = floatToFixed( hCPE->hStereoTD->tdm_last_ratio, Q31 ); hCPE->hStereoTD->tdm_last_ratio_SM_fx = floatToFixed( hCPE->hStereoTD->tdm_last_ratio_SM, Q31 ); #endif Word16 tmp; Word16 tdm_SM_flag; IF( hCPE->hStereoTD->tdm_LRTD_flag == 0 ) { tmp = tdm_SM_or_LRTD_Pri; tdm_SM_flag = tdm_SM_or_LRTD_Pri; move16(); } ELSE { tmp = 0; tdm_SM_flag = 0; move16(); } stereo_tdm_downmix_ivas_fx( hCPE->hStereoTD, input_fx[0], input_fx[1], input_frame, tdm_ratio_idx, tmp, tdm_ratio_idx_SM ); stereo_tdm_downmix_ivas_fx( hCPE->hStereoTD, input_fx[0], input_fx[1], input_frame, tdm_ratio_idx, tdm_SM_flag, tdm_ratio_idx_SM ); #ifdef IVAS_FLOAT_FIXED_CONVERSIONS hCPE->hStereoTD->tdm_last_ratio = fixedToFloat( hCPE->hStereoTD->tdm_last_ratio_fx, Q31 ); Loading Loading @@ -1008,48 +985,20 @@ ivas_error ivas_cpe_enc( #ifdef IVAS_FLOAT_FIXED_CONVERSIONS Word16 i; /* fix2flt: to be removed */ fixedToFloat_arrL( hCPE->hStereoDft->side_gain_fx, hCPE->hStereoDft->side_gain, Q31, STEREO_DFT_ENC_DFT_NB * STEREO_DFT_BAND_MAX ); fixedToFloat_arrL( hCPE->hStereoDft->gipd_fx, hCPE->hStereoDft->gipd, Q13, STEREO_DFT_ENC_DFT_NB ); FOR( i = 0; i < CPE_CHANNELS; i++ ) { // fixedToFloat_arr( sts[i]->input_fx, sts[i]->input, sts[i]->q_inp, 1965 ); // fixedToFloat_arr(sts[i]->old_input_signal_fx, sts[i]->old_input_signal, sts[i]->q_old_inp, 1965); fixedToFloat_arr( &hCPE->input_mem_fx[i][0], &hCPE->input_mem[i][0], hCPE->q_input_mem[i], NS2SA( input_Fs, STEREO_DFT_OVL_NS ) ); me2f_buf( hCPE->hStereoDft->DFT_fx[i], hCPE->hStereoDft->DFT_fx_e[i], hCPE->hStereoDft->DFT[i], STEREO_DFT_N_MAX_ENC ); #ifdef MSAN_FIX IF( hCPE->hStereoDft->hItd->td_itd[STEREO_DFT_OFFSET] != 0 && EQ_16( sts[0]->element_mode, IVAS_CPE_DFT ) ) { fixedToFloat_arr( &hCPE->hStereoDft->input_mem_itd_fx[i][0], &hCPE->hStereoDft->input_mem_itd[i][0], hCPE->hStereoDft->q_input_mem_itd[i], hCPE->hStereoDft->dft_ovl ); } #else fixedToFloat_arr( &hCPE->hStereoDft->input_mem_itd_fx[i][0], &hCPE->hStereoDft->input_mem_itd[i][0], hCPE->hStereoDft->q_input_mem_itd[i], STEREO_DFT_OVL_MAX ); #endif // MSAN_FIX } /* fix2flt end */ /*fix2flt: dft_td_itd*/ for ( i = 0; i < STEREO_DFT_N_32k_ENC; i++ ) { hCPE->hStereoDft->xspec_smooth[i] = me2f( hCPE->hStereoDft->xspec_smooth_fx[i], hCPE->hStereoDft->xspec_smooth_fx_e[i] ); } me2f_buf( hCPE->hStereoDft->Spd_L_smooth_fx, hCPE->hStereoDft->Spd_L_smooth_fx_e, hCPE->hStereoDft->Spd_L_smooth, STEREO_DFT_N_32k_ENC / 2 ); me2f_buf( hCPE->hStereoDft->Spd_R_smooth_fx, hCPE->hStereoDft->Spd_R_smooth_fx_e, hCPE->hStereoDft->Spd_R_smooth, STEREO_DFT_N_32k_ENC / 2 ); fixedToFloat_arrL( hCPE->hStereoDft->hItd->itd_fx, hCPE->hStereoDft->hItd->itd, 16, STEREO_DFT_ENC_DFT_NB ); fixedToFloat_arrL( hCPE->hStereoClassif->unclr_fv_fx, hCPE->hStereoClassif->unclr_fv, 15, SSC_MAX_NFEA ); fixedToFloat_arrL( hCPE->hStereoDft->sidSideGain_fx, hCPE->hStereoDft->sidSideGain, Q31, STEREO_DFT_ERB4_BANDS ); hCPE->hStereoDft->sid_gipd = fixedToFloat( hCPE->hStereoDft->sid_gipd_fx, Q13 ); /*local fix2flt*/ for ( i = 0; i < 2; i++ ) { hCPE->hStereoDft->nrg_L[i] = me2f( hCPE->hStereoDft->nrg_L_fx[i], hCPE->hStereoDft->nrg_L_fx_e[i] ); hCPE->hStereoDft->nrg_R[i] = me2f( hCPE->hStereoDft->nrg_R_fx[i], hCPE->hStereoDft->nrg_R_fx_e[i] ); hCPE->hStereoDft->nrg_DMX[i] = me2f( hCPE->hStereoDft->nrg_DMX_fx[i], hCPE->hStereoDft->nrg_DMX_fx_e[i] ); } for ( i = 0; i < STEREO_DFT_BAND_MAX; i++ ) { hCPE->hStereoDft->res_cod_NRG_M[i] = me2f( hCPE->hStereoDft->res_cod_NRG_M_fx[i], hCPE->hStereoDft->res_cod_NRG_M_fx_e[i] ); Loading @@ -1073,6 +1022,7 @@ ivas_error ivas_cpe_enc( fixedToFloat_arrL( hCPE->hStereoDft->output_mem_dmx_16k_fx, hCPE->hStereoDft->output_mem_dmx_16k, 16, STEREO_DFT_OVL_16k ); fixedToFloat_arrL( hCPE->hStereoDft->output_mem_dmx_16k_shb_fx, hCPE->hStereoDft->output_mem_dmx_16k_shb, 16, STEREO_DFT_OVL_16k ); fixedToFloat_arrL( hCPE->hStereoDft->output_mem_dmx_32k_fx, hCPE->hStereoDft->output_mem_dmx_32k, 16, STEREO_DFT_OVL_32k ); /*fix2flt end*/ #endif #else Loading Loading @@ -1410,21 +1360,7 @@ ivas_error ivas_cpe_enc( } ELSE { #ifdef IVAS_FLOAT_FIXED_CONVERSIONS /*flt2fix: dft_td_itd*/ for ( Word16 i = 0; i < STEREO_DFT_N_32k_ENC; i++ ) { f2me( hCPE->hStereoDft->xspec_smooth[i], &hCPE->hStereoDft->xspec_smooth_fx[i], &hCPE->hStereoDft->xspec_smooth_fx_e[i] ); } #endif stereo_dft_enc_write_BS_fx( hCPE, &nb_bits ); #ifdef IVAS_FLOAT_FIXED_CONVERSIONS /*fix2flt: dft_td_itd*/ for ( Word16 i = 0; i < STEREO_DFT_N_32k_ENC; i++ ) { hCPE->hStereoDft->xspec_smooth[i] = me2f( hCPE->hStereoDft->xspec_smooth_fx[i], hCPE->hStereoDft->xspec_smooth_fx_e[i] ); } #endif } /* Residual coding in MDCT domain */ Loading Loading @@ -2580,6 +2516,9 @@ ivas_error create_cpe_enc( } stereo_icBWE_init_enc( hCPE->hStereoICBWE ); #ifdef IVAS_FLOAT_FIXED stereo_icBWE_init_enc_fx( hCPE->hStereoICBWE ); #endif } /*-----------------------------------------------------------------* Loading
lib_enc/ivas_front_vad.c +9 −8 Original line number Diff line number Diff line Loading @@ -1274,7 +1274,7 @@ ivas_error front_vad_spar( // Word32 epsP_fx[M + 1]; Word16 Etot_fx_0 = float_to_fix16( Etot[0], Q8 ); floatToFixed_arr( lsp_new, lsp_new_fx, Q15, M ); hSpMusClas->wdlp_0_95_sp_fx = float_to_fix16( hSpMusClas->wdlp_0_95_sp, Q8 ); hSpMusClas->wdlp_0_95_sp_32fx = float_to_fix( hSpMusClas->wdlp_0_95_sp, Q24 ); hSpMusClas->wdlp_xtalk_fx = floatToFixed( hSpMusClas->wdlp_xtalk, Q19 ); hSpMusClas->wrise_fx = float_to_fix16( hSpMusClas->wrise, 9 ); relE_fx = float_to_fix16( relE, 8 ); Loading @@ -1293,6 +1293,7 @@ ivas_error front_vad_spar( hSpMusClas->dlp_mean_ST_fx = float_to_fix( hSpMusClas->dlp_mean_ST, Q19 ); floatToFixed_arr32( hSpMusClas->past_dlp_mean_ST, hSpMusClas->past_dlp_mean_ST_fx, Q19, 7 ); floatToFixed_arr32( hSpMusClas->prev_FV, hSpMusClas->prev_FV_fx, Q20, 15 ); floatToFixed_arrL( hSpMusClas->FV_st, hSpMusClas->FV_st_fx, Q20, 15 ); #endif ivas_smc_gmm_fx( st, NULL, localVAD_HE_SAD[0], Etot_fx_0, lsp_new_fx, cor_map_sum_fx, epsP_fx, PS_fx, non_sta_fx, relE_fx, &high_lpn_flag, flag_spitch, Qfact_PS, Q_esp, Qfact_PS_past ); #if 1 Loading @@ -1300,10 +1301,10 @@ ivas_error front_vad_spar( hSpMusClas->lpm = fixedToFloat( hSpMusClas->lpm_fx, Q7 ); // Q7 hSpMusClas->lps = fixedToFloat( hSpMusClas->lps_fx, Q7 ); // Q7 hSpMusClas->lpn = fixedToFloat( hSpMusClas->lpn_fx, Q7 ); // Q7 hSpMusClas->wdrop = fixedToFloat( hSpMusClas->wdrop_fx, Q9 ); // Q8 hSpMusClas->wrise = fixedToFloat( hSpMusClas->wrise_fx, Q9 ); // Q8 hSpMusClas->lt_dec_thres = fixedToFloat( hSpMusClas->lt_dec_thres_fx, Q9 ); // Q8 hSpMusClas->wdlp_0_95_sp = fixedToFloat( hSpMusClas->wdlp_0_95_sp_fx, Q8 ); hSpMusClas->wdrop = fixedToFloat( hSpMusClas->wdrop_fx, Q9 ); // Q9 hSpMusClas->wrise = fixedToFloat( hSpMusClas->wrise_fx, Q9 ); // Q9 hSpMusClas->lt_dec_thres = fixedToFloat( hSpMusClas->lt_dec_thres_fx, Q9 ); // Q9 hSpMusClas->wdlp_0_95_sp = fixedToFloat( hSpMusClas->wdlp_0_95_sp_32fx, Q24 ); // Q24 hSpMusClas->dlp_mean_LT = fixedToFloat_32( hSpMusClas->dlp_mean_LT_fx, Q19 ); hSpMusClas->wdlp_xtalk = fixedToFloat( hSpMusClas->wdlp_xtalk_fx, Q19 ); hSpMusClas->dlp_var_LT = fixedToFloat_32( hSpMusClas->dlp_var_LT_fx, Q19 ); Loading