Commit 3ab95884 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

clang patch

parent 6e59f8d8
Loading
Loading
Loading
Loading
Loading
+86 −87
Original line number Diff line number Diff line
@@ -1002,7 +1002,6 @@ void Decimate_allpass_steep_fx(
        mem[ALLPASSSECTIONS_STEEP - 1] = extract_h( L_msu_o( Lacc1, AP1_STEEP_FX[ALLPASSSECTIONS_STEEP - 1], out_fx[k], &Overflow ) ); /* Qx    */
        move16();
#endif

    }

    /* lower allpass filter chain  */
+22 −0
Original line number Diff line number Diff line
@@ -124,13 +124,20 @@ Word32 L_Comp( Word16 hi, Word16 lo )
Word32 Mpy_32( Word16 hi1, Word16 lo1, Word16 hi2, Word16 lo2 )
{
    Word32 L_32;
#ifndef ISSUE_1836_replace_overflow_libcom
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
#endif
#endif

    L_32 = L_mult( hi1, hi2 );
#ifdef ISSUE_1836_replace_overflow_libcom
    L_32 = L_mac_sat( L_32, mult( hi1, lo2 ), 1 );  //??sat
    L_32 = L_mac_sat( L_32, mult( lo1, hi2 ), 1 );  //??sat
#else
    L_32 = L_mac_o( L_32, mult( hi1, lo2 ), 1, &Overflow );
    L_32 = L_mac_o( L_32, mult( lo1, hi2 ), 1, &Overflow );
#endif

    return ( L_32 );
}
@@ -159,13 +166,21 @@ Word32 Mpy_32( Word16 hi1, Word16 lo1, Word16 hi2, Word16 lo2 )
Word32 Mac_32( Word32 L_num, Word16 hi1, Word16 lo1, Word16 hi2, Word16 lo2 )
{
    Word32 L_32;
#ifdef ISSUE_1836_replace_overflow_libcom
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
#endif
#endif

#ifdef ISSUE_1836_replace_overflow_libcom
    L_32 = L_mac_sat( L_num, hi1, hi2 );            //??sat
    L_32 = L_mac_sat( L_32, mult( hi1, lo2 ), 1 );  //??sat
    L_32 = L_mac_sat( L_32, mult( lo1, hi2 ), 1 );  //??sat
#else
    L_32 = L_mac_o( L_num, hi1, hi2, &Overflow );
    L_32 = L_mac_o( L_32, mult( hi1, lo2 ), 1, &Overflow );
    L_32 = L_mac_o( L_32, mult( lo1, hi2 ), 1, &Overflow );
#endif

    return ( L_32 );
}
@@ -193,12 +208,19 @@ Word32 Mac_32( Word32 L_num, Word16 hi1, Word16 lo1, Word16 hi2, Word16 lo2 )
Word32 Sqr_32( Word16 hi, Word16 lo )
{
    Word32 L_32;
#ifndef ISSUE_1836_replace_overflow_libcom
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
#endif
#endif

#ifdef ISSUE_1836_replace_overflow_libcom
    L_32 = L_mult_sat( hi, hi );                //??sat
    L_32 = L_mac_sat( L_32, mult( hi, lo ), 2 );//??sat
#else
    L_32 = L_mult_o( hi, hi, &Overflow );
    L_32 = L_mac_o( L_32, mult( hi, lo ), 2, &Overflow );
#endif

    return ( L_32 );
}
+10 −0
Original line number Diff line number Diff line
@@ -30,9 +30,11 @@ void phase_dispersion(
    Word32 x32[2 * L_SUBFR];
    Word16 *code_real, *code_imag;
    const Word16 *h_real, *h_imag;
#ifndef ISSUE_1836_replace_overflow_libcom
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
#endif
#endif


    move16();
@@ -57,7 +59,11 @@ void phase_dispersion(
    move16();
    prev_gain_pit[0] = gain_pit;

#ifdef ISSUE_1836_replace_overflow_libcom
    IF( GT_32( gain_code, L_add_sat( *prev_gain_code, L_shl_sat( *prev_gain_code, 1 ) ) ) ) //??sat
#else
    IF( GT_32( gain_code, L_add_o( *prev_gain_code, L_shl_o( *prev_gain_code, 1, &Overflow ), &Overflow ) ) )
#endif
    {
        IF( LT_16( state, 2 ) )
        {
@@ -165,7 +171,11 @@ void phase_dispersion(
        scale2 = getScaleFactor32( x32, L_subfr );
        FOR( i = 0; i < L_subfr; i++ )
        {
#ifdef ISSUE_1836_replace_overflow_libcom
            code[i] = round_fx_sat( L_shl_sat( x32[i], scale2 ) );
#else
            code[i] = round_fx_o( L_shl_o( x32[i], scale2, &Overflow ), &Overflow );
#endif
            move16();
        }
        j = sub( j, scale2 );
+10 −0
Original line number Diff line number Diff line
@@ -97,9 +97,11 @@ void deemph_lpc_fx(
    Word16 k, temp;
    Word16 b_fx[M + 2];                 /* Q12 */
    Word16 a_fx[2] = { -22282, 32767 }; /* Q15 {-PREEMPH_FAC,1.0} */
#ifndef ISSUE_1836_replace_overflow_libcom
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
#endif
    b_fx[0] = 4096;
    move16(); /* 1 in Q12 */
@@ -115,7 +117,11 @@ void deemph_lpc_fx(
    {
        /* LPC_de_curr[k] = a[0]*b[k] + a[1]*b[k+1]; */
        temp = mult( a_fx[0], b_fx[k] ); /* Q12 */
#ifdef ISSUE_1836_replace_overflow_libcom
        LPC_de_curr_fx[k] = add_sat( temp, b_fx[k + 1] );   //??sat
#else
        LPC_de_curr_fx[k] = add_o( temp, b_fx[k + 1], &Overflow );
#endif
        move16(); /* Q12 */
    }

@@ -137,7 +143,11 @@ void deemph_lpc_fx(
        {
            /* LPC_de_old[k] = a[0]*b[k] + a[1]*b[k+1]; */
            temp = mult( a_fx[0], b_fx[k] ); /* Q12 */
#ifdef ISSUE_1836_replace_overflow_libcom
            LPC_de_old_fx[k] = add_sat( temp, b_fx[k + 1] );  //??sat
#else
            LPC_de_old_fx[k] = add_o( temp, b_fx[k + 1], &Overflow );
#endif
            move16(); /* Q12 */
        }
    }
+25 −0
Original line number Diff line number Diff line
@@ -35,9 +35,11 @@ void pred_lt4_ivas_fx(
    Word32 s;
    const Word16 *x0, *x1, *x2;
    const Word32 *c1, *c2;
#ifndef ISSUE_1836_replace_overflow_libcom
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
#endif
    x0 = &excI[-T0];

@@ -71,7 +73,11 @@ void pred_lt4_ivas_fx(
            s = W_sat_l( W_shr( s64, 16 ) ); /* Q_exc + Q16 */
        }

#ifdef ISSUE_1836_replace_overflow_libcom
        excO[j] = round_fx_sat( s ); /* Q_exc */  //??sat
#else
        excO[j] = round_fx_o( s, &Overflow ); /* Q_exc */
#endif
        move16();
    }
    return;
@@ -91,9 +97,11 @@ void pred_lt4(
    Word16 i, j;
    Word32 s;
    const Word16 *x0, *x1, *x2, *c1, *c2;
#ifndef ISSUE_1836_replace_overflow_libcom
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
#endif
    x0 = &excI[-T0];

@@ -127,12 +135,21 @@ void pred_lt4(
            }
            s = W_sat_l( s64 ); /* Q_exc + Q14 */
        }
#ifdef ISSUE_1836_replace_overflow_libcom
#if ( INTERP_EXP != -1 )
        s = L_shl_sat( s, INTERP_EXP + 1 ); /* Q_exc + Q15 */ //??sat
#endif

        excO[j] = round_fx_sat( s ); /* Q_exc */  //??sat
        move16();
#else
#if ( INTERP_EXP != -1 )
        s = L_shl_o( s, INTERP_EXP + 1, &Overflow ); /* Q_exc + Q15 */
#endif

        excO[j] = round_fx_o( s, &Overflow ); /* Q_exc */
        move16();
#endif
    }
    return;
}
@@ -177,9 +194,11 @@ void pred_lt4_tc_fx(
    Word16 excO[L_SUBFR + 1];
    Word32 L_sum;
    Word16 excI[2 * L_SUBFR];
#ifndef ISSUE_1836_replace_overflow_libcom
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
#endif
    Copy( exc + sub( i_subfr, L_SUBFR ), excI, L_SUBFR * 2 ); /* Q0 */

@@ -212,8 +231,14 @@ void pred_lt4_tc_fx(
                k += UP_SAMP;
                L_sum = L_mac( L_sum, x0[i], win[k] ); /* Q15 */
            }
#ifdef ISSUE_1836_replace_overflow_libcom
            L_sum = L_shl_sat( L_sum, 1 );   /* Q16 */  //??sat
            excO[j] = round_fx_sat( L_sum  ); /* Q0 */ //??sat
#else
            L_sum = L_shl_o( L_sum, 1, &Overflow );   /* Q16 */
            excO[j] = round_fx_o( L_sum, &Overflow ); /* Q0 */
#endif

            move16();

            x0++;
+161 −161

File changed.

Contains only whitespace changes.

+4 −4

File changed.

Contains only whitespace changes.

+4 −4

File changed.

Contains only whitespace changes.

Loading