Commit fd0599d9 authored by Nicolas Roussin's avatar Nicolas Roussin
Browse files

Merge branch 'main' into 2142-implement-basop-w_min-and-w_max-functions

parents 8134a30e 815719c5
Loading
Loading
Loading
Loading
Loading
+188 −71
Original line number Diff line number Diff line
@@ -2322,19 +2322,35 @@ 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();

@@ -2348,19 +2364,35 @@ 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();

@@ -2371,9 +2403,15 @@ 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();

@@ -2396,19 +2434,34 @@ 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();

@@ -2423,19 +2476,34 @@ 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();

@@ -2446,15 +2514,26 @@ 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 */
@@ -2470,19 +2549,35 @@ 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();

@@ -2496,19 +2591,35 @@ 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();

@@ -2519,9 +2630,15 @@ 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 −0
Original line number Diff line number Diff line
@@ -87,10 +87,12 @@
#define FIX_2166_ASSERT_OSBA_PLC_STEREO_OUT                  /* FhG: fix for issue 2166 - add missing averaging factor 0.5 in for the sum of energies in function stereo_dft_dmx_swb_nrg_fx()*/

#define FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE                /* FhG: Use dynamic Q factor for synth_fx and synthFB_fx to prevent overflow */
#define FIX_2170_ASSERT_IN_FFT3                              /* Eri: Assert in fft3_fx from EVS, adding _sat */
#define FIX_2082_FP_LEFTOVERS_OMASA_DEC                      /* Nokia: fix for issue 2082, cleaning remaining floating point code */
#define FIX_2174_JBM_BASOP_ALIGNMENT                         /* VoiceAge, Nokia: Fixes to JBM BASOP implementation and alignment to float */

#define FIX_2176_ASSERT_DEC_MAP_PARAMS_DIRAC2STEREO          /* FhG: Reduce hStereoDft->q_smooth_buf_fx by one to prevent overflow in the subframe_band_nrg[][] calculation */
#define FIX_2015_PREMPH_SAT_ALT                              /* VA: saturation can happen during preemphasis filtering due to a too aggressive scaling factor, allows preemphis to get 1 more bit headroom */
/* ################### End FIXES switches ########################### */

/* #################### Start BASOP porting switches ############################ */
+28 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ void preemph_copy_fx(

    return;
}

#ifndef FIX_2015_PREMPH_SAT_ALT
void preemph_copy_32fx(
    const Word16 x[], /* i  : input signal             Qx  */
    Word32 y[],       /* o  : output signal            Qx  */
@@ -66,7 +66,34 @@ void preemph_copy_32fx(

    return;
}
#else
void preemph_copy_32fx2(
    const Word16 x[], /* i  : input signal             Qx  */
    Word32 y[],       /* o  : output signal            Qx-1*/
    const Word16 mu,  /* i  : preemphasis coefficient  Q15 */
    const Word16 lg,  /* i  : vector size              Q0  */
    Word16 *mem       /* i/o: memory (x[-1])           Qx  */
)
{
    Word16 i, temp;

    temp = x[lg - 1]; /* Qx */
    move16();

    FOR( i = lg - 1; i > 0; i-- )
    {
        y[i] = L_msu0_sat( L_mult( x[i], 16384 ), x[i - 1], mu ); /* Qx+16 */
        move16();
    }
    y[0] = L_msu0_sat( L_mult( x[0], 16384 ), *mem, mu ); /* Qx+16 */
    move16();

    *mem = temp; /* Qx */
    move16();

    return;
}
#endif
/*-------------------------------------------------------------*
 * preemph_ivas_fx()
 *
+15 −2
Original line number Diff line number Diff line
@@ -2754,8 +2754,11 @@ void lag_wind_32(
// preemp_fx.c
#define PREEMPH_FX( signal, mu, L, mem ) preemph_copy_fx( ( signal ), ( signal ), ( mu ), ( L ), ( mem ) )
#ifndef FIX_2015_PREMPH_SAT_ALT
#define PREEMPH_32FX( signal, signal_out, mu, L, mem ) preemph_copy_32fx( ( signal ), ( signal_out ), ( mu ), ( L ), ( mem ) )
#else
#define PREEMPH_32FX( signal, signal_out, mu, L, mem ) preemph_copy_32fx2( ( signal ), ( signal_out ), ( mu ), ( L ), ( mem ) )
#endif
void preemph_copy_fx(
    const Word16 x[], /* i  : i   signal             Qx  */
    Word16 y[],       /* o  : output signal            Qx  */
@@ -2764,6 +2767,7 @@ void preemph_copy_fx(
    Word16 *mem       /* i/o: memory (x[-1])           Qx  */
);
#ifndef FIX_2015_PREMPH_SAT_ALT
void preemph_copy_32fx(
    const Word16 x[], /* i  : i   signal             Qx  */
    Word32 y[],       /* o  : output signal            Qx  */
@@ -2771,6 +2775,15 @@ void preemph_copy_32fx(
    const Word16 lg,  /* i  : vector size              Q0  */
    Word16 *mem       /* i/o: memory (x[-1])           Qx  */
);
#else
void preemph_copy_32fx2(
    const Word16 x[], /* i  : i   signal             Qx  */
    Word32 y[],       /* o  : output signal            Qx  */
    const Word16 mu,  /* i  : preemphasis coefficient  Q15 */
    const Word16 lg,  /* i  : vector size              Q0  */
    Word16 *mem       /* i/o: memory (x[-1])           Qx  */
);
#endif
void E_UTIL_f_preemph2(
    Word16 shift,    /* Q0 */
+4 −0
Original line number Diff line number Diff line
@@ -2142,7 +2142,11 @@ static void ivas_subst_spec_fx(
            im = *pImX;
            move16();
            tmp = sub_sat( mult_r( re, cos_F ), mult_r( im, sin_F ) );
#ifdef FIX_2170_ASSERT_IN_FFT3
            im = add_sat( mult_r( re, sin_F ), mult_r( im, cos_F ) );
#else
            im = add( mult_r( re, sin_F ), mult_r( im, cos_F ) );
#endif
            IF( LT_16( alpha[k], 32766 ) )
            {
                alpha_local = mag_chg_local;
Loading