Commit 9f1a30fc authored by vaillancour's avatar vaillancour
Browse files

more staturation fixes based on a different saturation level

parent 108ffa09
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1116,7 +1116,11 @@ void IGFCommonFuncsMDCTSquareSpec(const Word16 sqrtBgn,

    FOR (i = sqrtBgn; i < sqrtEnd; i++)
    {
#ifdef BASOP_NOGLOB
        tmp = round_fx_sat( L_shl_sat( mdctSpec[i], s1 ) );
#else
        tmp = round_fx( L_shl( mdctSpec[i], s1 ) );
#endif
        mdctSquareSpec[j++] = L_mult0(tmp, tmp);
        move32();
    }
+5 −1
Original line number Diff line number Diff line
@@ -264,7 +264,11 @@ void stat_noise_uv_mod_fx(
        tmp_res = div_s(1<<14, tmp_den);                /* 15+14-Q_local-tmp_shift-Q_ge+16 */
        L_tmp_res = Mult_32_16(*ge_sm, tmp_res);        /* Q_stat_noise_ge+45-Q_local-Q_ge-tmp_shift-15 */
        L_tmp_res = Mult_32_16(L_tmp_res, sub(32767, beta)); /*30-Q_local-tmp_shift+15-15         */
#ifdef BASOP_NOGLOB
        L_tmp_res = L_add_sat( L_shl_sat( L_tmp_res, sub( add( Q_local, tmp_shift ), 15 ) ), beta ); /* Q15 */
#else
        L_tmp_res = L_add( L_shl( L_tmp_res, sub( add( Q_local, tmp_shift ), 15 ) ), beta ); /* Q15 */
#endif
#ifdef BASOP_NOGLOB
        tmp_res = extract_h(L_shl_o(L_tmp_res, 15, &Overflow));  /* 15+15-16=14 */
#else
+5 −1
Original line number Diff line number Diff line
@@ -3538,7 +3538,11 @@ Word16 ppp_extract_pitch_period_fx(


        expb = norm_l(Lacc);
#ifdef BASOP_NOGLOB
        fracb = round_fx_sat( L_shl_sat( Lacc, expb ) );
#else
        fracb = round_fx( L_shl( Lacc, expb ) );
#endif
        expb = sub(30, add(expb,Qres));

        scale1 = shr(sub(fraca,fracb),15);
+5 −1
Original line number Diff line number Diff line
@@ -545,7 +545,11 @@ void hq_lr_enc_fx(
                IF(EQ_16(hHQ_core->last_bitalloc_max_band[j++], 1))
                {
                    L_tmp = Mult_32_16(Ep_tmp_fx[i],sub(bands_fx,lowband));/*Q(13+0-15 = -2) */
#ifdef BASOP_NOGLOB
                    tmp = extract_h( L_shl_sat( L_tmp, 14 ) ); /*Q-2 */
#else
                    tmp = extract_h( L_shl( L_tmp, 14 ) ); /*Q-2 */
#endif
                    IF(tmp != 0)
                    {
                        exp = norm_s(tmp);
+10 −2
Original line number Diff line number Diff line
@@ -408,12 +408,20 @@ void ltd_stable_fx(
    FOR(i=0; i<8; i++)
    {
        tmp = extract_h(tmp32[i]);
#ifdef BASOP_NOGLOB
        tmp_mul = L_mult_sat( tmp, tmp );
#else
        tmp_mul = L_mult( tmp, tmp );
#endif
        tmp_mul = L_shr(tmp_mul, 3);
        dif32 = L_add(dif32, tmp_mul);

        tmp = extract_h(mid_frame_amp32[i]);
#ifdef BASOP_NOGLOB
        mid_frame_amp_mul = L_mult_sat( tmp, tmp );
#else
        mid_frame_amp_mul = L_mult( tmp, tmp );
#endif
        mid_frame_amp_mul = L_shr(mid_frame_amp_mul,3);
        apow32 = L_add(apow32, mid_frame_amp_mul);
    }
Loading