Loading lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -100,4 +100,6 @@ #define FIX_1009_OPT_PARAMMC_RENDER /* FhG: Optimize ivas_param_mc_dec_render_fx() */ #define FIX_1109_OPTIM_MCT_STEREO_IGF_DEC /* FhG: optimize mctStereoIGF_dec_fx() */ #define FIX_1110_OPTIM_DIRAC_DECORR_PROC /* FhG: optimize ivas_dirac_dec_decorr_process() */ #define FIX_1100_REMOVE_LPC_RESCALING /* VA: Remove the rescaling of LPC coefficient to Q12 as residu and syn-filt are already taking care of it*/ #endif lib_dec/acelp_core_dec_ivas_fx.c +10 −0 Original line number Diff line number Diff line Loading @@ -628,12 +628,14 @@ ivas_error acelp_core_dec_ivas_fx( IF( st->cng_type == LP_CNG ) { CNG_dec_ivas_fx( st, last_element_mode, Aq_fx, lsp_new_fx, lsf_new_fx, &allow_cn_step, sid_bw, q_env_fx ); #ifndef FIX_1100_REMOVE_LPC_RESCALING FOR( Word32 nsf = 0; nsf < NB_SUBFR16k; nsf++ ) { Scale_sig( Aq_fx + imult3216( nsf, ( M + 1 ) ), M + 1, sub( norm_s( Aq_fx[nsf * ( M + 1 )] ), Q2 ) ); Aq_fx[nsf * ( M + 1 )] = ONE_IN_Q12; move16(); } #endif Copy( Aq_fx, st->Aq_cng, add( M, 1 ) ); /* comfort noise generation */ Loading Loading @@ -761,7 +763,9 @@ ivas_error acelp_core_dec_ivas_fx( /* synthesis at 12.8kHz sampling rate */ #ifndef FIX_1100_REMOVE_LPC_RESCALING Aq_fx[0] = ONE_IN_Q12; #endif move16(); syn_12k8_fx( st->L_frame, Aq_fx, exc2_fx, psyn_fx, st->mem_syn2_fx, 1, st->Q_exc, st->Q_syn ); syn_12k8_fx( st->L_frame, Aq_fx, exc3_fx, syn1_fx, st->mem_syn3_fx, 1, st->Q_exc, st->Q_syn ); Loading Loading @@ -909,6 +913,7 @@ ivas_error acelp_core_dec_ivas_fx( st->stab_fac_fx = lsf_stab_ivas_fx( lsf_new_fx, st->lsf_old_fx, 0, st->L_frame ); move16(); } #ifndef FIX_1100_REMOVE_LPC_RESCALING #ifndef MSAN_FIX for ( int nsf = 0; nsf < NB_SUBFR16k; nsf++ ) #else Loading @@ -919,6 +924,7 @@ ivas_error acelp_core_dec_ivas_fx( Aq_fx[nsf * ( M + 1 )] = ONE_IN_Q12; move16(); } #endif test(); IF( EQ_16( st->last_core, HQ_CORE ) && st->element_mode > EVS_MONO ) { Loading Loading @@ -1254,6 +1260,7 @@ ivas_error acelp_core_dec_ivas_fx( lsf_dec_bfi( MODE1, lsf_new_fx, st->lsf_old_fx, st->lsf_adaptive_mean_fx, NULL, st->mem_MA_fx, st->mem_AR_fx, st->stab_fac_fx, st->last_coder_type, st->L_frame, st->last_good, st->nbLostCmpt, 0, NULL, NULL, NULL, st->hGSCDec->Last_GSC_pit_band_idx, st->Opt_AMR_WB, 0, st->bwidth ); FEC_lsf2lsp_interp( st, st->L_frame, Aq_fx, lsf_new_fx, lsp_new_fx ); #ifndef FIX_1100_REMOVE_LPC_RESCALING #ifndef MSAN_FIX for ( int nsf = 0; nsf < NB_SUBFR16k; nsf++ ) #else Loading @@ -1264,6 +1271,7 @@ ivas_error acelp_core_dec_ivas_fx( Aq_fx[nsf * ( M + 1 )] = ONE_IN_Q12; move16(); } #endif IF( EQ_16( st->nelp_mode_dec, 1 ) ) { /* SC-VBR */ Loading Loading @@ -2191,11 +2199,13 @@ ivas_error acelp_core_dec_ivas_fx( #else Copy_Scale_sig_32_16( synth_fx, synth_fx16, L_FRAME48k, 0 ); #endif #ifndef FIX_1100_REMOVE_LPC_RESCALING if ( st->hFdCngDec ) { st->hFdCngDec->hFdCngCom->A_cng[0] = ONE_IN_Q12; move16(); } #endif } pop_wmops(); Loading lib_dec/ivas_out_setup_conversion.c +7 −0 Original line number Diff line number Diff line Loading @@ -480,6 +480,13 @@ ivas_error ivas_ls_setup_conversion_open_fx( } set32_fx( hLsSetUpConversion->targetEnergyPrev_fx[0], 0, MAX_SFB + 2 ); set32_fx( hLsSetUpConversion->dmxEnergyPrev_fx[0], 0, MAX_SFB + 2 ); #ifdef MSAN_FIX hLsSetUpConversion->te_prev_exp[0] = 0; hLsSetUpConversion->dmx_prev_exp[0] = 0; move16(); move16(); #endif } /* Initialize the DMX conversion matrix */ Loading lib_dec/swb_tbe_dec.c +2 −0 Original line number Diff line number Diff line Loading @@ -1239,10 +1239,12 @@ void ivas_swb_tbe_dec_fx( tmp = i_mult( j, ( LPC_SHB_ORDER + 1 ) ); /* convert LSPs to LP coefficients */ E_LPC_f_lsp_a_conversion( lsp_temp_fx, lpc_shb_sf_fx + tmp, LPC_SHB_ORDER ); #ifndef FIX_1100_REMOVE_LPC_RESCALING /* Bring the LPCs to Q12 */ Copy_Scale_sig( lpc_shb_sf_fx + tmp, lpc_shb_sf_fx + tmp, LPC_SHB_ORDER + 1, sub( norm_s( lpc_shb_sf_fx[tmp] ), 2 ) ); lpc_shb_sf_fx[i_mult( j, ( LPC_SHB_ORDER + 1 ) )] = ONE_IN_Q12; // recheck this move16(); #endif } } Loading lib_enc/cod_tcx.c +1 −1 Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ void TNSAnalysisStereo_fx( ELSE { Word16 maxEnergyChange_fx; maxEnergyChange_fx = shr( add( GetTCXMaxenergyChange_ivas_fx( sts[0]->hTranDet, isTCX10, NSUBBLOCKS, 3 ), GetTCXMaxenergyChange_ivas_fx( sts[1]->hTranDet, isTCX10, NSUBBLOCKS, 3 ) ), 1 ); maxEnergyChange_fx = mac_r( L_mult( GetTCXMaxenergyChange_ivas_fx( sts[0]->hTranDet, isTCX10, NSUBBLOCKS, 3 ), 16384 ), GetTCXMaxenergyChange_ivas_fx( sts[1]->hTranDet, isTCX10, NSUBBLOCKS, 3 ), 16384 ); IF( GE_16( maxEnergyChange_fx, pTnsParameters[0]->minEnergyChange ) ) { Loading Loading
lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -100,4 +100,6 @@ #define FIX_1009_OPT_PARAMMC_RENDER /* FhG: Optimize ivas_param_mc_dec_render_fx() */ #define FIX_1109_OPTIM_MCT_STEREO_IGF_DEC /* FhG: optimize mctStereoIGF_dec_fx() */ #define FIX_1110_OPTIM_DIRAC_DECORR_PROC /* FhG: optimize ivas_dirac_dec_decorr_process() */ #define FIX_1100_REMOVE_LPC_RESCALING /* VA: Remove the rescaling of LPC coefficient to Q12 as residu and syn-filt are already taking care of it*/ #endif
lib_dec/acelp_core_dec_ivas_fx.c +10 −0 Original line number Diff line number Diff line Loading @@ -628,12 +628,14 @@ ivas_error acelp_core_dec_ivas_fx( IF( st->cng_type == LP_CNG ) { CNG_dec_ivas_fx( st, last_element_mode, Aq_fx, lsp_new_fx, lsf_new_fx, &allow_cn_step, sid_bw, q_env_fx ); #ifndef FIX_1100_REMOVE_LPC_RESCALING FOR( Word32 nsf = 0; nsf < NB_SUBFR16k; nsf++ ) { Scale_sig( Aq_fx + imult3216( nsf, ( M + 1 ) ), M + 1, sub( norm_s( Aq_fx[nsf * ( M + 1 )] ), Q2 ) ); Aq_fx[nsf * ( M + 1 )] = ONE_IN_Q12; move16(); } #endif Copy( Aq_fx, st->Aq_cng, add( M, 1 ) ); /* comfort noise generation */ Loading Loading @@ -761,7 +763,9 @@ ivas_error acelp_core_dec_ivas_fx( /* synthesis at 12.8kHz sampling rate */ #ifndef FIX_1100_REMOVE_LPC_RESCALING Aq_fx[0] = ONE_IN_Q12; #endif move16(); syn_12k8_fx( st->L_frame, Aq_fx, exc2_fx, psyn_fx, st->mem_syn2_fx, 1, st->Q_exc, st->Q_syn ); syn_12k8_fx( st->L_frame, Aq_fx, exc3_fx, syn1_fx, st->mem_syn3_fx, 1, st->Q_exc, st->Q_syn ); Loading Loading @@ -909,6 +913,7 @@ ivas_error acelp_core_dec_ivas_fx( st->stab_fac_fx = lsf_stab_ivas_fx( lsf_new_fx, st->lsf_old_fx, 0, st->L_frame ); move16(); } #ifndef FIX_1100_REMOVE_LPC_RESCALING #ifndef MSAN_FIX for ( int nsf = 0; nsf < NB_SUBFR16k; nsf++ ) #else Loading @@ -919,6 +924,7 @@ ivas_error acelp_core_dec_ivas_fx( Aq_fx[nsf * ( M + 1 )] = ONE_IN_Q12; move16(); } #endif test(); IF( EQ_16( st->last_core, HQ_CORE ) && st->element_mode > EVS_MONO ) { Loading Loading @@ -1254,6 +1260,7 @@ ivas_error acelp_core_dec_ivas_fx( lsf_dec_bfi( MODE1, lsf_new_fx, st->lsf_old_fx, st->lsf_adaptive_mean_fx, NULL, st->mem_MA_fx, st->mem_AR_fx, st->stab_fac_fx, st->last_coder_type, st->L_frame, st->last_good, st->nbLostCmpt, 0, NULL, NULL, NULL, st->hGSCDec->Last_GSC_pit_band_idx, st->Opt_AMR_WB, 0, st->bwidth ); FEC_lsf2lsp_interp( st, st->L_frame, Aq_fx, lsf_new_fx, lsp_new_fx ); #ifndef FIX_1100_REMOVE_LPC_RESCALING #ifndef MSAN_FIX for ( int nsf = 0; nsf < NB_SUBFR16k; nsf++ ) #else Loading @@ -1264,6 +1271,7 @@ ivas_error acelp_core_dec_ivas_fx( Aq_fx[nsf * ( M + 1 )] = ONE_IN_Q12; move16(); } #endif IF( EQ_16( st->nelp_mode_dec, 1 ) ) { /* SC-VBR */ Loading Loading @@ -2191,11 +2199,13 @@ ivas_error acelp_core_dec_ivas_fx( #else Copy_Scale_sig_32_16( synth_fx, synth_fx16, L_FRAME48k, 0 ); #endif #ifndef FIX_1100_REMOVE_LPC_RESCALING if ( st->hFdCngDec ) { st->hFdCngDec->hFdCngCom->A_cng[0] = ONE_IN_Q12; move16(); } #endif } pop_wmops(); Loading
lib_dec/ivas_out_setup_conversion.c +7 −0 Original line number Diff line number Diff line Loading @@ -480,6 +480,13 @@ ivas_error ivas_ls_setup_conversion_open_fx( } set32_fx( hLsSetUpConversion->targetEnergyPrev_fx[0], 0, MAX_SFB + 2 ); set32_fx( hLsSetUpConversion->dmxEnergyPrev_fx[0], 0, MAX_SFB + 2 ); #ifdef MSAN_FIX hLsSetUpConversion->te_prev_exp[0] = 0; hLsSetUpConversion->dmx_prev_exp[0] = 0; move16(); move16(); #endif } /* Initialize the DMX conversion matrix */ Loading
lib_dec/swb_tbe_dec.c +2 −0 Original line number Diff line number Diff line Loading @@ -1239,10 +1239,12 @@ void ivas_swb_tbe_dec_fx( tmp = i_mult( j, ( LPC_SHB_ORDER + 1 ) ); /* convert LSPs to LP coefficients */ E_LPC_f_lsp_a_conversion( lsp_temp_fx, lpc_shb_sf_fx + tmp, LPC_SHB_ORDER ); #ifndef FIX_1100_REMOVE_LPC_RESCALING /* Bring the LPCs to Q12 */ Copy_Scale_sig( lpc_shb_sf_fx + tmp, lpc_shb_sf_fx + tmp, LPC_SHB_ORDER + 1, sub( norm_s( lpc_shb_sf_fx[tmp] ), 2 ) ); lpc_shb_sf_fx[i_mult( j, ( LPC_SHB_ORDER + 1 ) )] = ONE_IN_Q12; // recheck this move16(); #endif } } Loading
lib_enc/cod_tcx.c +1 −1 Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ void TNSAnalysisStereo_fx( ELSE { Word16 maxEnergyChange_fx; maxEnergyChange_fx = shr( add( GetTCXMaxenergyChange_ivas_fx( sts[0]->hTranDet, isTCX10, NSUBBLOCKS, 3 ), GetTCXMaxenergyChange_ivas_fx( sts[1]->hTranDet, isTCX10, NSUBBLOCKS, 3 ) ), 1 ); maxEnergyChange_fx = mac_r( L_mult( GetTCXMaxenergyChange_ivas_fx( sts[0]->hTranDet, isTCX10, NSUBBLOCKS, 3 ), 16384 ), GetTCXMaxenergyChange_ivas_fx( sts[1]->hTranDet, isTCX10, NSUBBLOCKS, 3 ), 16384 ); IF( GE_16( maxEnergyChange_fx, pTnsParameters[0]->minEnergyChange ) ) { Loading