Commit 244fde2f authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'basop_instrumentation_wmops_optimization' into 'main'

BASOP updates for lib_com, lib_dec, WMOPS optimization changes

See merge request !449
parents 00fe242e d4ae4a40
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -223,7 +223,7 @@ void powfp_odd2_evs(
 * and decoder remain synchronized.
 * and decoder remain synchronized.
 *-------------------------------------------------------------------------*/
 *-------------------------------------------------------------------------*/


void tcx_arith_scale_envelope_flt(
void tcx_arith_scale_envelope_ivas(
    const Word16 L_spec_core,    /* i  : number of lines to scale    Q0 */
    const Word16 L_spec_core,    /* i  : number of lines to scale    Q0 */
    Word16 L_frame,              /* i  : number of lines             Q0 */
    Word16 L_frame,              /* i  : number of lines             Q0 */
    const Word32 env[],          /* i  : unscaled envelope           Q16 */
    const Word32 env[],          /* i  : unscaled envelope           Q16 */
@@ -518,7 +518,7 @@ void tcx_arith_scale_envelope_flt(
 * and decoder remain synchronized.
 * and decoder remain synchronized.
 *-------------------------------------------------------------------------*/
 *-------------------------------------------------------------------------*/


void tcx_arith_render_envelope_flt(
void tcx_arith_render_envelope_ivas(
    const Word16 A_ind[],     /* i  : LPC coefficients of signal envelope        */
    const Word16 A_ind[],     /* i  : LPC coefficients of signal envelope        */
    const Word16 L_frame,     /* i  : number of spectral lines                   */
    const Word16 L_frame,     /* i  : number of spectral lines                   */
    const Word16 L_spec,      /* i  : length of the coded spectrum               */
    const Word16 L_spec,      /* i  : length of the coded spectrum               */
+137 −137

File changed.

Preview size limit exceeded, changes collapsed.

+153 −57

File changed.

Preview size limit exceeded, changes collapsed.

+17 −4
Original line number Original line Diff line number Diff line
@@ -79,13 +79,16 @@ void deemph_fx_32(
    Word32 *mem      /* i/o: memory (y[-1])    Qx*/
    Word32 *mem      /* i/o: memory (y[-1])    Qx*/
)
)
{
{
    int16_t i;
    Word16 i;


    signal[0] = L_add( signal[0], Mpy_32_16_1( ( *mem ), mu ) );
    signal[0] = L_add( signal[0], Mpy_32_16_1( ( *mem ), mu ) );
    move32();
    FOR( i = 1; i < L; i++ )
    FOR( i = 1; i < L; i++ )
    {
    {
        signal[i] = L_add( signal[i], Mpy_32_16_1( signal[i - 1], mu ) );
        signal[i] = L_add( signal[i], Mpy_32_16_1( signal[i - 1], mu ) );
        signal[i] = L_shl( signal[i], shift );
        signal[i] = L_shl( signal[i], shift );
        move32();
        move32();
    }
    }


    *mem = signal[L - 1];
    *mem = signal[L - 1];
@@ -125,7 +128,9 @@ void deemph_fx(
    Word16 i;
    Word16 i;
    Word32 L_tmp;
    Word32 L_tmp;
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    Flag Overflow;
    Overflow = 0;
    move32();
#endif
#endif


    L_tmp = L_deposit_h( signal[0] );
    L_tmp = L_deposit_h( signal[0] );
@@ -136,6 +141,7 @@ void deemph_fx(
    L_tmp = L_mac( L_tmp, *mem, mu );
    L_tmp = L_mac( L_tmp, *mem, mu );
    signal[0] = round_fx( L_tmp );
    signal[0] = round_fx( L_tmp );
#endif
#endif
    move16();


    FOR( i = 1; i < L; i++ )
    FOR( i = 1; i < L; i++ )
    {
    {
@@ -147,6 +153,7 @@ void deemph_fx(
        L_tmp = L_mac( L_tmp, signal[i - 1], mu );
        L_tmp = L_mac( L_tmp, signal[i - 1], mu );
        signal[i] = round_fx( L_tmp );
        signal[i] = round_fx( L_tmp );
#endif /* BASOP_NOGLOB */
#endif /* BASOP_NOGLOB */
        move16();
    }
    }


    *mem = signal[L - 1];
    *mem = signal[L - 1];
@@ -169,7 +176,9 @@ void Deemph2(
    Word16 i;
    Word16 i;
    Word32 L_tmp;
    Word32 L_tmp;
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    Flag Overflow;
    Overflow = 0;
    move32();
#endif
#endif
    /* saturation can occur in L_mac() */
    /* saturation can occur in L_mac() */


@@ -215,7 +224,9 @@ void E_UTIL_deemph2( Word16 shift, Word16 *x, const Word16 mu, const Word16 L, W
    Word16 i;
    Word16 i;
    Word32 L_tmp;
    Word32 L_tmp;
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    Flag Overflow;
    Overflow = 0;
    move32();
#endif
#endif


    /* signal[0] = signal[0] + mu * (*mem); */
    /* signal[0] = signal[0] + mu * (*mem); */
@@ -232,6 +243,7 @@ void E_UTIL_deemph2( Word16 shift, Word16 *x, const Word16 mu, const Word16 L, W
            L_tmp = L_msu( Mpy_32_16_1( L_tmp, mu ), x[i], shift );
            L_tmp = L_msu( Mpy_32_16_1( L_tmp, mu ), x[i], shift );
            x[i] = round_fx( L_tmp );
            x[i] = round_fx( L_tmp );
#endif
#endif
            move16();
        }
        }
    }
    }
    ELSE
    ELSE
@@ -245,6 +257,7 @@ void E_UTIL_deemph2( Word16 shift, Word16 *x, const Word16 mu, const Word16 L, W
            L_tmp = L_msu( Mpy_32_16_1( L_tmp, mu ), shr( x[i], shift ), -32768 );
            L_tmp = L_msu( Mpy_32_16_1( L_tmp, mu ), shr( x[i], shift ), -32768 );
            x[i] = round_fx( L_tmp );
            x[i] = round_fx( L_tmp );
#endif
#endif
            move16();
        }
        }
    }
    }


+7 −6

File changed.

Preview size limit exceeded, changes collapsed.

Loading