Commit b6537c24 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

clang patch and some ops replaced

parent 4d82a9fd
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -30,9 +30,11 @@ void transf_cdbk_dec_fx(
    Word32 L_tmp;
    Word32 dct_code32[L_SUBFR];
    Word16 qdct;
#ifndef ISSUE_1866_replace_overflow_libdec
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
#endif
    Word16 avq_bit_sFlag;
    Word16 trgtSvPos;
@@ -142,7 +144,11 @@ void transf_cdbk_dec_fx(
    }
    FOR( i = 0; i < L_SUBFR; i++ )
    {
#ifdef ISSUE_1866_replace_overflow_libdec
        code_preQ[i] = shl_sat( code_preQ[i], q_Code_preQ );  //??sat
#else
        code_preQ[i] = shl_o( code_preQ[i], q_Code_preQ, &Overflow );
#endif
        move16(); /* code_preQ in Q6*/
    }

+6 −0
Original line number Diff line number Diff line
@@ -73,9 +73,11 @@ void dec_pit_exc_fx(
    Word16 use_fcb;
    Word32 gc_mem[NB_SUBFR - 1]; /* gain_code from previous subframes                    */
    Word16 gp_mem[NB_SUBFR - 1]; /* gain_pitch from previous subframes                   */
#ifndef ISSUE_1866_replace_overflow_libdec
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
#endif

    use_fcb = 0;
@@ -248,7 +250,11 @@ void dec_pit_exc_fx(
                gain_pit_fx = st_fx->lp_gainp_fx;
                move16();
            }
#ifndef ISSUE_1866_replace_overflow_libdec
            gain_code_fx = L_mult0( s_max( sub( 32767, shl_o( gain_pit_fx, 1, &Overflow ) ), 16384 /*0.5.Q15*/ ), st_fx->lp_gainc_fx ); /* Use gain pitch and past gain code as an indicator to help finding the best scaling value. gain_code_fx used a temp var*/
#else
            gain_code_fx = L_mult0( s_max( sub( 32767, shl_sat( gain_pit_fx, 1 ) ), 16384 /*0.5.Q15*/ ), st_fx->lp_gainc_fx ); /* Use gain pitch and past gain code as an indicator to help finding the best scaling value. gain_code_fx used a temp var*/ //??sat
#endif
        }

        /*----------------------------------------------------------------------*
+32 −0
Original line number Diff line number Diff line
@@ -493,16 +493,22 @@ static void modify_pst_param_fx(
    Word16 tmp;
    Word16 lp_noiseQ12;
    Word32 L_tmp;
#ifndef ISSUE_1866_replace_overflow_libdec
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move16();
#endif
#endif


    test();
    IF( NE_16( coder_type, INACTIVE ) && LT_16( lp_noise, LP_NOISE_THR_FX ) )
    {
#ifdef ISSUE_1866_replace_overflow_libdec
        lp_noiseQ12 = shl_sat( lp_noise, 4 ); /* to go from Q8 to Q12 */  //??sat
#else
        lp_noiseQ12 = shl_o( lp_noise, 4, &Overflow ); /* to go from Q8 to Q12 */
#endif

        /* ftmp = lp_noise*BG1_FX + CG1_FX */
        tmp = mac_r( CG1_FX * 65536L, lp_noiseQ12, BG1_FX * 8 ); /* x8 to go from Q12 to Q15 */
@@ -573,10 +579,12 @@ static void pst_ltp_fx(
    Word16 gain_plt;
    Word16 off_yup;
    Word16 nb_sh_sig;
#ifndef ISSUE_1866_replace_overflow_libdec
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move16();
#endif
#endif


    /* i  signal justified on 13 bits */
@@ -675,7 +683,11 @@ static void pst_ltp_fx(
        /* decrease gain in noisy condition */
        /* gain_plt += (1.0f-gain_plt) * gain_factor */
        /* gain_plt = gain_plt + gain_factor - gain_plt*gain_factor */
#ifdef ISSUE_1866_replace_overflow_libdec
        gain_plt = msu_r_sat( L_msu( L_deposit_h( gain_plt ), gain_plt, gain_factor ), -32768, gain_factor ); // Q15  //??sat
#else
        gain_plt = msu_ro( L_msu( L_deposit_h( gain_plt ), gain_plt, gain_factor ), -32768, gain_factor, &Overflow ); // Q15
#endif

        /** filtering by H0(z) = harmonic filter **/
        filt_plt_fx( ptr_sig_in, ptr_y_up, ptr_sig_pst0, gain_plt );
@@ -1419,10 +1431,12 @@ void Filt_mu_fx(
    Word16 n;
    Word16 mu, mu2, ga, temp;
    Word16 fact, sh_fact;
#ifndef ISSUE_1866_replace_overflow_libdec
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move16();
#endif
#endif


    IF( parcor0 > 0 )
@@ -1448,7 +1462,11 @@ void Filt_mu_fx(

    temp = sub( 1, abs_s( mu ) );
    BASOP_SATURATE_WARNING_OFF_EVS;
#ifdef ISSUE_1866_replace_overflow_libdec
    mu2 = add_sat( 32767, temp ); /* Q15 (1 - |mu|) */  //??sat
#else
    mu2 = add_o( 32767, temp, &Overflow ); /* Q15 (1 - |mu|) */
#endif
    BASOP_SATURATE_WARNING_ON_EVS;
    ga = div_s( fact, mu2 ); /* Q(sh_fact) / (1 - |mu|) */

@@ -1488,9 +1506,11 @@ void Filt_mu_ivas_fx(
    Word16 n;
    Word16 mu, mu2, ga, temp;
    Word16 fact, sh_fact;
#ifndef ISSUE_1866_replace_overflow_libdec
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move16();
#endif
#endif

    IF( EQ_16( extl, SWB_TBE ) )
@@ -1542,7 +1562,11 @@ void Filt_mu_ivas_fx(

    temp = sub( 1, abs_s( mu ) );
    BASOP_SATURATE_WARNING_OFF_EVS;
#ifdef ISSUE_1866_replace_overflow_libdec
    mu2 = add_sat( 32767, temp ); /* Q15 (1 - |mu|) */  //??sat
#else
    mu2 = add_o( 32767, temp, &Overflow ); /* Q15 (1 - |mu|) */
#endif
    BASOP_SATURATE_WARNING_ON_EVS;
    ga = div_s( fact, mu2 ); /* Q(sh_fact) / (1 - |mu|) */

@@ -1684,18 +1708,26 @@ void blend_subfr2_fx(
    Word16 fac2 = 0 + 512;     // 0.Q15 + ( 1.Q15 / L_SUBFR );
    Word16 step = 1024;        // 1.Q15 / ( L_SUBFR / 2 );
    Word16 i;
#ifndef ISSUE_1866_replace_overflow_libdec
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move16();
#endif
#endif
    move16();
    move16();
    move16();
    FOR( i = 0; i < L_SUBFR / 2; i++ )
    {
#ifdef ISSUE_1866_replace_overflow_libdec
        sigOut[i] = mac_r_sat( L_mult( fac1, sigIn1[i] ), fac2, sigIn2[i] ); // Qx  //??sat
        fac1 = sub_sat( fac1, step );                                               //??sat
        fac2 = add_sat( fac2, step );                                               //??sat
#else
        sigOut[i] = mac_ro( L_mult_o( fac1, sigIn1[i], &Overflow ), fac2, sigIn2[i], &Overflow ); // Qx
        fac1 = sub_o( fac1, step, &Overflow );
        fac2 = add_o( fac2, step, &Overflow );
#endif
        move16();
    }

+2 −2

File changed.

Contains only whitespace changes.

+12 −12

File changed.

Contains only whitespace changes.