Loading lib_com/enhancer_fx.c +19 −1 Original line number Diff line number Diff line Loading @@ -423,6 +423,15 @@ Word16 E_UTIL_enhancer( { /* exc2[i] = exc2[i] + code[i] - tmp*(code[i+1]+code[i-1]); */ L_tmp = L_mult(code[i], 16384); #ifdef BASOP_NOGLOB L_tmp = L_msu0_o(L_tmp,tmp,code[i-1], &Overflow); L_tmp = L_msu0_o(L_tmp,tmp,code[i+1], &Overflow); if (gain) { L_tmp = L_shl_o(L_tmp,gain, &Overflow); } exc2[i] = msu_ro(L_tmp,-32768, exc2[i], &Overflow); #else L_tmp = L_msu0(L_tmp,tmp,code[i-1]); L_tmp = L_msu0(L_tmp,tmp,code[i+1]); if (gain) Loading @@ -430,17 +439,26 @@ Word16 E_UTIL_enhancer( L_tmp = L_shl(L_tmp,gain); } exc2[i] = msu_r(L_tmp,-32768, exc2[i]); #endif move16(); } /* exc2[L_subfr-1] = exc2[L_subfr-1] + code[L_subfr-1] - tmp*code[L_subfr-2]; */ L_tmp = L_mult(code[i], 16384); #ifdef BASOP_NOGLOB L_tmp = L_msu0_o(L_tmp,tmp,code[i-1], &Overflow); if (gain) { L_tmp = L_shl_o(L_tmp,gain, &Overflow); } exc2[i] = msu_ro(L_tmp,-32768, exc2[i], &Overflow); #else L_tmp = L_msu0(L_tmp,tmp,code[i-1]); if (gain) { L_tmp = L_shl(L_tmp,gain); } exc2[i] = msu_r(L_tmp,-32768, exc2[i]); #endif move16(); return code_exp; Loading lib_enc/detect_transient_fx.c +13 −0 Original line number Diff line number Diff line Loading @@ -153,14 +153,27 @@ Word16 detect_transient_fx( FOR ( i = 0; i < L/4; i++ ) { temp16 = extract_l(L_shr(out_filt_fx[i + blk*(L/4)], 12)); #ifdef BASOP_NOGLOB Energy_fx = L_add_o(Energy_fx, L_mult0(temp16, temp16), &Overflow); #else Energy_fx = L_add(Energy_fx, L_mult0(temp16, temp16)); #endif temp16 = shr(in_fx[i + blk*(L/4)], Q_new); #ifdef BASOP_NOGLOB Energy_in_fx[blk+1] = L_add_o(Energy_in_fx[blk+1], L_mult0(temp16, temp16), &Overflow); #else Energy_in_fx[blk+1] = L_add(Energy_in_fx[blk+1], L_mult0(temp16, temp16)); #endif move32(); } #ifdef BASOP_NOGLOB E_in_fx = L_add_o(E_in_fx, Energy_in_fx[blk + 1], &Overflow); E_out_fx = L_add_o(E_out_fx, Energy_fx, &Overflow); #else E_in_fx = L_add(E_in_fx, Energy_in_fx[blk + 1]); E_out_fx = L_add(E_out_fx, Energy_fx); #endif Thres_fx = 2185;/*1 /15 */ move16(); Loading Loading
lib_com/enhancer_fx.c +19 −1 Original line number Diff line number Diff line Loading @@ -423,6 +423,15 @@ Word16 E_UTIL_enhancer( { /* exc2[i] = exc2[i] + code[i] - tmp*(code[i+1]+code[i-1]); */ L_tmp = L_mult(code[i], 16384); #ifdef BASOP_NOGLOB L_tmp = L_msu0_o(L_tmp,tmp,code[i-1], &Overflow); L_tmp = L_msu0_o(L_tmp,tmp,code[i+1], &Overflow); if (gain) { L_tmp = L_shl_o(L_tmp,gain, &Overflow); } exc2[i] = msu_ro(L_tmp,-32768, exc2[i], &Overflow); #else L_tmp = L_msu0(L_tmp,tmp,code[i-1]); L_tmp = L_msu0(L_tmp,tmp,code[i+1]); if (gain) Loading @@ -430,17 +439,26 @@ Word16 E_UTIL_enhancer( L_tmp = L_shl(L_tmp,gain); } exc2[i] = msu_r(L_tmp,-32768, exc2[i]); #endif move16(); } /* exc2[L_subfr-1] = exc2[L_subfr-1] + code[L_subfr-1] - tmp*code[L_subfr-2]; */ L_tmp = L_mult(code[i], 16384); #ifdef BASOP_NOGLOB L_tmp = L_msu0_o(L_tmp,tmp,code[i-1], &Overflow); if (gain) { L_tmp = L_shl_o(L_tmp,gain, &Overflow); } exc2[i] = msu_ro(L_tmp,-32768, exc2[i], &Overflow); #else L_tmp = L_msu0(L_tmp,tmp,code[i-1]); if (gain) { L_tmp = L_shl(L_tmp,gain); } exc2[i] = msu_r(L_tmp,-32768, exc2[i]); #endif move16(); return code_exp; Loading
lib_enc/detect_transient_fx.c +13 −0 Original line number Diff line number Diff line Loading @@ -153,14 +153,27 @@ Word16 detect_transient_fx( FOR ( i = 0; i < L/4; i++ ) { temp16 = extract_l(L_shr(out_filt_fx[i + blk*(L/4)], 12)); #ifdef BASOP_NOGLOB Energy_fx = L_add_o(Energy_fx, L_mult0(temp16, temp16), &Overflow); #else Energy_fx = L_add(Energy_fx, L_mult0(temp16, temp16)); #endif temp16 = shr(in_fx[i + blk*(L/4)], Q_new); #ifdef BASOP_NOGLOB Energy_in_fx[blk+1] = L_add_o(Energy_in_fx[blk+1], L_mult0(temp16, temp16), &Overflow); #else Energy_in_fx[blk+1] = L_add(Energy_in_fx[blk+1], L_mult0(temp16, temp16)); #endif move32(); } #ifdef BASOP_NOGLOB E_in_fx = L_add_o(E_in_fx, Energy_in_fx[blk + 1], &Overflow); E_out_fx = L_add_o(E_out_fx, Energy_fx, &Overflow); #else E_in_fx = L_add(E_in_fx, Energy_in_fx[blk + 1]); E_out_fx = L_add(E_out_fx, Energy_fx); #endif Thres_fx = 2185;/*1 /15 */ move16(); Loading