Loading lib_com/pred_lt4_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -245,7 +245,11 @@ void pred_lt4_tc_fx( } FOR( i = T0; i < L_SUBFR; i++ ) { #ifdef ISSUE_1836_replace_overflow_libcom exc[i + i_subfr] = add_sat( exc[i + i_subfr], mult_r( PIT_SHARP_fx, excO[i] ) ); /* Q0 */ //??sat #else exc[i + i_subfr] = add_o( exc[i + i_subfr], mult_r( PIT_SHARP_fx, excO[i] ), &Overflow ); /* Q0 */ #endif move16(); } } Loading lib_com/preemph_fx.c +44 −0 Original line number Diff line number Diff line Loading @@ -22,12 +22,23 @@ void preemph_copy_fx( ) { Word16 i, temp; #ifndef ISSUE_1836_replace_overflow_libcom #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif temp = x[lg - 1]; /* Qx */ move16(); #ifdef ISSUE_1836_replace_overflow_libcom FOR( i = lg - 1; i > 0; i-- ) { y[i] = msu_r_sat( L_deposit_h( x[i] ), x[i - 1], mu ); /* Qx */ move16(); } y[0] = msu_r_sat( L_deposit_h( x[0] ), *mem, mu ); /* Qx */ //??sat move16(); #else FOR( i = lg - 1; i > 0; i-- ) { y[i] = msu_ro( L_deposit_h( x[i] ), x[i - 1], mu, &Overflow ); /* Qx */ Loading @@ -35,6 +46,8 @@ void preemph_copy_fx( } y[0] = msu_ro( L_deposit_h( x[0] ), *mem, mu, &Overflow ); /* Qx */ move16(); #endif *mem = temp; /* Qx */ move16(); Loading @@ -49,12 +62,23 @@ void preemph_copy_32fx( ) { Word16 i, temp; #ifndef ISSUE_1836_replace_overflow_libcom #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif temp = x[lg - 1]; /* Qx */ move16(); #ifdef ISSUE_1836_replace_overflow_libcom FOR( i = lg - 1; i > 0; i-- ) { y[i] = L_msu_sat( L_deposit_h( x[i] ), x[i - 1], mu ); /* Qx+16 */ //??sat move16(); } y[0] = L_msu_sat( L_deposit_h( x[0] ), *mem, mu ); /* Qx+16 */ //??sat move16(); #else FOR( i = lg - 1; i > 0; i-- ) { y[i] = L_msu_o( L_deposit_h( x[i] ), x[i - 1], mu, &Overflow ); /* Qx+16 */ Loading @@ -62,6 +86,7 @@ void preemph_copy_32fx( } y[0] = L_msu_o( L_deposit_h( x[0] ), *mem, mu, &Overflow ); /* Qx+16 */ move16(); #endif *mem = temp; /* Qx */ move16(); Loading Loading @@ -125,13 +150,31 @@ void E_UTIL_f_preemph2( { Word16 i, temp; Word32 L_tmp; #ifndef ISSUE_1836_replace_overflow_libcom #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif temp = signal[lg - 1]; /* Qx */ move16(); #ifdef ISSUE_1836_replace_overflow_libcom FOR( i = lg - 1; i > 0; i-- ) { L_tmp = L_mult( signal[i], 16384 ); /* Qx + 15 */ L_tmp = L_msu0_sat( L_tmp, signal[i - 1], mu ); /* Qx + 15 */ //??sat L_tmp = L_shl_sat( L_tmp, add( shift, 1 ) ); /* Qx + shift + 16 */ signal[i] = round_fx_sat( L_tmp ); /* Qx + shift */ //??sat move16(); } L_tmp = L_mult( signal[0], 16384 ); /* Qx + 15 */ L_tmp = L_msu0_sat( L_tmp, *mem, mu ); /* Qx + 15 */ //??sat L_tmp = L_shl_sat( L_tmp, add( shift, 1 ) ); /* Qx + shift + 16 */ signal[0] = round_fx_sat( L_tmp ); /* Qx + shift */ //??sat move16(); #else FOR( i = lg - 1; i > 0; i-- ) { L_tmp = L_mult( signal[i], 16384 ); /* Qx + 15 */ Loading @@ -146,6 +189,7 @@ void E_UTIL_f_preemph2( L_tmp = L_shl_o( L_tmp, add( shift, 1 ), &Overflow ); /* Qx + shift + 16 */ signal[0] = round_fx_o( L_tmp, &Overflow ); /* Qx + shift */ move16(); #endif *mem = temp; /* Qx */ move16(); Loading Loading
lib_com/pred_lt4_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -245,7 +245,11 @@ void pred_lt4_tc_fx( } FOR( i = T0; i < L_SUBFR; i++ ) { #ifdef ISSUE_1836_replace_overflow_libcom exc[i + i_subfr] = add_sat( exc[i + i_subfr], mult_r( PIT_SHARP_fx, excO[i] ) ); /* Q0 */ //??sat #else exc[i + i_subfr] = add_o( exc[i + i_subfr], mult_r( PIT_SHARP_fx, excO[i] ), &Overflow ); /* Q0 */ #endif move16(); } } Loading
lib_com/preemph_fx.c +44 −0 Original line number Diff line number Diff line Loading @@ -22,12 +22,23 @@ void preemph_copy_fx( ) { Word16 i, temp; #ifndef ISSUE_1836_replace_overflow_libcom #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif temp = x[lg - 1]; /* Qx */ move16(); #ifdef ISSUE_1836_replace_overflow_libcom FOR( i = lg - 1; i > 0; i-- ) { y[i] = msu_r_sat( L_deposit_h( x[i] ), x[i - 1], mu ); /* Qx */ move16(); } y[0] = msu_r_sat( L_deposit_h( x[0] ), *mem, mu ); /* Qx */ //??sat move16(); #else FOR( i = lg - 1; i > 0; i-- ) { y[i] = msu_ro( L_deposit_h( x[i] ), x[i - 1], mu, &Overflow ); /* Qx */ Loading @@ -35,6 +46,8 @@ void preemph_copy_fx( } y[0] = msu_ro( L_deposit_h( x[0] ), *mem, mu, &Overflow ); /* Qx */ move16(); #endif *mem = temp; /* Qx */ move16(); Loading @@ -49,12 +62,23 @@ void preemph_copy_32fx( ) { Word16 i, temp; #ifndef ISSUE_1836_replace_overflow_libcom #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif temp = x[lg - 1]; /* Qx */ move16(); #ifdef ISSUE_1836_replace_overflow_libcom FOR( i = lg - 1; i > 0; i-- ) { y[i] = L_msu_sat( L_deposit_h( x[i] ), x[i - 1], mu ); /* Qx+16 */ //??sat move16(); } y[0] = L_msu_sat( L_deposit_h( x[0] ), *mem, mu ); /* Qx+16 */ //??sat move16(); #else FOR( i = lg - 1; i > 0; i-- ) { y[i] = L_msu_o( L_deposit_h( x[i] ), x[i - 1], mu, &Overflow ); /* Qx+16 */ Loading @@ -62,6 +86,7 @@ void preemph_copy_32fx( } y[0] = L_msu_o( L_deposit_h( x[0] ), *mem, mu, &Overflow ); /* Qx+16 */ move16(); #endif *mem = temp; /* Qx */ move16(); Loading Loading @@ -125,13 +150,31 @@ void E_UTIL_f_preemph2( { Word16 i, temp; Word32 L_tmp; #ifndef ISSUE_1836_replace_overflow_libcom #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif temp = signal[lg - 1]; /* Qx */ move16(); #ifdef ISSUE_1836_replace_overflow_libcom FOR( i = lg - 1; i > 0; i-- ) { L_tmp = L_mult( signal[i], 16384 ); /* Qx + 15 */ L_tmp = L_msu0_sat( L_tmp, signal[i - 1], mu ); /* Qx + 15 */ //??sat L_tmp = L_shl_sat( L_tmp, add( shift, 1 ) ); /* Qx + shift + 16 */ signal[i] = round_fx_sat( L_tmp ); /* Qx + shift */ //??sat move16(); } L_tmp = L_mult( signal[0], 16384 ); /* Qx + 15 */ L_tmp = L_msu0_sat( L_tmp, *mem, mu ); /* Qx + 15 */ //??sat L_tmp = L_shl_sat( L_tmp, add( shift, 1 ) ); /* Qx + shift + 16 */ signal[0] = round_fx_sat( L_tmp ); /* Qx + shift */ //??sat move16(); #else FOR( i = lg - 1; i > 0; i-- ) { L_tmp = L_mult( signal[i], 16384 ); /* Qx + 15 */ Loading @@ -146,6 +189,7 @@ void E_UTIL_f_preemph2( L_tmp = L_shl_o( L_tmp, add( shift, 1 ), &Overflow ); /* Qx + shift + 16 */ signal[0] = round_fx_o( L_tmp, &Overflow ); /* Qx + shift */ move16(); #endif *mem = temp; /* Qx */ move16(); Loading