Commit a0244f5c authored by vaillancour's avatar vaillancour
Browse files

Fix for cmd : ./switchPaths/sw_72_1280.bin 16

parent 431dbc32
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -602,7 +602,7 @@ static void spectautocorr_fx(
            c[j] = mult_r(c[j-1], x[i-1]);
            move16();
#ifdef BASOP_NOGLOB
            c[j] = add_o(c[j], sub(c[j], c[j-2]), &Overflow);
            c[j] = add_o(c[j], sub_o(c[j], c[j-2], &Overflow), &Overflow);
#else /* BASOP_NOGLOB */
            c[j] = add(c[j], sub(c[j], c[j-2]));
#endif /* BASOP_NOGLOB */
@@ -620,7 +620,7 @@ static void spectautocorr_fx(
            c[j+1] = mult_r(c[j], x[i-1]);
            move16();
#ifdef BASOP_NOGLOB
            c[j+1] = add_o(c[j+1], sub(c[j+1], c[j-1]), &Overflow);
            c[j+1] = add_o(c[j+1], sub_o(c[j+1], c[j-1], &Overflow), &Overflow);
#else /* BASOP_NOGLOB */
            c[j+1] = add(c[j+1], sub(c[j+1], c[j-1]));
#endif /* BASOP_NOGLOB */
@@ -638,7 +638,7 @@ static void spectautocorr_fx(
        c[j] = mult_r(c[j-1], x[i-1]);
        move16();
#ifdef BASOP_NOGLOB
        c[j] = add_o(c[j], sub(c[j], c[j-2]), &Overflow);
        c[j] = add_o(c[j], sub_o(c[j], c[j-2], &Overflow), &Overflow);
#else /* BASOP_NOGLOB */
        c[j] = add(c[j], sub(c[j], c[j-2]));
#endif /* BASOP_NOGLOB */
+15 −0
Original line number Diff line number Diff line
@@ -89,6 +89,9 @@ Word16 encod_tran_fx(
    Word16 L_frame_fx;
    Word16 shift_wsp;
    Word32 L_tmp;
#ifdef BASOP_NOGLOB
    Flag Overflow = 0;
#endif
    BSTR_ENC_HANDLE hBstr = st_fx->hBstr;
    SC_VBR_ENC_HANDLE  hSC_VBR = st_fx->hSC_VBR;
    LPD_state_HANDLE hLPDmem = st_fx->hLPDmem;
@@ -220,8 +223,13 @@ Word16 encod_tran_fx(
        }
        gp_clip_test_gain_pit_fx(st_fx->element_mode, st_fx->core_brate_fx, gain_pit, st_fx->clip_var_fx );

#ifdef BASOP_NOGLOB
        Lgcode = L_shl_o(gain_code, Q_new, &Overflow);      /* scaled gain_code with Qnew -> Q16*/
        gcode16 = round_fx_o(Lgcode, &Overflow);
#else
        Lgcode = L_shl(gain_code, Q_new);      /* scaled gain_code with Qnew -> Q16*/
        gcode16 = round_fx(Lgcode);
#endif
        hLPDmem->tilt_code = Est_tilt2(&exc_fx[i_subfr], gain_pit, code, Lgcode, &voice_fac, shift);
        /*-----------------------------------------------------------------*
        * Update memory of the weighting filter
@@ -271,10 +279,17 @@ Word16 encod_tran_fx(
        {
            /* code in Q9, gain_pit in Q14 */
            L_tmp = L_mult(gcode16, code[i]);
#ifdef BASOP_NOGLOB
            L_tmp = L_shl_o(L_tmp, 5, &Overflow);
            L_tmp = L_mac_o(L_tmp, exc_fx[i + i_subfr], gain_pit, &Overflow);
            L_tmp = L_shl_o(L_tmp, 1, &Overflow); /* saturation can occur here */
            exc_fx[i + i_subfr] = round_fx_o(L_tmp, &Overflow);
#else
            L_tmp = L_shl(L_tmp, 5);
            L_tmp = L_mac(L_tmp, exc_fx[i + i_subfr], gain_pit);
            L_tmp = L_shl(L_tmp, 1); /* saturation can occur here */
            exc_fx[i + i_subfr] = round_fx(L_tmp);
#endif
        }

        /*-----------------------------------------------------------------*