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

more staturation fixes based on a different saturation level

parent 332f377a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2348,7 +2348,11 @@ void hq_wb_nf_bwe_fx(
#endif
					}

#ifdef BASOP_NOGLOB
                    IF( GT_32( L_tmp2, L_shl_sat( min_coef_fx, sub( exp, 13 ) ) ) ) /*exp  */
#else
                    IF( GT_32( L_tmp2, L_shl( min_coef_fx, sub( exp, 13 ) ) ) ) /*exp  */
#endif
					{
						L_tmp2 = L_shr(min_coef_fx, 1);
						exp = 12;
+5 −1
Original line number Diff line number Diff line
@@ -74,7 +74,11 @@ Word16 stab_est_fx(
    {
        /*fcorr += ftmp_c*ftmp_c;*/
        tmp16 = sub(lt_diff_etot[i], mean_diff);
#ifdef BASOP_NOGLOB
        L_tmp = L_mac0_sat( L_tmp, tmp16, tmp16 );
#else
        L_tmp = L_mac0( L_tmp, tmp16, tmp16 );
#endif
    }
    /*------------------------------------------------------------------------*
     * Update
+5 −1
Original line number Diff line number Diff line
@@ -574,7 +574,11 @@ void decoder_tcx(
            /* gainCompensate = st->last_gain_syn_deemph/(float)sqrt(dot_product( h1, h1, L_SUBFR)); */
            tmp32 = Dot_productSq16HQ( 0, h1, L_SUBFR, &gainCompensate_e)/*Q15, gainCompensate_e*/;
            gainCompensate_e = add(gainCompensate_e,10/*scaling of h1[0] and E_UTIL:synthesis*/);
#ifdef BASOP_NOGLOB
            gainCompensate = round_fx_sat( Sqrt32( tmp32, &gainCompensate_e ) ) /*Q15, gainCompensate_e*/;
#else
            gainCompensate = round_fx( Sqrt32( tmp32, &gainCompensate_e ) ) /*Q15, gainCompensate_e*/;
#endif
            BASOP_Util_Divide_MantExp (   st->last_gain_syn_deemph,
                                          st->last_gain_syn_deemph_e,
                                          gainCompensate,
+4 −3
Original line number Diff line number Diff line
@@ -511,10 +511,11 @@ void hq_lr_dec_fx(
                IF(EQ_16(last_bitalloc_max_band[j++], 1))
                {
                    L_tmp = Mult_32_16(Ep_tmp_fx[i],sub(bands_fx,lowband));/*Q(13+0-15 = -2) */
                    tmp = Calc_inv(L_shl(L_tmp,14), &exp);
#ifdef BASOP_NOGLOB
                    tmp = Calc_inv( L_shl_sat( L_tmp, 14 ), &exp );
                    L_tmp = L_shl_sat( Mult_32_16( Ep_avrg_fx, tmp ), sub( 14, exp ) ); /*Q(13+exp-15 +14-exp+2 = 14) */
#else
                    tmp = Calc_inv( L_shl( L_tmp, 14 ), &exp );
                    L_tmp = L_shl( Mult_32_16( Ep_avrg_fx, tmp ), sub( 14, exp ) ); /*Q(13+exp-15 +14-exp+2 = 14) */
#endif
                    L_tmp =L_max(L_tmp,16384); /*14 */