Commit 4947addb authored by vaillancour's avatar vaillancour
Browse files

Fixes for stv32c_sw_72_164_32kHz.f06.COD

parent ecf5dcb7
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1918,7 +1918,11 @@ void time_envelop_shaping_fx(
        Energy = L_deposit_l(0);
        FOR(j=0; j<L/4; j++)
        {
#ifdef BASOP_NOGLOB
            Energy = L_mac0_sat(Energy, *pit, *pit); /*(2*Q_synth) */
#else
            Energy = L_mac0(Energy, *pit, *pit); /*(2*Q_synth) */
#endif
            pit++;
        }
        Energy = Mult_32_16(Energy, inv_L); /*Q(29-exp_L-15) -> Q(-exp_L+14+2*Q_synth) */
@@ -1941,7 +1945,11 @@ void time_envelop_shaping_fx(
        }

        test();
#ifdef BASOP_NOGLOB
        IF(LT_32(SWB_tenv[i], 65536)&&LT_32(Energy,L_shl_sat(SWB_tenv[i],sub(16,exp))))
#else
        IF(LT_32(SWB_tenv[i], 65536)&&LT_32(Energy,L_shl(SWB_tenv[i],sub(16,exp))))
#endif
        {
            *Q_synth = add(*Q_synth, 3);
            move16();
@@ -1966,7 +1974,11 @@ void time_envelop_shaping_fx(

            FOR (j = 0; j < L/4; j++)
            {
#ifdef BASOP_NOGLOB
                *pit = round_fx_sat(L_shl_sat(L_mult(tmp, *pit), sub(exp,1))); /*Q(13-exp+1)->Q(14-exp)->Qsyn-3 */
#else
                *pit = round_fx(L_shl(L_mult(tmp, *pit), sub(exp,1))); /*Q(13-exp+1)->Q(14-exp)->Qsyn-3 */
#endif
                pit++;
            }
        }