Commit af42b1ba authored by vaillancour's avatar vaillancour
Browse files

Fix for ./switchPaths/sw_96_1280.bin 32

parent 420c149b
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -357,12 +357,22 @@ PMT("code to be validated")
        IF(use_fcb != 0)
        {
            Ltmp = L_mult(gcode16, y2[L_subfr - 1]);
#ifdef BASOP_NOGLOB
            Ltmp = L_shl_o(Ltmp, add(5, shift), &Overflow);
            Ltmp = L_negate(Ltmp);
            Ltmp = L_mac_o(Ltmp, xn[L_subfr - 1], 16384, &Overflow);
            Ltmp = L_msu_o(Ltmp, y1[L_subfr - 1], gain_pit, &Overflow);
            Ltmp = L_shl_o(Ltmp, sub(1, shift), &Overflow);
            hLPDmem->mem_w0 = round_fx_o(Ltmp, &Overflow);      /*Q_new-1         */
#else
            Ltmp = L_mult(gcode16, y2[L_subfr - 1]);
            Ltmp = L_shl(Ltmp, add(5, shift));
            Ltmp = L_negate(Ltmp);
            Ltmp = L_mac(Ltmp, xn[L_subfr - 1], 16384);
            Ltmp = L_msu(Ltmp, y1[L_subfr - 1], gain_pit);
            Ltmp = L_shl(Ltmp, sub(1, shift));
            hLPDmem->mem_w0 = round_fx(Ltmp);      /*Q_new-1         */
#endif
        }
        ELSE
        {
@@ -382,10 +392,18 @@ PMT("code to be validated")
            {
                /* code in Q9, gain_pit in Q14 */
                Ltmp = L_mult(gcode16, code[i]);
#ifdef BASOP_NOGLOB
                Ltmp = L_shl_o(Ltmp, 5, &Overflow);
                Ltmp = L_mac_o(Ltmp, exc[i + i_subfr], gain_pit, &Overflow);
                Ltmp = L_shl_o(Ltmp, 1, &Overflow); /* saturation can occur here */
                exc[i + i_subfr] = round_fx_o(Ltmp, &Overflow);
#else
                Ltmp = L_mult(gcode16, code[i]);
                Ltmp = L_shl(Ltmp, 5);
                Ltmp = L_mac(Ltmp, exc[i + i_subfr], gain_pit);
                Ltmp = L_shl(Ltmp, 1); /* saturation can occur here */
                exc[i + i_subfr] = round_fx(Ltmp);
#endif
            }
        }
        ELSE