Loading lib_com/modif_fs_fx.c +31 −2 Original line number Diff line number Diff line Loading @@ -994,11 +994,19 @@ void interpolate_3_over_2_allpass_fx( Vu[1] = mem[1] + filt_coeff[1] * ( Vu[0] - mem[2] ); mem[3] = mem[2] + filt_coeff[2] * ( Vu[1] - mem[3] );*/ #ifdef BASOP_NOGLOB Vu[0] = add_sat(mem_fx[0], mult_r_sat(filt_coeff_fx[0], sub_sat(input_fx_temp[i], mem_fx[1]))); move16();/* all Vu's in : Q_current*/ Vu[1] = add_sat(mem_fx[1], mult_r_sat(filt_coeff_fx[1], sub_sat(Vu[0], mem_fx[2]))); move16(); mem_fx[3] = add_sat(mem_fx[2], mult_r_sat(filt_coeff_fx[2], sub_sat(Vu[1], mem_fx[3]))); #else Vu[0] = add(mem_fx[0], mult_r(filt_coeff_fx[0], sub(input_fx_temp[i], mem_fx[1]))); move16();/* all Vu's in : Q_current*/ Vu[1] = add(mem_fx[1], mult_r(filt_coeff_fx[1], sub(Vu[0], mem_fx[2]))); move16(); mem_fx[3] = add(mem_fx[2], mult_r(filt_coeff_fx[2], sub(Vu[1], mem_fx[3]))); #endif move16(); Loading @@ -1013,13 +1021,21 @@ void interpolate_3_over_2_allpass_fx( /* Vm[0] = mem[0] + filt_coeff[3] * (input[i]-mem[4]); Vm[1] = mem[4] + filt_coeff[4] * (Vm[0]-mem[5]); mem[6] = mem[5] + filt_coeff[5] * (Vm[1]-mem[6]); */ #ifdef BASOP_NOGLOB Vm[0] = add_sat(mem_fx[0], mult_r_sat(filt_coeff_fx[3], sub_sat(input_fx_temp[i], mem_fx[4]))); move16(); Vm[1] = add_sat(mem_fx[4], mult_r_sat(filt_coeff_fx[4], sub_sat(Vm[0], mem_fx[5]))); move16(); mem_fx[6] = add_sat(mem_fx[5], mult_r_sat(filt_coeff_fx[5], sub_sat(Vm[1], mem_fx[6]))); move16(); #else Vm[0] = add(mem_fx[0], mult_r(filt_coeff_fx[3], sub(input_fx_temp[i], mem_fx[4]))); move16(); Vm[1] = add(mem_fx[4], mult_r(filt_coeff_fx[4], sub(Vm[0], mem_fx[5]))); move16(); mem_fx[6] = add(mem_fx[5], mult_r(filt_coeff_fx[5], sub(Vm[1], mem_fx[6]))); move16(); #endif mem_fx[4] = Vm[0]; move16(); mem_fx[5] = Vm[1]; Loading @@ -1031,13 +1047,21 @@ void interpolate_3_over_2_allpass_fx( /* Vl[0] = mem[0] + filt_coeff[6] * (input[i]-mem[7]); Vl[1] = mem[7] + filt_coeff[7] * (Vl[0]-mem[8]); mem[9] = mem[8] + filt_coeff[8] * (Vl[1]-mem[9]); */ #ifdef BASOP_NOGLOB Vl[0] = add_sat(mem_fx[0], mult_r_sat(filt_coeff_fx[6], sub_sat(input_fx_temp[i], mem_fx[7]))); move16(); Vl[1] = add_sat(mem_fx[7], mult_r_sat(filt_coeff_fx[7], sub_sat(Vl[0], mem_fx[8]))); move16(); mem_fx[9] = add_sat(mem_fx[8], mult_r_sat(filt_coeff_fx[8], sub_sat(Vl[1], mem_fx[9]))); move16(); #else Vl[0] = add(mem_fx[0], mult_r(filt_coeff_fx[6], sub(input_fx_temp[i], mem_fx[7]))); move16(); Vl[1] = add(mem_fx[7], mult_r(filt_coeff_fx[7], sub(Vl[0], mem_fx[8]))); move16(); mem_fx[9] = add(mem_fx[8], mult_r(filt_coeff_fx[8], sub(Vl[1], mem_fx[9]))); move16(); #endif mem_fx[0] = input_fx_temp[i]; move16(); mem_fx[7] = Vl[0]; Loading @@ -1056,8 +1080,13 @@ void interpolate_3_over_2_allpass_fx( { mem_temp = out1_buff[shl(i,1)]; move16(); #ifdef BASOP_NOGLOB out_fx[i] = add_sat( mult_r_sat( 1550/* 0.0473147f Q15*/,add_sat(mem_temp,mem_fx[10]) ), mult_r_sat( -4965/*-0.151521f Q15*/,add_sat(mem_fx[11],mem_fx[14]) ) ); out_fx[i] = add_sat( out_fx[i], mult_r_sat( 20125/*0.614152f Q15*/,add_sat(mem_fx[12],mem_fx[13]) ) ); #else out_fx[i] = add( mult_r( 1550/* 0.0473147f Q15*/,add(mem_temp,mem_fx[10]) ), mult_r( -4965/*-0.151521f Q15*/,add(mem_fx[11],mem_fx[14]) ) ); out_fx[i] = add( out_fx[i], mult_r( 20125/*0.614152f Q15*/,add(mem_fx[12],mem_fx[13]) ) ); #endif mem_fx[10] = mem_fx[11]; move16(); mem_fx[11] = mem_fx[12]; Loading lib_com/swb_tbe_com_fx.c +44 −5 Original line number Diff line number Diff line Loading @@ -3402,47 +3402,86 @@ void elliptic_bpf_48k_generic_fx( L_tmpX = L_add(L_shr(Mult_32_16(memory2_fx[1][2],full_band_bpf_fx[1][2]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(memory2_fx[1][3],full_band_bpf_fx[1][1]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[0],full_band_bpf_fx[1][0]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ #ifdef BASOP_NOGLOB L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][2],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2*/ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][1],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2*/ L_tmp2[0] = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][0],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2*/ move32(); L_tmpMax = L_abs(L_tmp2[0]); #else L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][2],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2*/ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][1],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2*/ L_tmp2[0] = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][0],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2*/ move32(); L_tmpMax = L_abs(L_tmp2[0]); #endif L_tmpX = L_shr(Mult_32_16(memory2_fx[1][1],full_band_bpf_fx[1][4]),3);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(memory2_fx[1][2],full_band_bpf_fx[1][3]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(memory2_fx[1][3],full_band_bpf_fx[1][2]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[0],full_band_bpf_fx[1][1]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[1],full_band_bpf_fx[1][0]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ #ifdef BASOP_NOGLOB L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[0],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][2],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmp2[1] = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][1],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 */ move32(); L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[1])); #else L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[0],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][2],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmp2[1] = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][1],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 */ move32(); L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[1])); #endif L_tmpX = L_shr(Mult_32_16(memory2_fx[1][2],full_band_bpf_fx[1][4]),3);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(memory2_fx[1][3],full_band_bpf_fx[1][3]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[0],full_band_bpf_fx[1][2]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[1],full_band_bpf_fx[1][1]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[2],full_band_bpf_fx[1][0]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ #ifdef BASOP_NOGLOB L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[1],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[0],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmp2[2] = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][2],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 */ move32(); L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[2])); #else L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[1],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[0],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmp2[2] = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][2],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 */ move32(); L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[2])); #endif L_tmpX = L_shr(Mult_32_16(memory2_fx[1][3],full_band_bpf_fx[1][4]),3);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[0],full_band_bpf_fx[1][3]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[1],full_band_bpf_fx[1][2]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[2],full_band_bpf_fx[1][1]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[3],full_band_bpf_fx[1][0]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ #ifdef BASOP_NOGLOB L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[2],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[1],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[0],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmp2[3] = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 *//*14 + Q_input_fx - shift_flag*/ move32(); L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[3])); #else L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[2],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[1],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[0],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmp2[3] = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 *//*14 + Q_input_fx - shift_flag*/ move32(); L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[3])); #endif FOR( i=4; i<L_FRAME48k; i++ ) { #ifdef BASOP_NOGLOB L_tmpX = L_shr(Mult_32_16(L_tmp[sub(i,4)],full_band_bpf_fx[1][4]),3);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add_sat(L_shr(Mult_32_16(L_tmp[sub(i,3)],full_band_bpf_fx[1][3]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[sub(i,1)],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_add_sat(L_shr(Mult_32_16(L_tmp[sub(i,2)],full_band_bpf_fx[1][2]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[sub(i,2)],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_add_sat(L_shr(Mult_32_16(L_tmp[sub(i,1)],full_band_bpf_fx[1][1]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[sub(i,3)],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_add_sat(L_shr(Mult_32_16(L_tmp[i],full_band_bpf_fx[1][0]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmp2[i] = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[sub(i,4)],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 */ move32(); #else L_tmpX = L_shr(Mult_32_16(L_tmp[sub(i,4)],full_band_bpf_fx[1][4]),3);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[sub(i,3)],full_band_bpf_fx[1][3]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[sub(i,1)],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ Loading @@ -3452,7 +3491,7 @@ void elliptic_bpf_48k_generic_fx( L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[sub(i,3)],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[i],full_band_bpf_fx[1][0]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmp2[i] = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[sub(i,4)],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 */ move32(); #endif L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[i])); } Loading lib_dec/swb_tbe_dec_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -1842,7 +1842,11 @@ void swb_tbe_dec_fx( FOR( cnt = 0; cnt < L_FRAME32k; cnt++ ) { #ifdef BASOP_NOGLOB bwe_exc_extended_16[cnt + NL_BUFF_OFFSET] = round_fx_sat( L_shl_sat( bwe_exc_extended[cnt], sc ) ); #else bwe_exc_extended_16[cnt + NL_BUFF_OFFSET] = round_fx( L_shl( bwe_exc_extended[cnt], sc ) ); #endif } Copy( bwe_exc_extended_16 + L_FRAME32k, hBWE_TD->old_bwe_exc_extended_fx, NL_BUFF_OFFSET ); Loading Loading
lib_com/modif_fs_fx.c +31 −2 Original line number Diff line number Diff line Loading @@ -994,11 +994,19 @@ void interpolate_3_over_2_allpass_fx( Vu[1] = mem[1] + filt_coeff[1] * ( Vu[0] - mem[2] ); mem[3] = mem[2] + filt_coeff[2] * ( Vu[1] - mem[3] );*/ #ifdef BASOP_NOGLOB Vu[0] = add_sat(mem_fx[0], mult_r_sat(filt_coeff_fx[0], sub_sat(input_fx_temp[i], mem_fx[1]))); move16();/* all Vu's in : Q_current*/ Vu[1] = add_sat(mem_fx[1], mult_r_sat(filt_coeff_fx[1], sub_sat(Vu[0], mem_fx[2]))); move16(); mem_fx[3] = add_sat(mem_fx[2], mult_r_sat(filt_coeff_fx[2], sub_sat(Vu[1], mem_fx[3]))); #else Vu[0] = add(mem_fx[0], mult_r(filt_coeff_fx[0], sub(input_fx_temp[i], mem_fx[1]))); move16();/* all Vu's in : Q_current*/ Vu[1] = add(mem_fx[1], mult_r(filt_coeff_fx[1], sub(Vu[0], mem_fx[2]))); move16(); mem_fx[3] = add(mem_fx[2], mult_r(filt_coeff_fx[2], sub(Vu[1], mem_fx[3]))); #endif move16(); Loading @@ -1013,13 +1021,21 @@ void interpolate_3_over_2_allpass_fx( /* Vm[0] = mem[0] + filt_coeff[3] * (input[i]-mem[4]); Vm[1] = mem[4] + filt_coeff[4] * (Vm[0]-mem[5]); mem[6] = mem[5] + filt_coeff[5] * (Vm[1]-mem[6]); */ #ifdef BASOP_NOGLOB Vm[0] = add_sat(mem_fx[0], mult_r_sat(filt_coeff_fx[3], sub_sat(input_fx_temp[i], mem_fx[4]))); move16(); Vm[1] = add_sat(mem_fx[4], mult_r_sat(filt_coeff_fx[4], sub_sat(Vm[0], mem_fx[5]))); move16(); mem_fx[6] = add_sat(mem_fx[5], mult_r_sat(filt_coeff_fx[5], sub_sat(Vm[1], mem_fx[6]))); move16(); #else Vm[0] = add(mem_fx[0], mult_r(filt_coeff_fx[3], sub(input_fx_temp[i], mem_fx[4]))); move16(); Vm[1] = add(mem_fx[4], mult_r(filt_coeff_fx[4], sub(Vm[0], mem_fx[5]))); move16(); mem_fx[6] = add(mem_fx[5], mult_r(filt_coeff_fx[5], sub(Vm[1], mem_fx[6]))); move16(); #endif mem_fx[4] = Vm[0]; move16(); mem_fx[5] = Vm[1]; Loading @@ -1031,13 +1047,21 @@ void interpolate_3_over_2_allpass_fx( /* Vl[0] = mem[0] + filt_coeff[6] * (input[i]-mem[7]); Vl[1] = mem[7] + filt_coeff[7] * (Vl[0]-mem[8]); mem[9] = mem[8] + filt_coeff[8] * (Vl[1]-mem[9]); */ #ifdef BASOP_NOGLOB Vl[0] = add_sat(mem_fx[0], mult_r_sat(filt_coeff_fx[6], sub_sat(input_fx_temp[i], mem_fx[7]))); move16(); Vl[1] = add_sat(mem_fx[7], mult_r_sat(filt_coeff_fx[7], sub_sat(Vl[0], mem_fx[8]))); move16(); mem_fx[9] = add_sat(mem_fx[8], mult_r_sat(filt_coeff_fx[8], sub_sat(Vl[1], mem_fx[9]))); move16(); #else Vl[0] = add(mem_fx[0], mult_r(filt_coeff_fx[6], sub(input_fx_temp[i], mem_fx[7]))); move16(); Vl[1] = add(mem_fx[7], mult_r(filt_coeff_fx[7], sub(Vl[0], mem_fx[8]))); move16(); mem_fx[9] = add(mem_fx[8], mult_r(filt_coeff_fx[8], sub(Vl[1], mem_fx[9]))); move16(); #endif mem_fx[0] = input_fx_temp[i]; move16(); mem_fx[7] = Vl[0]; Loading @@ -1056,8 +1080,13 @@ void interpolate_3_over_2_allpass_fx( { mem_temp = out1_buff[shl(i,1)]; move16(); #ifdef BASOP_NOGLOB out_fx[i] = add_sat( mult_r_sat( 1550/* 0.0473147f Q15*/,add_sat(mem_temp,mem_fx[10]) ), mult_r_sat( -4965/*-0.151521f Q15*/,add_sat(mem_fx[11],mem_fx[14]) ) ); out_fx[i] = add_sat( out_fx[i], mult_r_sat( 20125/*0.614152f Q15*/,add_sat(mem_fx[12],mem_fx[13]) ) ); #else out_fx[i] = add( mult_r( 1550/* 0.0473147f Q15*/,add(mem_temp,mem_fx[10]) ), mult_r( -4965/*-0.151521f Q15*/,add(mem_fx[11],mem_fx[14]) ) ); out_fx[i] = add( out_fx[i], mult_r( 20125/*0.614152f Q15*/,add(mem_fx[12],mem_fx[13]) ) ); #endif mem_fx[10] = mem_fx[11]; move16(); mem_fx[11] = mem_fx[12]; Loading
lib_com/swb_tbe_com_fx.c +44 −5 Original line number Diff line number Diff line Loading @@ -3402,47 +3402,86 @@ void elliptic_bpf_48k_generic_fx( L_tmpX = L_add(L_shr(Mult_32_16(memory2_fx[1][2],full_band_bpf_fx[1][2]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(memory2_fx[1][3],full_band_bpf_fx[1][1]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[0],full_band_bpf_fx[1][0]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ #ifdef BASOP_NOGLOB L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][2],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2*/ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][1],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2*/ L_tmp2[0] = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][0],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2*/ move32(); L_tmpMax = L_abs(L_tmp2[0]); #else L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][2],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2*/ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][1],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2*/ L_tmp2[0] = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][0],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2*/ move32(); L_tmpMax = L_abs(L_tmp2[0]); #endif L_tmpX = L_shr(Mult_32_16(memory2_fx[1][1],full_band_bpf_fx[1][4]),3);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(memory2_fx[1][2],full_band_bpf_fx[1][3]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(memory2_fx[1][3],full_band_bpf_fx[1][2]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[0],full_band_bpf_fx[1][1]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[1],full_band_bpf_fx[1][0]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ #ifdef BASOP_NOGLOB L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[0],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][2],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmp2[1] = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][1],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 */ move32(); L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[1])); #else L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[0],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][2],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmp2[1] = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][1],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 */ move32(); L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[1])); #endif L_tmpX = L_shr(Mult_32_16(memory2_fx[1][2],full_band_bpf_fx[1][4]),3);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(memory2_fx[1][3],full_band_bpf_fx[1][3]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[0],full_band_bpf_fx[1][2]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[1],full_band_bpf_fx[1][1]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[2],full_band_bpf_fx[1][0]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ #ifdef BASOP_NOGLOB L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[1],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[0],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmp2[2] = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][2],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 */ move32(); L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[2])); #else L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[1],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[0],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmp2[2] = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][2],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 */ move32(); L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[2])); #endif L_tmpX = L_shr(Mult_32_16(memory2_fx[1][3],full_band_bpf_fx[1][4]),3);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[0],full_band_bpf_fx[1][3]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[1],full_band_bpf_fx[1][2]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[2],full_band_bpf_fx[1][1]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[3],full_band_bpf_fx[1][0]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ #ifdef BASOP_NOGLOB L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[2],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[1],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[0],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmp2[3] = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 *//*14 + Q_input_fx - shift_flag*/ move32(); L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[3])); #else L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[2],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[1],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[0],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmp2[3] = L_sub(L_tmpX,L_shl(Mult_32_16(memory2_fx[2][3],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 *//*14 + Q_input_fx - shift_flag*/ move32(); L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[3])); #endif FOR( i=4; i<L_FRAME48k; i++ ) { #ifdef BASOP_NOGLOB L_tmpX = L_shr(Mult_32_16(L_tmp[sub(i,4)],full_band_bpf_fx[1][4]),3);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add_sat(L_shr(Mult_32_16(L_tmp[sub(i,3)],full_band_bpf_fx[1][3]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[sub(i,1)],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_add_sat(L_shr(Mult_32_16(L_tmp[sub(i,2)],full_band_bpf_fx[1][2]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[sub(i,2)],full_band_bpf_fx[4][2]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_add_sat(L_shr(Mult_32_16(L_tmp[sub(i,1)],full_band_bpf_fx[1][1]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[sub(i,3)],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_add_sat(L_shr(Mult_32_16(L_tmp[i],full_band_bpf_fx[1][0]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmp2[i] = L_sub_sat(L_tmpX,L_shl_sat(Mult_32_16(L_tmp2[sub(i,4)],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 */ move32(); #else L_tmpX = L_shr(Mult_32_16(L_tmp[sub(i,4)],full_band_bpf_fx[1][4]),3);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[sub(i,3)],full_band_bpf_fx[1][3]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[sub(i,1)],full_band_bpf_fx[4][1]),2));/*Q_input_fx + 6 +13 -15 +2 */ Loading @@ -3452,7 +3491,7 @@ void elliptic_bpf_48k_generic_fx( L_tmpX = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[sub(i,3)],full_band_bpf_fx[4][3]),2));/*Q_input_fx + 6 +13 -15 +2 */ L_tmpX = L_add(L_shr(Mult_32_16(L_tmp[i],full_band_bpf_fx[1][0]),3),L_tmpX);/*Q_input_fx + 11 + 13 - 15 -3*/ L_tmp2[i] = L_sub(L_tmpX,L_shl(Mult_32_16(L_tmp2[sub(i,4)],full_band_bpf_fx[4][4]),2));/*Q_input_fx + 6 +13 -15 +2 */ move32(); #endif L_tmpMax = L_max(L_tmpMax,L_abs(L_tmp2[i])); } Loading
lib_dec/swb_tbe_dec_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -1842,7 +1842,11 @@ void swb_tbe_dec_fx( FOR( cnt = 0; cnt < L_FRAME32k; cnt++ ) { #ifdef BASOP_NOGLOB bwe_exc_extended_16[cnt + NL_BUFF_OFFSET] = round_fx_sat( L_shl_sat( bwe_exc_extended[cnt], sc ) ); #else bwe_exc_extended_16[cnt + NL_BUFF_OFFSET] = round_fx( L_shl( bwe_exc_extended[cnt], sc ) ); #endif } Copy( bwe_exc_extended_16 + L_FRAME32k, hBWE_TD->old_bwe_exc_extended_fx, NL_BUFF_OFFSET ); Loading