Loading lib_com/options.h +4 −0 Original line number Diff line number Diff line Loading @@ -80,4 +80,8 @@ #define HARM_PUSH_BIT #define HARM_ENC_INIT //#define HARM_SCE_INIT // // new speedups #define FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat /*FhG: reduces WMOPS - bit-exact*/ // | #endif lib_com/tools_fx.c +25 −1 Original line number Diff line number Diff line Loading @@ -794,14 +794,38 @@ void Copy_Scale_sig_16_32_no_sat( } return; } #ifdef FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat L_tmp = L_shl_o( 1, exp0 - 1, &Overflow ); IF( L_tmp >= 0x7FFF ) { FOR( i = 0; i < lg; i++ ) { // y[i] = L_mult0(x[i], L_tmp); y[i] = W_extract_l( W_mult_32_16( L_tmp, x[i] ) ); move32(); /* saturation can occur here */ move32(); /* Overflow can occur here */ } return; } // ELSE { Word16 tmp = extract_l( L_tmp ); FOR( i = 0; i < lg; i++ ) { y[i] = L_mult( x[i], tmp ); move32(); } } #else L_tmp = L_shl_o( 1, exp0 - 1, &Overflow ); FOR( i = 0; i < lg; i++ ) { // y[i] = L_mult0(x[i], L_tmp); y[i] = W_extract_l( W_mult_32_16( L_tmp, x[i] ) ); move32(); /* Overflow can occur here */ } #endif } void Copy_Scale_sig_32_16( const Word32 x[], /* i : signal to scale input Qx */ Loading Loading
lib_com/options.h +4 −0 Original line number Diff line number Diff line Loading @@ -80,4 +80,8 @@ #define HARM_PUSH_BIT #define HARM_ENC_INIT //#define HARM_SCE_INIT // // new speedups #define FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat /*FhG: reduces WMOPS - bit-exact*/ // | #endif
lib_com/tools_fx.c +25 −1 Original line number Diff line number Diff line Loading @@ -794,14 +794,38 @@ void Copy_Scale_sig_16_32_no_sat( } return; } #ifdef FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat L_tmp = L_shl_o( 1, exp0 - 1, &Overflow ); IF( L_tmp >= 0x7FFF ) { FOR( i = 0; i < lg; i++ ) { // y[i] = L_mult0(x[i], L_tmp); y[i] = W_extract_l( W_mult_32_16( L_tmp, x[i] ) ); move32(); /* saturation can occur here */ move32(); /* Overflow can occur here */ } return; } // ELSE { Word16 tmp = extract_l( L_tmp ); FOR( i = 0; i < lg; i++ ) { y[i] = L_mult( x[i], tmp ); move32(); } } #else L_tmp = L_shl_o( 1, exp0 - 1, &Overflow ); FOR( i = 0; i < lg; i++ ) { // y[i] = L_mult0(x[i], L_tmp); y[i] = W_extract_l( W_mult_32_16( L_tmp, x[i] ) ); move32(); /* Overflow can occur here */ } #endif } void Copy_Scale_sig_32_16( const Word32 x[], /* i : signal to scale input Qx */ Loading