Commit 28a3fb4b authored by vaillancour's avatar vaillancour
Browse files

Fixes 16 Dtx3_dtx_12650_16kHz.b10.COD

parent 80951492
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -93,9 +93,7 @@ void FEC_scale_syn_fx(
    Word16 h1[L_FRAME/2], tilt, pitch_dist, mean_pitch;
    Word16 k;
    Word32 L_mean_pitch;
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
#endif

    enr_LP = 0;
    move16();
    gain2 = 0;
@@ -188,7 +186,7 @@ void FEC_scale_syn_fx(
                /* gain2 = (float)sqrt( enr_old / enr2 );*/
                L_tmp = Sqrt_Ratio32(L_enr_old, 0, L_enr2, 0, &exp2);
#ifdef BASOP_NOGLOB
                gain2 = round_fx_o(L_shl_o(L_tmp, sub(exp2, 1), &Overflow), &Overflow); /* in Q14 */
                gain2 = round_fx_sat(L_shl_sat(L_tmp, sub(exp2, 1))); /* in Q14 */
#else
                gain2 = round_fx(L_shl(L_tmp, sub(exp2, 1))); /* in Q14 */
#endif
@@ -205,7 +203,7 @@ void FEC_scale_syn_fx(
                /*gain1 = (float)sqrt( enr_old / enr1 );*/
                L_tmp = Sqrt_Ratio32(L_enr_old, 0, L_enr1, 0, &exp2);
#ifdef BASOP_NOGLOB
                gain1 = round_fx_o(L_shl_o(L_tmp, sub(exp2, 1), &Overflow), &Overflow); /* in Q14 */
                gain1 = round_fx_sat(L_shl_sat(L_tmp, sub(exp2, 1))); /* in Q14 */
#else
                gain1 = round_fx(L_shl(L_tmp, sub(exp2, 1))); /* in Q14 */
#endif
@@ -229,7 +227,7 @@ void FEC_scale_syn_fx(
                    /*rr1 = dotp( h1, h1+1, L_FRAME/2-1 );*/
                    /*tilt = rr1 / rr0;*/
#ifdef BASOP_NOGLOB
                    tilt = extract_h(L_shl_o(get_gain(h1+1, h1, L_FRAME/2-1),15, &Overflow));
                    tilt = extract_h(L_shl_sat(get_gain(h1+1, h1, L_FRAME/2-1),15));
#else
                    tilt = extract_h(L_shl(get_gain(h1+1, h1, L_FRAME/2-1),15));
#endif
@@ -316,7 +314,7 @@ void FEC_scale_syn_fx(
                    /*gain1 = (float)sqrt( enr_old / enr1 );*/
                    L_tmp = Sqrt_Ratio32(L_enr_old, 0, L_enr1, 0, &exp2);
#ifdef BASOP_NOGLOB
                    gain1 = round_fx_o(L_shl_o(L_tmp, sub(exp2, 1), &Overflow), &Overflow); /* in Q14 */
                    gain1 = round_fx_sat(L_shl_sat(L_tmp, sub(exp2, 1))); /* in Q14 */
#else
                    gain1 = round_fx(L_shl(L_tmp, sub(exp2, 1))); /* in Q14 */
#endif
@@ -402,7 +400,11 @@ void FEC_scale_syn_fx(
                {
                    /* Voiced-voiced recovery */
                    test();
#ifdef BASOP_NOGLOB
                    IF( *old_enr_LP != 0 && GT_16(enr_LP, shl_sat(*old_enr_LP, 1)))
#else
                    IF( *old_enr_LP != 0 && GT_16(enr_LP, shl(*old_enr_LP, 1)))
#endif
                    {
                        /* enr_q /= enr_LP */
                        exp = norm_l(L_enr_q);
@@ -488,7 +490,7 @@ void FEC_scale_syn_fx(
            L_tmp = L_deposit_h(tmp);
            L_tmp = Isqrt_lc(L_tmp, &exp2);
#ifdef BASOP_NOGLOB
            gain2 = round_fx_o(L_shl_o(L_tmp, sub(exp2, 1), &Overflow), &Overflow); /* in Q14 */
            gain2 = round_fx_sat(L_shl_sat(L_tmp, sub(exp2, 1))); /* in Q14 */
#else
            gain2 = round_fx(L_shl(L_tmp, sub(exp2, 1))); /* in Q14 */
#endif
@@ -553,7 +555,7 @@ void FEC_scale_syn_fx(
                L_tmp = L_deposit_h(tmp);
                L_tmp = Isqrt_lc(L_tmp, &exp2);
#ifdef BASOP_NOGLOB
                gain1 = round_fx_o(L_shl_o(L_tmp, sub(exp2, 1), &Overflow), &Overflow); /* in Q14 */
                gain1 = round_fx_sat(L_shl_sat(L_tmp, sub(exp2, 1))); /* in Q14 */
#else
                gain1 = round_fx(L_shl(L_tmp, sub(exp2, 1))); /* in Q14 */
#endif