Commit 68d4dcbf authored by vaillancour's avatar vaillancour
Browse files

Fixes some IO decoder conditions

parent 2732769d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2349,7 +2349,11 @@ Word32 Sqrt_Ratio32(/* o: Result in Q31
    exp2 = add(exp2, temp);

    /* Prepare for Inverse */
#ifdef BASOP_NOGLOB
    temp = round_fx_sat(L_val1);
#else
    temp = round_fx(L_val1);
#endif
    temp = div_s(16384, temp);
    /* Mult Now */
    L_val2 = Mult_32_16(L_val2, temp);
+5 −5
Original line number Diff line number Diff line
@@ -903,15 +903,11 @@ static void Corre(
    Word16 den2, den2_exp;
    Word32 tmp;
    Word16 tmp_exp;
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
#endif


    /* keep Q15 normalized result */
    cor = extract_h(Dot_product12(x, y, l, &cor_exp));
#ifdef BASOP_NOGLOB
    den = add_o(extract_h(Dot_product12(y, y, l, &den_exp)), 1, &Overflow);
    den = add_sat(extract_h(Dot_product12(y, y, l, &den_exp)), 1);
#else
    den = add(extract_h(Dot_product12(y, y, l, &den_exp)), 1);
#endif
@@ -925,7 +921,11 @@ static void Corre(

    tmp = Isqrt_lc(tmp, &tmp_exp);
    /* keep Q15 result */
#ifdef BASOP_NOGLOB
    gain[0] = shl_sat(mult_r(cor, extract_h(tmp)), add(cor_exp, tmp_exp));
#else
    gain[0] = shl(mult_r(cor, extract_h(tmp)), add(cor_exp, tmp_exp));
#endif
    move16();
}
+8 −0
Original line number Diff line number Diff line
@@ -111,7 +111,11 @@ static void Ener_per_band_fx(
        IF (L_temp != 0) /* avoid executing sqrt of 0 (because a div_s is used to invert and then call inv_sqrt) */
        {
            L_temp2 = Sqrt_Ratio32(L_temp, exp, 1, 0, &i);
#ifdef BASOP_NOGLOB
            L_temp2 = L_shr_sat(L_temp2, sub(15-ENER_FX_Q_GUARD, i));
#else
            L_temp2 = L_shr(L_temp2, sub(15-ENER_FX_Q_GUARD, i));
#endif
        }
        y_gain4_fx[j] = L_temp2;
        move32();
@@ -254,7 +258,11 @@ static void gs_dec_amr_wb_fx(
        move16();
        FOR(i = 0; i < CRIT_NOIS_BAND; i++)
        {
#ifdef BASOP_NOGLOB
            temp  = s_max(round_fx_sat(Ener_per_bd_iQ_fx[i]), temp);
#else
            temp  = s_max(round_fx(Ener_per_bd_iQ_fx[i]), temp);
#endif
        }

        test();
+1 −1

File changed.

Contains only whitespace changes.