Commit fa3657b7 authored by vaillancour's avatar vaillancour
Browse files

Correction on compl saturations for 26.444

parent 5d34cc98
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -326,7 +326,11 @@ void CNG_exc_fx(
#endif
            L_tmp = L_shr(L_tmp,1);/* 2*Q_exc+6 */
            tmp = add(Q_exc,Q_exc);
#ifdef BASOP_NOGLOB
            env[i] = L_shr_sat( L_tmp, tmp );
#else
            env[i] = L_shr( L_tmp, tmp );
#endif
            move32();/* Q6 */
            ptR++;
            ptI--;
+5 −1
Original line number Diff line number Diff line
@@ -186,7 +186,11 @@ void tcxFormantEnhancement(
	{
		fac = add(fac0, mult(d, extract_l(L_mult0(j, inv_int[n]))));
		BASOP_SATURATE_WARNING_OFF_EVS;
#ifdef BASOP_NOGLOB
        xn_buf[l + j] = s_min( xn_one, shl_sat( mult( xn_buf[l + j], fac ), fac_e ) );
#else
        xn_buf[l + j] = s_min( xn_one, shl( mult( xn_buf[l + j], fac ), fac_e ) );
#endif
		move16();
		BASOP_SATURATE_WARNING_ON_EVS;
	}
+5 −2
Original line number Diff line number Diff line
@@ -400,8 +400,11 @@ Word32 Div_32 (Word32 L_num, Word16 denom_hi, Word16 denom_lo)
    lo = L_Extract_lc (L_32, &hi);
    n_lo = L_Extract_lc (L_num, &n_hi);
    L_32 = Mpy_32 (n_hi, n_lo, hi, lo);
#ifdef BASOP_NOGLOB
    L_32 = L_shl_sat( L_32, 2 );
#else
    L_32 = L_shl( L_32, 2 );

#endif
    return (L_32);
}
+10 −4
Original line number Diff line number Diff line
@@ -376,11 +376,17 @@ static Word16 calc_tilt_fx( /* o : Excitation tilt Q15*/
    {
        /* r0 = L_mac(r0,x[i],x[i])                                        */
        /* r1 = L_mac(r1,x[i],x[i+1]) -> correlation loop can be optimized */
#ifdef BASOP_NOGLOB
        r0 = L_mac_sat( r0, xi, xi );
#else
        r0 = L_mac( r0, xi, xi );

#endif
        xi_p1 = shr(x[i+1], Q_shift);
#ifdef BASOP_NOGLOB
        r1 = L_mac_sat( r1, xi, xi_p1 );
#else
        r1 = L_mac( r1, xi, xi_p1 );

#endif
        xi = xi_p1;
        move16();
    }
+15 −3
Original line number Diff line number Diff line
@@ -3016,7 +3016,11 @@ static Word32 non_linearity_scaled_copy(
    {
        FOR ( i = 0; i < j; i++ )
        {
#ifdef BASOP_NOGLOB
            L_tmp = L_mult_sat( input[i], input[i] );    /* 2*Q_inp+1 */
#else
            L_tmp = L_mult( input[i], input[i] );    /* 2*Q_inp+1 */
#endif
            L_tmp = Mult_32_32( L_tmp, prev_scale ); /* 2*Q_inp */
            output[i] = L_tmp;
            move32();
@@ -3026,7 +3030,11 @@ static Word32 non_linearity_scaled_copy(
        }
        FOR ( ; i < length; i++ )
        {
#ifdef BASOP_NOGLOB
            L_tmp = L_mult_sat( input[i], input[i] );    /* 2*Q_inp+1 */
#else
            L_tmp = L_mult( input[i], input[i] );    /* 2*Q_inp+1 */
#endif
            L_tmp = Mult_32_32( L_tmp, prev_scale ); /* 2*Q_inp */
            output[i] = L_tmp;
            move32();
@@ -3036,7 +3044,11 @@ static Word32 non_linearity_scaled_copy(
    {
        FOR ( i = 0; i < j; i++ )
        {
#ifdef BASOP_NOGLOB
            L_tmp = L_mult_sat( input[i], input[i] );    /* 2*Q_inp+1 */
#else
            L_tmp = L_mult( input[i], input[i] );    /* 2*Q_inp+1 */
#endif
            L_tmp = Mult_32_32( L_tmp, prev_scale ); /* 2*Q_inp */

            if ( input[i] < 0 )
Loading