Loading lib_com/float_to_fix_ops.c +99 −99 Original line number Diff line number Diff line Loading @@ -263,16 +263,16 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed( if ( reconf ) { H_IGF_GRID hGrid; //H_IGF_GRID hGrid; IGF_DEC_PRIVATE_DATA_HANDLE hPrivateData; hPrivateData = &st->hIGFDec->igfData; H_IGF_INFO hIGFInfo = &hPrivateData->igfInfo; //H_IGF_INFO hIGFInfo = &hPrivateData->igfInfo; //ACELP_config *pConfigAcelp = &( st->acelp_cfg ); Word16 i = 0, Q_old_synth = 0, Q_syn = 0, Q_synth_history = 0, /*Q_fer_samples = 0,*/ Q_cldfbAna_cldfb_state = 0, Q_cldfbBPF_cldfb_state = 0, Q_cldfbSyn_cldfb_state = 0, Q_cldfbSynHB_cldfb_state = 0, Q_cldfbAna_cldfb_state = 0, Q_cldfbBPF_cldfb_state = 0, Q_cldfbSyn_cldfb_state = 0, Q_cldfbSynHB_cldfb_state = 0;//, //Q_pst_old_syn = 0, delay_comp = 0; //delay_comp = 0; Word16 Q_lsf_cng = Q_factor( 6400 ); Word16 Q_tcxltp_mem_in = 0, Q_tcxltp_mem_out = 0; Loading @@ -281,24 +281,24 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed( if ( tofix ) { hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); delay_comp = NS2SA_fx2( st->output_Fs, DELAY_CLDFB_NS ); /*CLDFB delay*/ st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); st->L_frame = extract_l( Mult_32_16( st->sr_core, 0x0290 ) ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; //floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); //hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); //hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; //floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); //hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); //hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; //floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); //hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); //hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); //delay_comp = NS2SA_fx2( st->output_Fs, DELAY_CLDFB_NS ); /*CLDFB delay*/ //st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); //st->L_frame = extract_l( Mult_32_16( st->sr_core, 0x0290 ) ); IF( st->hTcxDec ) { Loading Loading @@ -369,26 +369,26 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed( } else { hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; //fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); //hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); //hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; //fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); //hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); //hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; //fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); //hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); //hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); IF( st->hIGFDec ) { st->hIGFDec->virtualSpec_float = &st->hIGFDec->virtualSpecBuf[0]; st->hIGFDec->igfData.pSpecFlat_float = &st->hIGFDec->igfData.pSpecFlatBuf[0]; st->hIGFDec->igfData.igfInfo.nfSeed = &st->hIGFDec->igfData.igfInfo.nfSeedBuf[0]; //st->hIGFDec->virtualSpec_float = &st->hIGFDec->virtualSpecBuf[0]; //st->hIGFDec->igfData.pSpecFlat_float = &st->hIGFDec->igfData.pSpecFlatBuf[0]; //st->hIGFDec->igfData.igfInfo.nfSeed = &st->hIGFDec->igfData.igfInfo.nfSeedBuf[0]; } //st->TcxBandwidth_float = fixedToFloat( st->TcxBandwidth, 15 ); Loading Loading @@ -484,16 +484,16 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( if ( reconf ) { H_IGF_GRID hGrid; //H_IGF_GRID hGrid; IGF_DEC_PRIVATE_DATA_HANDLE hPrivateData; hPrivateData = &st->hIGFDec->igfData; H_IGF_INFO hIGFInfo = &hPrivateData->igfInfo; //H_IGF_INFO hIGFInfo = &hPrivateData->igfInfo; //ACELP_config *pConfigAcelp = &( st->acelp_cfg ); Word16 /*i = 0,*/ Q_old_synth = 0, Q_syn = 0, Q_synth_history = 0, Q_old_exc = 0,/* Q_fer_samples = 0,*/ Q_cldfbAna_cldfb_state = 0, Q_cldfbBPF_cldfb_state = 0, Q_cldfbSyn_cldfb_state = 0, Q_cldfbSynHB_cldfb_state = 0, Q_cldfbAna_cldfb_state = 0, Q_cldfbBPF_cldfb_state = 0, Q_cldfbSyn_cldfb_state = 0, Q_cldfbSynHB_cldfb_state = 0;//, //Q_pst_old_syn = 0, delay_comp = 0; //delay_comp = 0; Word16 Q_tcxltp_mem_in = 0, Q_tcxltp_mem_out = 0; TD_BWE_DEC_HANDLE hBWE_TD = st->hBWE_TD; Loading @@ -501,24 +501,24 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( if ( tofix ) { hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); delay_comp = NS2SA_fx2( st->output_Fs, DELAY_CLDFB_NS ); /*CLDFB delay*/ st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); st->L_frame = extract_l( Mult_32_16( st->sr_core, 0x0290 ) ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; //floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); //hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); //hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; //floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); //hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); //hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; //floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); //hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); //hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); //delay_comp = NS2SA_fx2( st->output_Fs, DELAY_CLDFB_NS ); /*CLDFB delay*/ //st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); //st->L_frame = extract_l( Mult_32_16( st->sr_core, 0x0290 ) ); Q_syn = 0; IF( st->hTcxDec ) Loading Loading @@ -591,26 +591,26 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( { Q_old_exc = st->Q_exc; Q_syn = st->Q_syn; hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; //fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); //hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); //hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; //fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); //hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); //hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; //fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); //hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); //hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); IF( st->hIGFDec ) { st->hIGFDec->virtualSpec_float = &st->hIGFDec->virtualSpecBuf[0]; st->hIGFDec->igfData.pSpecFlat_float = &st->hIGFDec->igfData.pSpecFlatBuf[0]; st->hIGFDec->igfData.igfInfo.nfSeed = &st->hIGFDec->igfData.igfInfo.nfSeedBuf[0]; //st->hIGFDec->virtualSpec_float = &st->hIGFDec->virtualSpecBuf[0]; //st->hIGFDec->igfData.pSpecFlat_float = &st->hIGFDec->igfData.pSpecFlatBuf[0]; //st->hIGFDec->igfData.igfInfo.nfSeed = &st->hIGFDec->igfData.igfInfo.nfSeedBuf[0]; } IF( st->hBWE_TD != NULL ) { Loading Loading @@ -703,10 +703,10 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( st->Q_syn = 0; for ( int p = 0; p < st->L_frame; p++ ) { st->hTcxDec->old_excFB_fx[p] = (Word16) ( st->hTcxDec->old_excFB[p] * ( 1u << st->Q_exc ) ); } //for ( int p = 0; p < st->L_frame; p++ ) //{ // st->hTcxDec->old_excFB_fx[p] = (Word16) ( st->hTcxDec->old_excFB[p] * ( 1u << st->Q_exc ) ); //} st->prev_Q_syn = st->Q_syn; //st->hTcxDec->conceal_eof_gain = (Word16) floatToFixed( st->hTcxDec->conceal_eof_gain_float, Q14 ); st->hTcxDec->conCngLevelBackgroundTrace = (Word16) floatToFixed( st->hTcxDec->CngLevelBackgroundTrace_bfi, Q15 - st->hTcxDec->conCngLevelBackgroundTrace_e ); Loading Loading @@ -781,7 +781,7 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( st->hIGFDec->infoTCXNoise_evs[l] = (Word16)st->hIGFDec->infoTCXNoise[l]; } st->hFdCngDec->hFdCngCom->likelihood_noisy_speech = float_to_fix16(st->hFdCngDec->hFdCngCom->likelihood_noisy_speech_flt, 15); //st->hFdCngDec->hFdCngCom->likelihood_noisy_speech = float_to_fix16(st->hFdCngDec->hFdCngCom->likelihood_noisy_speech_flt, 15); floatToFixed_arr(st->hTcxDec->old_syn_Overl_float, st->hTcxDec->old_syn_Overl, st->Q_syn + 1, L_FRAME32k / 2); floatToFixed_arr(st->hTcxDec->syn_Overl_TDAC_float, st->hTcxDec->syn_Overl_TDAC, st->Q_syn, 320); Loading @@ -793,7 +793,7 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( void fixed_to_float_stereo_tcx_core_dec( Decoder_State *st, float *signal_out ) Word16 *signal_out ) { TCX_DEC_HANDLE hTcxDec = st->hTcxDec; //Word16 q_Aq; Loading @@ -815,17 +815,17 @@ void fixed_to_float_stereo_tcx_core_dec( st->hHQ_core->old_outLB[p] = (float) st->hHQ_core->old_out_LB_fx[p] / ( 1u << st->hHQ_core->Q_old_wtda ); st->hHQ_core->old_out[p] = (float) st->hHQ_core->old_out_fx[p] / ( 1u << st->hHQ_core->Q_old_wtda ); } for ( int p = 0; p < st->L_frame; p++ ) { st->hTcxDec->old_excFB[p] = (float) ( st->hTcxDec->old_excFB_fx[p] ) / ( 1u << st->Q_exc ); } //for ( int p = 0; p < st->L_frame; p++ ) //{ // st->hTcxDec->old_excFB[p] = (float) ( st->hTcxDec->old_excFB_fx[p] ) / ( 1u << st->Q_exc ); //} } if ( st->lpcQuantization ) { st->safety_net = st->safety_net; st->mid_lsf_int = st->mid_lsf_int; } //if ( st->lpcQuantization ) //{ // st->safety_net = st->safety_net; // st->mid_lsf_int = st->mid_lsf_int; //} hTcxDec->tcxltp_last_gain_unmodified_float = fixedToFloat( hTcxDec->tcxltp_last_gain_unmodified, Q15 ); Loading @@ -852,9 +852,9 @@ void fixed_to_float_stereo_tcx_core_dec( { if ( ( ( st->m_frame_type == ACTIVE_FRAME ) && ( ( st->bfi == 0 && ( signal_out == NULL || ( *signal_out<FLT_MAX && * signal_out>( -FLT_MAX ) && *( signal_out + st->hFdCngDec->hFdCngCom->frameSize - 1 ) < FLT_MAX && *( signal_out + st->hFdCngDec->hFdCngCom->frameSize - 1 ) > ( -FLT_MAX ) ) ) && ( *signal_out < MAXVAL_WORD16 && * signal_out>( MINVAL_WORD16 ) && *( signal_out + st->hFdCngDec->hFdCngCom->frameSize - 1 ) < MAXVAL_WORD16 && *( signal_out + st->hFdCngDec->hFdCngCom->frameSize - 1 ) > ( MINVAL_WORD16 ) ) ) && ( ( ( ( st->element_mode != IVAS_CPE_TD && st->element_mode != IVAS_CPE_DFT && st->hFdCngDec->flag_dtx_mode ) || !st->VAD || ( st->ini_frame < 100 && st->is_ism_format ) ) && !( st->cng_type == LP_CNG && st->hFdCngDec->flag_dtx_mode ) ) || ( st->element_mode == IVAS_CPE_TD ) ) && Loading Loading @@ -904,7 +904,7 @@ void fixed_to_float_stereo_tcx_core_dec( } } me2f_buf(st->hIGFDec->virtualSpec, st->hIGFDec->virtualSpec_e, st->hIGFDec->virtualSpecBuf, (N_MAX_TCX - IGF_START_MN)); //me2f_buf(st->hIGFDec->virtualSpec, st->hIGFDec->virtualSpec_e, st->hIGFDec->virtualSpecBuf, (N_MAX_TCX - IGF_START_MN)); IF( EQ_16( st->core, TCX_20_CORE ) || EQ_16( st->core, TCX_10_CORE ) ) { Loading lib_com/igf_base.c +3 −3 Original line number Diff line number Diff line Loading @@ -508,9 +508,9 @@ static void IGF_gridSetUp_flt( } #ifdef IVAS_FLOAT_FIXED hGrid->fFactor = float_to_fix16(hGrid->fFactor_flt, Q14); hGrid->lFactor = float_to_fix16(hGrid->lFactor_flt, Q14); hGrid->gFactor = float_to_fix16(hGrid->gFactor_flt, Q14); //hGrid->fFactor = float_to_fix16(hGrid->fFactor_flt, Q14); //hGrid->lFactor = float_to_fix16(hGrid->lFactor_flt, Q14); //hGrid->gFactor = float_to_fix16(hGrid->gFactor_flt, Q14); #endif return; Loading lib_com/ivas_prot.h +2 −2 Original line number Diff line number Diff line Loading @@ -510,9 +510,9 @@ ivas_error ivas_core_dec( CPE_DEC_HANDLE hCPE, /* i/o: CPE decoder structure */ MCT_DEC_HANDLE hMCT, /* i/o: MCT decoder structure */ const int16_t n_channels, /* i : number of channels to be decoded */ float *output[], /* o : output synthesis signal */ Word32 *output_fx[], /* o : output synthesis signal */ float outputHB[][L_FRAME48k], /* o : output HB synthesis signal */ float DFT[CPE_CHANNELS][STEREO_DFT_BUF_MAX], /* o : DFT buffers */ Word32 DFT_fx[CPE_CHANNELS][STEREO_DFT_BUF_MAX], /* o : DFT buffers */ const int16_t sba_dirac_stereo_flag /* i : signal stereo output for SBA DirAC */ ); Loading lib_com/prot_fx2.h +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( void fixed_to_float_stereo_tcx_core_dec( Decoder_State *st, float *signal_out Word16 *signal_out ); // Float to Word32 Word32 float_to_fix( float number, Word32 Q ); Loading lib_com/stat_com.h +2 −2 Original line number Diff line number Diff line Loading @@ -418,8 +418,8 @@ typedef struct #endif Word32 fftBuffer[FFTLEN]; Word16 fftBuffer_exp; Word16 *olapBufferAna; /* points to FD_CNG_DEC->olapBufferAna[320] in case of decoder */ Word16 olapBufferAna_fx[FFTLEN]; /* points to FD_CNG_DEC->olapBufferAna[320] in case of decoder */ Word16 *olapBufferAna; /* points to FD_CNG_DEC->olapBufferAna[FFTLEN] in case of decoder */ Word16 olapBufferAna_fx[FFTLEN]; /* points to FD_CNG_DEC->olapBufferAna[FFTLEN] in case of decoder */ Word16 olapBufferSynth[FFTLEN]; Word16 *olapBufferSynth2; /* points to FD_CNG_DEC->olapBufferSynth2[FFTLEN] in case of decoder */ const PWord16 * olapWinAna; Loading Loading
lib_com/float_to_fix_ops.c +99 −99 Original line number Diff line number Diff line Loading @@ -263,16 +263,16 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed( if ( reconf ) { H_IGF_GRID hGrid; //H_IGF_GRID hGrid; IGF_DEC_PRIVATE_DATA_HANDLE hPrivateData; hPrivateData = &st->hIGFDec->igfData; H_IGF_INFO hIGFInfo = &hPrivateData->igfInfo; //H_IGF_INFO hIGFInfo = &hPrivateData->igfInfo; //ACELP_config *pConfigAcelp = &( st->acelp_cfg ); Word16 i = 0, Q_old_synth = 0, Q_syn = 0, Q_synth_history = 0, /*Q_fer_samples = 0,*/ Q_cldfbAna_cldfb_state = 0, Q_cldfbBPF_cldfb_state = 0, Q_cldfbSyn_cldfb_state = 0, Q_cldfbSynHB_cldfb_state = 0, Q_cldfbAna_cldfb_state = 0, Q_cldfbBPF_cldfb_state = 0, Q_cldfbSyn_cldfb_state = 0, Q_cldfbSynHB_cldfb_state = 0;//, //Q_pst_old_syn = 0, delay_comp = 0; //delay_comp = 0; Word16 Q_lsf_cng = Q_factor( 6400 ); Word16 Q_tcxltp_mem_in = 0, Q_tcxltp_mem_out = 0; Loading @@ -281,24 +281,24 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed( if ( tofix ) { hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); delay_comp = NS2SA_fx2( st->output_Fs, DELAY_CLDFB_NS ); /*CLDFB delay*/ st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); st->L_frame = extract_l( Mult_32_16( st->sr_core, 0x0290 ) ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; //floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); //hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); //hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; //floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); //hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); //hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; //floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); //hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); //hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); //delay_comp = NS2SA_fx2( st->output_Fs, DELAY_CLDFB_NS ); /*CLDFB delay*/ //st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); //st->L_frame = extract_l( Mult_32_16( st->sr_core, 0x0290 ) ); IF( st->hTcxDec ) { Loading Loading @@ -369,26 +369,26 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed( } else { hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; //fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); //hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); //hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; //fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); //hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); //hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; //fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); //hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); //hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); IF( st->hIGFDec ) { st->hIGFDec->virtualSpec_float = &st->hIGFDec->virtualSpecBuf[0]; st->hIGFDec->igfData.pSpecFlat_float = &st->hIGFDec->igfData.pSpecFlatBuf[0]; st->hIGFDec->igfData.igfInfo.nfSeed = &st->hIGFDec->igfData.igfInfo.nfSeedBuf[0]; //st->hIGFDec->virtualSpec_float = &st->hIGFDec->virtualSpecBuf[0]; //st->hIGFDec->igfData.pSpecFlat_float = &st->hIGFDec->igfData.pSpecFlatBuf[0]; //st->hIGFDec->igfData.igfInfo.nfSeed = &st->hIGFDec->igfData.igfInfo.nfSeedBuf[0]; } //st->TcxBandwidth_float = fixedToFloat( st->TcxBandwidth, 15 ); Loading Loading @@ -484,16 +484,16 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( if ( reconf ) { H_IGF_GRID hGrid; //H_IGF_GRID hGrid; IGF_DEC_PRIVATE_DATA_HANDLE hPrivateData; hPrivateData = &st->hIGFDec->igfData; H_IGF_INFO hIGFInfo = &hPrivateData->igfInfo; //H_IGF_INFO hIGFInfo = &hPrivateData->igfInfo; //ACELP_config *pConfigAcelp = &( st->acelp_cfg ); Word16 /*i = 0,*/ Q_old_synth = 0, Q_syn = 0, Q_synth_history = 0, Q_old_exc = 0,/* Q_fer_samples = 0,*/ Q_cldfbAna_cldfb_state = 0, Q_cldfbBPF_cldfb_state = 0, Q_cldfbSyn_cldfb_state = 0, Q_cldfbSynHB_cldfb_state = 0, Q_cldfbAna_cldfb_state = 0, Q_cldfbBPF_cldfb_state = 0, Q_cldfbSyn_cldfb_state = 0, Q_cldfbSynHB_cldfb_state = 0;//, //Q_pst_old_syn = 0, delay_comp = 0; //delay_comp = 0; Word16 Q_tcxltp_mem_in = 0, Q_tcxltp_mem_out = 0; TD_BWE_DEC_HANDLE hBWE_TD = st->hBWE_TD; Loading @@ -501,24 +501,24 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( if ( tofix ) { hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); delay_comp = NS2SA_fx2( st->output_Fs, DELAY_CLDFB_NS ); /*CLDFB delay*/ st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); st->L_frame = extract_l( Mult_32_16( st->sr_core, 0x0290 ) ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; //floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); //hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); //hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; //floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); //hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); //hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; //floatToFixed_arr( &hGrid->whiteningThreshold_flt[0][0], &hGrid->whiteningThreshold[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor = (Word16) floatToFixed( hGrid->gFactor_flt, 14 ); //hGrid->fFactor = (Word16) floatToFixed( hGrid->fFactor_flt, 14 ); //hGrid->lFactor = (Word16) floatToFixed( hGrid->lFactor_flt, 14 ); //delay_comp = NS2SA_fx2( st->output_Fs, DELAY_CLDFB_NS ); /*CLDFB delay*/ //st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); //st->L_frame = extract_l( Mult_32_16( st->sr_core, 0x0290 ) ); Q_syn = 0; IF( st->hTcxDec ) Loading Loading @@ -591,26 +591,26 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( { Q_old_exc = st->Q_exc; Q_syn = st->Q_syn; hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_NORM]; //fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); //hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); //hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_TRAN]; //fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); //hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); //hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); //hGrid = &hIGFInfo->grid[IGF_GRID_LB_SHORT]; //fixedToFloat_arr( &hGrid->whiteningThreshold[0][0], &hGrid->whiteningThreshold_flt[0][0], 13, IGF_MAX_TILES * 2 ); //hGrid->gFactor_flt = fixedToFloat( hGrid->gFactor, 14 ); //hGrid->fFactor_flt = fixedToFloat( hGrid->fFactor, 14 ); //hGrid->lFactor_flt = fixedToFloat( hGrid->lFactor, 14 ); IF( st->hIGFDec ) { st->hIGFDec->virtualSpec_float = &st->hIGFDec->virtualSpecBuf[0]; st->hIGFDec->igfData.pSpecFlat_float = &st->hIGFDec->igfData.pSpecFlatBuf[0]; st->hIGFDec->igfData.igfInfo.nfSeed = &st->hIGFDec->igfData.igfInfo.nfSeedBuf[0]; //st->hIGFDec->virtualSpec_float = &st->hIGFDec->virtualSpecBuf[0]; //st->hIGFDec->igfData.pSpecFlat_float = &st->hIGFDec->igfData.pSpecFlatBuf[0]; //st->hIGFDec->igfData.igfInfo.nfSeed = &st->hIGFDec->igfData.igfInfo.nfSeedBuf[0]; } IF( st->hBWE_TD != NULL ) { Loading Loading @@ -703,10 +703,10 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( st->Q_syn = 0; for ( int p = 0; p < st->L_frame; p++ ) { st->hTcxDec->old_excFB_fx[p] = (Word16) ( st->hTcxDec->old_excFB[p] * ( 1u << st->Q_exc ) ); } //for ( int p = 0; p < st->L_frame; p++ ) //{ // st->hTcxDec->old_excFB_fx[p] = (Word16) ( st->hTcxDec->old_excFB[p] * ( 1u << st->Q_exc ) ); //} st->prev_Q_syn = st->Q_syn; //st->hTcxDec->conceal_eof_gain = (Word16) floatToFixed( st->hTcxDec->conceal_eof_gain_float, Q14 ); st->hTcxDec->conCngLevelBackgroundTrace = (Word16) floatToFixed( st->hTcxDec->CngLevelBackgroundTrace_bfi, Q15 - st->hTcxDec->conCngLevelBackgroundTrace_e ); Loading Loading @@ -781,7 +781,7 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( st->hIGFDec->infoTCXNoise_evs[l] = (Word16)st->hIGFDec->infoTCXNoise[l]; } st->hFdCngDec->hFdCngCom->likelihood_noisy_speech = float_to_fix16(st->hFdCngDec->hFdCngCom->likelihood_noisy_speech_flt, 15); //st->hFdCngDec->hFdCngCom->likelihood_noisy_speech = float_to_fix16(st->hFdCngDec->hFdCngCom->likelihood_noisy_speech_flt, 15); floatToFixed_arr(st->hTcxDec->old_syn_Overl_float, st->hTcxDec->old_syn_Overl, st->Q_syn + 1, L_FRAME32k / 2); floatToFixed_arr(st->hTcxDec->syn_Overl_TDAC_float, st->hTcxDec->syn_Overl_TDAC, st->Q_syn, 320); Loading @@ -793,7 +793,7 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( void fixed_to_float_stereo_tcx_core_dec( Decoder_State *st, float *signal_out ) Word16 *signal_out ) { TCX_DEC_HANDLE hTcxDec = st->hTcxDec; //Word16 q_Aq; Loading @@ -815,17 +815,17 @@ void fixed_to_float_stereo_tcx_core_dec( st->hHQ_core->old_outLB[p] = (float) st->hHQ_core->old_out_LB_fx[p] / ( 1u << st->hHQ_core->Q_old_wtda ); st->hHQ_core->old_out[p] = (float) st->hHQ_core->old_out_fx[p] / ( 1u << st->hHQ_core->Q_old_wtda ); } for ( int p = 0; p < st->L_frame; p++ ) { st->hTcxDec->old_excFB[p] = (float) ( st->hTcxDec->old_excFB_fx[p] ) / ( 1u << st->Q_exc ); } //for ( int p = 0; p < st->L_frame; p++ ) //{ // st->hTcxDec->old_excFB[p] = (float) ( st->hTcxDec->old_excFB_fx[p] ) / ( 1u << st->Q_exc ); //} } if ( st->lpcQuantization ) { st->safety_net = st->safety_net; st->mid_lsf_int = st->mid_lsf_int; } //if ( st->lpcQuantization ) //{ // st->safety_net = st->safety_net; // st->mid_lsf_int = st->mid_lsf_int; //} hTcxDec->tcxltp_last_gain_unmodified_float = fixedToFloat( hTcxDec->tcxltp_last_gain_unmodified, Q15 ); Loading @@ -852,9 +852,9 @@ void fixed_to_float_stereo_tcx_core_dec( { if ( ( ( st->m_frame_type == ACTIVE_FRAME ) && ( ( st->bfi == 0 && ( signal_out == NULL || ( *signal_out<FLT_MAX && * signal_out>( -FLT_MAX ) && *( signal_out + st->hFdCngDec->hFdCngCom->frameSize - 1 ) < FLT_MAX && *( signal_out + st->hFdCngDec->hFdCngCom->frameSize - 1 ) > ( -FLT_MAX ) ) ) && ( *signal_out < MAXVAL_WORD16 && * signal_out>( MINVAL_WORD16 ) && *( signal_out + st->hFdCngDec->hFdCngCom->frameSize - 1 ) < MAXVAL_WORD16 && *( signal_out + st->hFdCngDec->hFdCngCom->frameSize - 1 ) > ( MINVAL_WORD16 ) ) ) && ( ( ( ( st->element_mode != IVAS_CPE_TD && st->element_mode != IVAS_CPE_DFT && st->hFdCngDec->flag_dtx_mode ) || !st->VAD || ( st->ini_frame < 100 && st->is_ism_format ) ) && !( st->cng_type == LP_CNG && st->hFdCngDec->flag_dtx_mode ) ) || ( st->element_mode == IVAS_CPE_TD ) ) && Loading Loading @@ -904,7 +904,7 @@ void fixed_to_float_stereo_tcx_core_dec( } } me2f_buf(st->hIGFDec->virtualSpec, st->hIGFDec->virtualSpec_e, st->hIGFDec->virtualSpecBuf, (N_MAX_TCX - IGF_START_MN)); //me2f_buf(st->hIGFDec->virtualSpec, st->hIGFDec->virtualSpec_e, st->hIGFDec->virtualSpecBuf, (N_MAX_TCX - IGF_START_MN)); IF( EQ_16( st->core, TCX_20_CORE ) || EQ_16( st->core, TCX_10_CORE ) ) { Loading
lib_com/igf_base.c +3 −3 Original line number Diff line number Diff line Loading @@ -508,9 +508,9 @@ static void IGF_gridSetUp_flt( } #ifdef IVAS_FLOAT_FIXED hGrid->fFactor = float_to_fix16(hGrid->fFactor_flt, Q14); hGrid->lFactor = float_to_fix16(hGrid->lFactor_flt, Q14); hGrid->gFactor = float_to_fix16(hGrid->gFactor_flt, Q14); //hGrid->fFactor = float_to_fix16(hGrid->fFactor_flt, Q14); //hGrid->lFactor = float_to_fix16(hGrid->lFactor_flt, Q14); //hGrid->gFactor = float_to_fix16(hGrid->gFactor_flt, Q14); #endif return; Loading
lib_com/ivas_prot.h +2 −2 Original line number Diff line number Diff line Loading @@ -510,9 +510,9 @@ ivas_error ivas_core_dec( CPE_DEC_HANDLE hCPE, /* i/o: CPE decoder structure */ MCT_DEC_HANDLE hMCT, /* i/o: MCT decoder structure */ const int16_t n_channels, /* i : number of channels to be decoded */ float *output[], /* o : output synthesis signal */ Word32 *output_fx[], /* o : output synthesis signal */ float outputHB[][L_FRAME48k], /* o : output HB synthesis signal */ float DFT[CPE_CHANNELS][STEREO_DFT_BUF_MAX], /* o : DFT buffers */ Word32 DFT_fx[CPE_CHANNELS][STEREO_DFT_BUF_MAX], /* o : DFT buffers */ const int16_t sba_dirac_stereo_flag /* i : signal stereo output for SBA DirAC */ ); Loading
lib_com/prot_fx2.h +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( void fixed_to_float_stereo_tcx_core_dec( Decoder_State *st, float *signal_out Word16 *signal_out ); // Float to Word32 Word32 float_to_fix( float number, Word32 Q ); Loading
lib_com/stat_com.h +2 −2 Original line number Diff line number Diff line Loading @@ -418,8 +418,8 @@ typedef struct #endif Word32 fftBuffer[FFTLEN]; Word16 fftBuffer_exp; Word16 *olapBufferAna; /* points to FD_CNG_DEC->olapBufferAna[320] in case of decoder */ Word16 olapBufferAna_fx[FFTLEN]; /* points to FD_CNG_DEC->olapBufferAna[320] in case of decoder */ Word16 *olapBufferAna; /* points to FD_CNG_DEC->olapBufferAna[FFTLEN] in case of decoder */ Word16 olapBufferAna_fx[FFTLEN]; /* points to FD_CNG_DEC->olapBufferAna[FFTLEN] in case of decoder */ Word16 olapBufferSynth[FFTLEN]; Word16 *olapBufferSynth2; /* points to FD_CNG_DEC->olapBufferSynth2[FFTLEN] in case of decoder */ const PWord16 * olapWinAna; Loading