Loading lib_enc/cod_ace_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -290,8 +290,12 @@ Word16 coder_acelp_fx( /* o : SEGSNR for CL decision * IF( EQ_16( acelp_cfg->gains_mode[j_subfr], 7 ) ) { #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC gauss_L2_fx( st->element_mode, h1, code2, y2, y22, &gain_code2, &g_corr, gain_pit, hLPDmem->tilt_code, p_Aq, acelp_cfg->formant_enh_num, &( st->seed_acelp ), shift ); #else assert( gain_pit == 0 ); gauss_L2_fx( h1, code2, y2, y22, &gain_code2, &g_corr, gain_pit, hLPDmem->tilt_code, p_Aq, acelp_cfg->formant_enh_num, &( st->seed_acelp ), shift ); #endif } ELSE { Loading lib_enc/cod_uv_fx.c +47 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ *-------------------------------------------------------------------*/ void gauss_L2_fx( #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC const Word16 element_mode, /* i : element mode */ #endif const Word16 h[], /* i : weighted LP filter impulse response Q14+s */ Word16 code[], /* o : gaussian excitation Q9 */ const Word16 y2[], /* i : zero-memory filtered code. excitation Q9 */ Loading @@ -35,6 +38,17 @@ void gauss_L2_fx( { Word16 i, tmp16; Word32 tmp32, tmp32_2; #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC Word16 Q_fac; Q_fac = Q18; move16(); if ( element_mode != EVS_MONO ) { Q_fac = Q16; move16(); } #endif assert( gain_pit == 0 ); Loading Loading @@ -64,25 +78,55 @@ void gauss_L2_fx( Scale_sig( y11, L_SUBFR, sub( 1, shift ) ); /* Q9 */ *gain = L_deposit_l( 0 ); move32(); /*Update correlations for gains coding */ #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC tmp32 = L_shr( 21474836l /*0.01f Q31*/, 31 - Q_fac ); /* Q_fac */ tmp32_2 = L_shr( 21474836l /*0.01f Q31*/, 31 - Q_fac ); /* Q_fac */ #else tmp32 = L_shr( 21474836l /*0.01f Q31*/, 31 - 18 ); /* Q18 */ tmp32_2 = L_shr( 21474836l /*0.01f Q31*/, 31 - 18 ); /* Q18 */ #endif #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC IF( element_mode == EVS_MONO ) { #endif FOR( i = 0; i < L_SUBFR; i++ ) { tmp32 = L_mac0_sat( tmp32, y11[i], y11[i] ); /* Q18 */ tmp32_2 = L_mac0_sat( tmp32_2, y11[i], y2[i] ); /* Q18 */ } #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC } ELSE { FOR( i = 0; i < L_SUBFR; i++ ) { tmp16 = shr( y11[i], 1 ); tmp32 = L_mac0( tmp32, tmp16, tmp16 ); /* Q16 */ tmp32_2 = L_mac0( tmp32_2, tmp16, shr( y2[i], 1 ) ); /* Q16 */ } } #endif tmp16 = norm_l( tmp32 ); g_corr->y1y1 = round_fx_sat( L_shl( tmp32, tmp16 ) ); #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC g_corr->y1y1_e = sub( sub( 31, Q_fac ), tmp16 ); #else g_corr->y1y1_e = sub( 31 - 18, tmp16 ); #endif move16(); move16(); tmp16 = norm_l( tmp32_2 ); g_corr->y1y2 = round_fx_sat( L_shl( tmp32_2, tmp16 ) ); #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC g_corr->y1y2_e = sub( sub( 31, Q_fac ), tmp16 ); #else g_corr->y1y2_e = sub( 31 - 18, tmp16 ); #endif move16(); move16(); Loading lib_enc/enc_uv_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -180,13 +180,13 @@ void encod_unvoiced_fx( move16(); move16(); #ifndef FIX_2424_REMOVE_GAUSS_L2_ENC #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC gauss_L2_fx( st_fx->element_mode, h1_fx, code2, y2_fx, y22, &gain_code2, &g_corr, gain_pit_fx, hLPDmem->tilt_code, p_Aq_fx, acelp_cfg->formant_enh_num, &( st_fx->seed_acelp ), shift ); #else assert( gain_pit_fx == 0 ); IF( st_fx->element_mode == EVS_MONO ) { #endif gauss_L2_fx( h1_fx, code2, y2_fx, y22, &gain_code2, &g_corr, gain_pit_fx, hLPDmem->tilt_code, p_Aq_fx, acelp_cfg->formant_enh_num, &( st_fx->seed_acelp ), shift ); #ifndef FIX_2424_REMOVE_GAUSS_L2_ENC } ELSE { Loading lib_enc/prot_fx_enc.h +3 −0 Original line number Diff line number Diff line Loading @@ -2132,6 +2132,9 @@ void E_ACELP_xy2_corr( Word16 exp_xn ); void gauss_L2_fx( #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC const Word16 element_mode, /* i : element mode */ #endif const Word16 h[], /* i : weighted LP filter impulse response Q14+s */ Word16 code2[], /* o : gaussian excitation Q9 */ const Word16 y2[], /* i : zero-memory filtered code. excitation Q9 */ Loading Loading
lib_enc/cod_ace_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -290,8 +290,12 @@ Word16 coder_acelp_fx( /* o : SEGSNR for CL decision * IF( EQ_16( acelp_cfg->gains_mode[j_subfr], 7 ) ) { #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC gauss_L2_fx( st->element_mode, h1, code2, y2, y22, &gain_code2, &g_corr, gain_pit, hLPDmem->tilt_code, p_Aq, acelp_cfg->formant_enh_num, &( st->seed_acelp ), shift ); #else assert( gain_pit == 0 ); gauss_L2_fx( h1, code2, y2, y22, &gain_code2, &g_corr, gain_pit, hLPDmem->tilt_code, p_Aq, acelp_cfg->formant_enh_num, &( st->seed_acelp ), shift ); #endif } ELSE { Loading
lib_enc/cod_uv_fx.c +47 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ *-------------------------------------------------------------------*/ void gauss_L2_fx( #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC const Word16 element_mode, /* i : element mode */ #endif const Word16 h[], /* i : weighted LP filter impulse response Q14+s */ Word16 code[], /* o : gaussian excitation Q9 */ const Word16 y2[], /* i : zero-memory filtered code. excitation Q9 */ Loading @@ -35,6 +38,17 @@ void gauss_L2_fx( { Word16 i, tmp16; Word32 tmp32, tmp32_2; #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC Word16 Q_fac; Q_fac = Q18; move16(); if ( element_mode != EVS_MONO ) { Q_fac = Q16; move16(); } #endif assert( gain_pit == 0 ); Loading Loading @@ -64,25 +78,55 @@ void gauss_L2_fx( Scale_sig( y11, L_SUBFR, sub( 1, shift ) ); /* Q9 */ *gain = L_deposit_l( 0 ); move32(); /*Update correlations for gains coding */ #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC tmp32 = L_shr( 21474836l /*0.01f Q31*/, 31 - Q_fac ); /* Q_fac */ tmp32_2 = L_shr( 21474836l /*0.01f Q31*/, 31 - Q_fac ); /* Q_fac */ #else tmp32 = L_shr( 21474836l /*0.01f Q31*/, 31 - 18 ); /* Q18 */ tmp32_2 = L_shr( 21474836l /*0.01f Q31*/, 31 - 18 ); /* Q18 */ #endif #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC IF( element_mode == EVS_MONO ) { #endif FOR( i = 0; i < L_SUBFR; i++ ) { tmp32 = L_mac0_sat( tmp32, y11[i], y11[i] ); /* Q18 */ tmp32_2 = L_mac0_sat( tmp32_2, y11[i], y2[i] ); /* Q18 */ } #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC } ELSE { FOR( i = 0; i < L_SUBFR; i++ ) { tmp16 = shr( y11[i], 1 ); tmp32 = L_mac0( tmp32, tmp16, tmp16 ); /* Q16 */ tmp32_2 = L_mac0( tmp32_2, tmp16, shr( y2[i], 1 ) ); /* Q16 */ } } #endif tmp16 = norm_l( tmp32 ); g_corr->y1y1 = round_fx_sat( L_shl( tmp32, tmp16 ) ); #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC g_corr->y1y1_e = sub( sub( 31, Q_fac ), tmp16 ); #else g_corr->y1y1_e = sub( 31 - 18, tmp16 ); #endif move16(); move16(); tmp16 = norm_l( tmp32_2 ); g_corr->y1y2 = round_fx_sat( L_shl( tmp32_2, tmp16 ) ); #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC g_corr->y1y2_e = sub( sub( 31, Q_fac ), tmp16 ); #else g_corr->y1y2_e = sub( 31 - 18, tmp16 ); #endif move16(); move16(); Loading
lib_enc/enc_uv_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -180,13 +180,13 @@ void encod_unvoiced_fx( move16(); move16(); #ifndef FIX_2424_REMOVE_GAUSS_L2_ENC #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC gauss_L2_fx( st_fx->element_mode, h1_fx, code2, y2_fx, y22, &gain_code2, &g_corr, gain_pit_fx, hLPDmem->tilt_code, p_Aq_fx, acelp_cfg->formant_enh_num, &( st_fx->seed_acelp ), shift ); #else assert( gain_pit_fx == 0 ); IF( st_fx->element_mode == EVS_MONO ) { #endif gauss_L2_fx( h1_fx, code2, y2_fx, y22, &gain_code2, &g_corr, gain_pit_fx, hLPDmem->tilt_code, p_Aq_fx, acelp_cfg->formant_enh_num, &( st_fx->seed_acelp ), shift ); #ifndef FIX_2424_REMOVE_GAUSS_L2_ENC } ELSE { Loading
lib_enc/prot_fx_enc.h +3 −0 Original line number Diff line number Diff line Loading @@ -2132,6 +2132,9 @@ void E_ACELP_xy2_corr( Word16 exp_xn ); void gauss_L2_fx( #ifdef FIX_2424_REMOVE_GAUSS_L2_ENC const Word16 element_mode, /* i : element mode */ #endif const Word16 h[], /* i : weighted LP filter impulse response Q14+s */ Word16 code2[], /* o : gaussian excitation Q9 */ const Word16 y2[], /* i : zero-memory filtered code. excitation Q9 */ Loading