Commit 491b41ec authored by vaclav's avatar vaclav
Browse files

acceptance of switches, step 4

parent 1f943f65
Loading
Loading
Loading
Loading
+2 −114
Original line number Diff line number Diff line
@@ -987,61 +987,8 @@ Word32 div_w( Word32 L_num, Word32 L_den )
    }
}

#ifndef REMOVE_BASOP_Util_Divide3232_Scale_cadence
Word32 BASOP_Util_Divide3232_Scale_cadence( Word32 x, Word32 y, Word16 *s )
{
    Word32 z;
    Word16 sx;
    Word16 sy;
    Word32 sign;

    /* assert (x >= (Word32)0); */
    assert( y != (Word32) 0 );

    sign = 0;
    move16();

    IF( x < 0 )
    {
        x = L_negate( x );
        sign = L_xor( sign, 1 );
    }

    IF( y < 0 )
    {
        y = L_negate( y );
        sign = L_xor( sign, 1 );
    }

    IF( x == (Word32) 0 )
    {
        *s = 0;
        return ( (Word32) 0 );
    }

    sx = norm_l( x );
    x = L_shl( x, sx );
    x = L_shr( x, 1 );
    move16();
    *s = sub( 1, sx );

    sy = norm_l( y );
    y = L_shl( y, sy );
    move16();
    *s = add( *s, sy );

    z = div_w( x, y );

    if ( sign != 0 )
    {
        z = L_negate( z );
    }

    return z;
}
#endif

Word32 div_w_newton( Word32 num, Word32 den );
static Word32 div_w_newton( const Word32 num, const Word32 den );
/*
Table of 256 precalculated estimates to be used by the "div_w_newton"
function using the Newton/Raphson method.
@@ -1336,7 +1283,7 @@ static Word32 L_dmult( Word32 L_var1, Word32 L_var2 )
 * BASOP weights: 24 (incl. L_dmult)
 */

Word32 div_w_newton( Word32 num, Word32 den )
static Word32 div_w_newton( const Word32 num, const Word32 den )
{
    Word32 x0, x1, x2, x3, diff, result;

@@ -2565,7 +2512,6 @@ Word16 BASOP_Util_Cmp_Mant32Exp /*!< o: flag: result of comparison */
     headroom is introduced into acc
*/

#ifdef OPT_2146_BASOP_UTIL_ADD_MANT32EXP
Word32 BASOP_Util_Add_Mant32Exp /* o  : normalized result mantissa */
    ( Word32 a_m,               /* i  : Mantissa of 1st operand a  */
      Word16 a_e,               /* i  : Exponent of 1st operand a  */
@@ -2629,65 +2575,7 @@ Word32 BASOP_Util_Add_Mant32Exp /* o : normalized result mantissa */

    return ( a_m );
}
#else
Word32 BASOP_Util_Add_Mant32Exp /* o  : normalized result mantissa */
    ( Word32 a_m,               /* i  : Mantissa of 1st operand a  */
      Word16 a_e,               /* i  : Exponent of 1st operand a  */
      Word32 b_m,               /* i  : Mantissa of 2nd operand b  */
      Word16 b_e,               /* i  : Exponent of 2nd operand b  */
      Word16 *ptr_e )           /* o  : exponent of result         */
{
    Word32 L_tmp;
    Word16 shift;

    /* Compare exponents: the difference is limited to +/- 30
       The Word32 mantissa of the operand with lower exponent is shifted right by the exponent difference.
       Then, the unshifted mantissa of the operand with the higher exponent is added. The addition result
       is normalized and the result represents the mantissa to return. The returned exponent takes into
       account all shift operations.
    */
    if ( !a_m )
    {
        a_e = b_e;
        move16();
    }

    if ( !b_m )
    {
        b_e = a_e;
        move16();
    }

    shift = sub( a_e, b_e );
    shift = s_max( -31, shift );
    shift = s_min( 31, shift );
    if ( shift < 0 )
    {
        /* exponent of b is greater than exponent of a, shr a_m */
        a_m = L_shl( a_m, shift );
    }
    if ( shift > 0 )
    {
        /* exponent of a is greater than exponent of b */
        b_m = L_shr( b_m, shift );
    }
    a_e = add( s_max( a_e, b_e ), 1 );
    L_tmp = L_add( L_shr( a_m, 1 ), L_shr( b_m, 1 ) );
    shift = norm_l( L_tmp );
    if ( shift )
        L_tmp = L_shl( L_tmp, shift );
    if ( L_tmp == 0 )
    {
        a_e = 0;
        move16();
    }
    if ( L_tmp != 0 )
        a_e = sub( a_e, shift );
    *ptr_e = a_e;

    return ( L_tmp );
}
#endif

static const Word16 shift_lc[] = { 9, 10 };

+0 −7
Original line number Diff line number Diff line
@@ -328,13 +328,6 @@ Word16 BASOP_Util_Divide3232_Scale( Word32 x, /*!< i : Numerator*/
                                    Word32 y,    /*!< i  : Denominator*/
                                    Word16 *s ); /*!< o  : Additional scalefactor difference*/

#ifndef REMOVE_BASOP_Util_Divide3232_Scale_cadence
Word32 BASOP_Util_Divide3232_Scale_cadence( Word32 x,    /*!< i  : Numerator*/
                                            Word32 y,    /*!< i  : Denominator*/
                                            Word16 *s ); /*!< o  : Additional scalefactor difference*/
#endif


Word32 BASOP_Util_Divide3232_Scale_newton( Word32 x,    /*!< i  : Numerator*/
                                           Word32 y,    /*!< i  : Denominator*/
                                           Word16 *s ); /*!< o  : Additional scalefactor difference*/
+22 −139
Original line number Diff line number Diff line
@@ -2322,35 +2322,19 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    l = sub( shr( n, 3 ), 1 ); /* (3*m/8) - 1 = (n/8) - 1 */
    FOR( i = 0; i < l; i++ )
    {
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *RZ0++, 15 );                /* Align with the following non-fractional mode so as to gain 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0_sat( acc, *RZ1, t_sin[c1_ind] ); /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0_sat( acc, *IZ1, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2, t_sin[s2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *RZ0++, 15 );                  /* Align with the following non-fractional mode so as to gain 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0( acc, *RZ1, t_sin[c1_ind] );   /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0( acc, *IZ1, t_sin[s1_ind] );   // Q15 + Qx
        acc = L_mac0( acc, *RZ2, t_sin[c2_ind] );   // Q15 + Qx
        acc = L_mac0( acc, *IZ2, t_sin[s2_ind] );   // Q15 + Qx
#endif
        *RY++ = round_fx( acc );                      /* bit growth = 1 (compensated by non-fractional mode MAC). Qx - 1*/
        move16();

#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#endif
        *IY-- = round_fx( acc );                        // Qx - 1
        move16();

@@ -2364,35 +2348,19 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    l = shr( m, 3 ); /* (4*m/8) - (3*m/8) = m/8 */
    FOR( i = 0; i < l; i++ )
    {
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *RZ0++, 15 );                // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ1, t_sin[c1_ind] ); /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0_sat( acc, *IZ1, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2, t_sin[s2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *RZ0++, 15 );                  // Q15 + Qx
        acc = L_mac0( acc, *RZ1, t_sin[c1_ind] );   /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0( acc, *IZ1, t_sin[s1_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *RZ2, t_sin[c2_ind] );   // Q15 + Qx
        acc = L_mac0( acc, *IZ2, t_sin[s2_ind] );   // Q15 + Qx
#endif
        *RY++ = round_fx( acc );                      // Qx - 1
        move16();

#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#endif
        *IY-- = round_fx( acc );                        // Qx - 1
        move16();

@@ -2403,15 +2371,9 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    }

    /* special case: i = m/2 i.e. 1/3 */
#ifdef FIX_2170_ASSERT_IN_FFT3
    acc = L_shl_sat( *RZ0--, 15 );                // Q15 + Qx
    acc = L_mac0_sat( acc, *RZ1, t_sin[c1_ind] ); // Q15 + Qx
    acc = L_msu0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
#else
    acc = L_shl( *RZ0--, 15 );                      // Q15 + Qx
    acc = L_mac0( acc, *RZ1, t_sin[c1_ind] );       // Q15 + Qx
    acc = L_msu0( acc, *RZ2, t_sin[c2_ind] );       // Q15 + Qx
#endif
    *RY++ = round_fx( acc );                      // Qx - 1
    move16();

@@ -2434,34 +2396,19 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    l = sub( shr( m, 2 ), 1 ); /* (6*m/8) - ((m/2)+1) = m/4 - 1 */
    FOR( i = 0; i < l; i++ )
    {
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *RZ0--, 15 );                // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ1, t_sin[c1_ind] ); /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_msu0_sat( acc, *IZ1, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ2, t_sin[s2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *RZ0--, 15 );                  // Q15 + Qx
        acc = L_mac0( acc, *RZ1, t_sin[c1_ind] );   /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_msu0( acc, *IZ1, t_sin[s1_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *RZ2, t_sin[c2_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *IZ2, t_sin[s2_ind] );   // Q15 + Qx
#endif
        *RY++ = round_fx( acc );                      // Qx - 1
        move16();

        acc = L_mult0( *IZ0++, -32768 );                // Q15 + Qx
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_msu0_sat( acc, *RZ1--, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ1++, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2--, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2++, t_sin[c2_ind] ); // Q15 + Qx
#else
        acc = L_msu0( acc, *RZ1--, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *IZ1++, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *RZ2--, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ2++, t_sin[c2_ind] ); // Q15 + Qx
#endif
        *IY-- = round_fx( acc );                        // Qx - 1
        move16();

@@ -2476,34 +2423,19 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    l = shr( m, 2 );
    FOR( i = 0; i < l; i++ )
    {
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *RZ0--, 15 );                // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1, t_sin[c1_ind] ); /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_msu0_sat( acc, *IZ1, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2, t_sin[s2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *RZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1, t_sin[c1_ind] );   /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_msu0( acc, *IZ1, t_sin[s1_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *RZ2, t_sin[c2_ind] );   // Q15 + Qx
        acc = L_mac0( acc, *IZ2, t_sin[s2_ind] );   // Q15 + Qx
#endif
        *RY++ = round_fx( acc );                      // Qx - 1
        move16();

        acc = L_mult0( *IZ0++, -32768 );                // Q15 + Qx
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_msu0_sat( acc, *RZ1--, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ1++, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ2--, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2++, t_sin[c2_ind] ); // Q15 + Qx
#else
        acc = L_msu0( acc, *RZ1--, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ1++, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *RZ2--, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ2++, t_sin[c2_ind] ); // Q15 + Qx
#endif
        *IY-- = round_fx( acc );                        // Qx - 1
        move16();

@@ -2514,26 +2446,15 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    }

    /* special case: i = m, i.e 2/3 */
#ifdef FIX_2170_ASSERT_IN_FFT3
    acc = L_shl_sat( *RZ0++, 15 );                // Q15 + Qx
    acc = L_msu0_sat( acc, *RZ1, t_sin[c1_ind] ); // Q15 + Qx
    acc = L_msu0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
#else
    acc = L_shl( *RZ0++, 15 );                      // Q15 + Qx
    acc = L_msu0( acc, *RZ1, t_sin[c1_ind] );       // Q15 + Qx
    acc = L_msu0( acc, *RZ2, t_sin[c2_ind] );       // Q15 + Qx
#endif
    *RY++ = round_fx( acc );                      // Qx - 1
    move16();

    acc = L_deposit_l( 0 );
#ifdef FIX_2170_ASSERT_IN_FFT3
    acc = L_msu0_sat( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
    acc = L_mac0_sat( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
#else
    acc = L_msu0( acc, *RZ1++, t_sin[s1_ind] );     // Q15 + Qx
    acc = L_mac0( acc, *RZ2++, t_sin[s2_ind] );     // Q15 + Qx
#endif
    *IY-- = round_fx( acc );                        // Qx - 1
    move16();
    IZ0--; /* Just decrement the address counter */
@@ -2549,35 +2470,19 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    l = sub( shr( m, 3 ), 1 ); /* (9*m/8) - (m +1) = m/8 - 1 */
    FOR( i = 0; i < l; i++ )
    {
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *RZ0++, 15 );                // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1, t_sin[c1_ind] ); /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0_sat( acc, *IZ1, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ2, t_sin[s2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *RZ0++, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1, t_sin[c1_ind] );   /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0( acc, *IZ1, t_sin[s1_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *RZ2, t_sin[c2_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *IZ2, t_sin[s2_ind] );   // Q15 + Qx
#endif
        *RY++ = round_fx( acc );                      // Qx - 1
        move16();

#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#endif
        *IY-- = round_fx( acc );                        // Qx - 1
        move16();

@@ -2591,35 +2496,19 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    l = shr( n, 3 ); /* (12*m/8) - (9*m/8) = 3*m/8 = n/8 */
    FOR( i = 0; i < l; i++ )
    {
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *RZ0++, 15 );                // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1, t_sin[c1_ind] ); /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0_sat( acc, *IZ1, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ2, t_sin[s2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *RZ0++, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1, t_sin[c1_ind] );   /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0( acc, *IZ1, t_sin[s1_ind] );   // Q15 + Qx
        acc = L_mac0( acc, *RZ2, t_sin[c2_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *IZ2, t_sin[s2_ind] );   // Q15 + Qx
#endif
        *RY++ = round_fx( acc );                      // Qx - 1
        move16();

#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#endif
        *IY-- = round_fx( acc );                        // Qx - 1
        move16();

@@ -2630,15 +2519,9 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    }

    /* special case: i = 3*m/2 */
#ifdef FIX_2170_ASSERT_IN_FFT3
    acc = L_shl_sat( *RZ0, 15 );                  // Q15 + Qx
    acc = L_msu0_sat( acc, *RZ1, t_sin[c1_ind] ); // Q15 + Qx
    acc = L_mac0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
#else
    acc = L_shl( *RZ0, 15 );                        // Q15 + Qx
    acc = L_msu0( acc, *RZ1, t_sin[c1_ind] );       // Q15 + Qx
    acc = L_mac0( acc, *RZ2, t_sin[c2_ind] );       // Q15 + Qx
#endif
    *RY = round_fx( acc );                        // Qx - 1
    move16();

+2 −4
Original line number Diff line number Diff line
@@ -316,14 +316,12 @@ void hp20_fx_32_opt(
    prescale = s_min( prescale, diff );

    prescale = sub( 1 + HP20_FX_COEFF_SCALE, prescale );
#ifdef FIX_2086_ENABLE_HP20_OPT_FOR_ENC
    test();
    if ( EQ_16( prescale_current_frame, 1 + HP20_FX_COEFF_SCALE - 31 ) || // signal_fx buffer contains only zeros, so use the mem_fx scale_factor instead
         LT_16( prescale_current_frame, prescale ) )                      // To avoid overflow in the subsequent shr() scaling for W_y1, W_y2, x2, and x1 calculations before the for loop.
#else
    if ( EQ_16( prescale_current_frame, 1 + HP20_FX_COEFF_SCALE - 31 ) ) // signal_fx buffer contains only zeros, so use the mem_fx scale_factor instead
#endif
    {
        prescale_current_frame = prescale;
        move16();
    }

    diff = sub( prescale, prescaleOld );
+0 −11
Original line number Diff line number Diff line
@@ -81,17 +81,6 @@
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */





#define REMOVE_BASOP_Util_Divide3232_Scale_cadence           /* remove this division variant */
#define OPT_2146_BASOP_UTIL_ADD_MANT32EXP                    /* Dlb: optimized version of BASOP_Util_Add_Mant32Exp() */
#define FIX_2086_ENABLE_HP20_OPT_FOR_ENC                     /* FhG: Enable hp20_fx_32_opt() for Encoder */
#define FIX_2170_ASSERT_IN_FFT3                              /* Eri: Assert in fft3_fx from EVS, adding _sat */




/* #################### End BE switches ################################## */

/* #################### Start NON-BE switches ############################ */
Loading