Loading lib_com/prot_fx.h +5 −0 Original line number Diff line number Diff line Loading @@ -2880,6 +2880,11 @@ void Calc_rc0_h( Word16 *rc0 /* o : 1st parcor */ ); void Calc_rc0_h_ivas_enc_fx( Word16 *h, /* i : impulse response of composed filter */ Word16 *rc0 /* o : 1st parcor */ ); void PostShortTerm_fx( Word16 *sig_in, /* i : i signal (pointer to current subframe */ Word16 *lpccoeff, /* i : LPC coefficients for current subframe */ Loading lib_com/swb_tbe_com_fx.c +59 −1 Original line number Diff line number Diff line Loading @@ -756,6 +756,64 @@ void Calc_rc0_h( Word16 *h, /* i : impulse response of composed filter */ Word16 *rc0 /* o : 1st parcor */ ) { Word32 L_acc; Word16 *ptrs; Word16 acf0, acf1; Word16 temp, sh_acf; Word16 i; /* computation of the autocorrelation function acf */ L_acc = L_mult( h[0], h[0] ); FOR( i = 1; i < LONG_H_ST; i++ ) { L_acc = L_mac( L_acc, h[i], h[i] ); } sh_acf = norm_l( L_acc ); L_acc = L_shl( L_acc, sh_acf ); acf0 = extract_h( L_acc ); ptrs = h; temp = *ptrs++; move16(); L_acc = L_mult( temp, *ptrs ); FOR( i = 1; i < LONG_H_ST - 1; i++ ) { temp = *ptrs++; move16(); L_acc = L_mac( L_acc, temp, *ptrs ); } L_acc = L_shl( L_acc, sh_acf ); acf1 = extract_h( L_acc ); /* Compute 1st parcor */ IF( acf0 == 0 ) { *rc0 = 0; move16(); return; } IF( LT_16( acf0, abs_s( acf1 ) ) ) { *rc0 = 0; move16(); return; } *rc0 = div_s( abs_s( acf1 ), acf0 ); move16(); IF( acf1 > 0 ) { *rc0 = negate( *rc0 ); move16(); } } void Calc_rc0_h_ivas_enc_fx( Word16 *h, /* i : impulse response of composed filter */ Word16 *rc0 /* o : 1st parcor */ ) { Word32 L_acc; Word16 *ptrs; Loading Loading @@ -869,7 +927,7 @@ static void Calc_st_filt_tbe_ivas_enc_fx( /* compute i.r. of composed filter apond2 / apond1 */ syn_filt_fx( temp, apond1, LPC_SHB_ORDER, apond2, h, LONG_H_ST, mem_zero, 0 ); /* compute 1st parcor */ Calc_rc0_h( h, parcor0 ); Calc_rc0_h_ivas_enc_fx( h, parcor0 ); /* compute g0 */ L_g0 = L_mult0( 1, abs_s( h[0] ) ); Loading Loading
lib_com/prot_fx.h +5 −0 Original line number Diff line number Diff line Loading @@ -2880,6 +2880,11 @@ void Calc_rc0_h( Word16 *rc0 /* o : 1st parcor */ ); void Calc_rc0_h_ivas_enc_fx( Word16 *h, /* i : impulse response of composed filter */ Word16 *rc0 /* o : 1st parcor */ ); void PostShortTerm_fx( Word16 *sig_in, /* i : i signal (pointer to current subframe */ Word16 *lpccoeff, /* i : LPC coefficients for current subframe */ Loading
lib_com/swb_tbe_com_fx.c +59 −1 Original line number Diff line number Diff line Loading @@ -756,6 +756,64 @@ void Calc_rc0_h( Word16 *h, /* i : impulse response of composed filter */ Word16 *rc0 /* o : 1st parcor */ ) { Word32 L_acc; Word16 *ptrs; Word16 acf0, acf1; Word16 temp, sh_acf; Word16 i; /* computation of the autocorrelation function acf */ L_acc = L_mult( h[0], h[0] ); FOR( i = 1; i < LONG_H_ST; i++ ) { L_acc = L_mac( L_acc, h[i], h[i] ); } sh_acf = norm_l( L_acc ); L_acc = L_shl( L_acc, sh_acf ); acf0 = extract_h( L_acc ); ptrs = h; temp = *ptrs++; move16(); L_acc = L_mult( temp, *ptrs ); FOR( i = 1; i < LONG_H_ST - 1; i++ ) { temp = *ptrs++; move16(); L_acc = L_mac( L_acc, temp, *ptrs ); } L_acc = L_shl( L_acc, sh_acf ); acf1 = extract_h( L_acc ); /* Compute 1st parcor */ IF( acf0 == 0 ) { *rc0 = 0; move16(); return; } IF( LT_16( acf0, abs_s( acf1 ) ) ) { *rc0 = 0; move16(); return; } *rc0 = div_s( abs_s( acf1 ), acf0 ); move16(); IF( acf1 > 0 ) { *rc0 = negate( *rc0 ); move16(); } } void Calc_rc0_h_ivas_enc_fx( Word16 *h, /* i : impulse response of composed filter */ Word16 *rc0 /* o : 1st parcor */ ) { Word32 L_acc; Word16 *ptrs; Loading Loading @@ -869,7 +927,7 @@ static void Calc_st_filt_tbe_ivas_enc_fx( /* compute i.r. of composed filter apond2 / apond1 */ syn_filt_fx( temp, apond1, LPC_SHB_ORDER, apond2, h, LONG_H_ST, mem_zero, 0 ); /* compute 1st parcor */ Calc_rc0_h( h, parcor0 ); Calc_rc0_h_ivas_enc_fx( h, parcor0 ); /* compute g0 */ L_g0 = L_mult0( 1, abs_s( h[0] ) ); Loading