Commit 85a2f73f authored by vaillancour's avatar vaillancour
Browse files

more fixes for hi-level content

parent 8c1df91e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2225,8 +2225,11 @@ void GenShapedSHBExcitation_fx(
#endif
        {
            L_tmp = root_a_over_b_fx(pow1, Q_pow1, pow22, Q_pow22, &exp);
#ifdef BASOP_NOGLOB
            scale = round_fx_sat( L_shl_sat( L_tmp, exp ) ); /*Q15 */
#else
            scale = round_fx( L_shl( L_tmp, exp ) ); /*Q15 */

#endif
            FOR(k = 0; k < L_FRAME16k; k++)
            {
                /* White_exc16k: (Q_bwe_exc-NOISE_QADJ), scale: Q15 */
+6 −1
Original line number Diff line number Diff line
@@ -395,7 +395,12 @@ Word16 ITF_Detect_fx(
            L_tmp = L_shl(L_tmp, sub(shift, tmp)); /* shift L_tmp to that exponent */

            /* calc factor (with 2 bits headroom for sum of 3 subdivisions) */
            facs[iSubdivisions] = div_s(0x2000, round_fx(L_tmp)); /* L_tmp is >= 0x2000000 */ move16();
#ifdef BASOP_NOGLOB
            facs[iSubdivisions] = div_s( 0x2000, round_fx_sat( L_tmp ) ); /* L_tmp is >= 0x2000000 */
#else
            facs[iSubdivisions] = div_s( 0x2000, round_fx( L_tmp ) ); /* L_tmp is >= 0x2000000 */
#endif
            move16();
        }

    }
+5 −1
Original line number Diff line number Diff line
@@ -694,7 +694,11 @@ void preecho_sb_fx(
                {

                    tmp_fx1 = shr(*ptr_fx, qtmp); /* q-1, to have same shift as es_mdct_.. */
#ifdef BASOP_NOGLOB
                    tmp_fxL1 = L_mac0_sat( tmp_fxL1, tmp_fx1, tmp_fx1 );
#else
                    tmp_fxL1 = L_mac0( tmp_fxL1, tmp_fx1, tmp_fx1 );
#endif
                    ptr_fx++;
                }
                if( GT_32(tmp_fxL1, max_plus_es_mdct_fx))
+5 −1
Original line number Diff line number Diff line
@@ -664,7 +664,11 @@ void gain_dec_lbr_fx(
        move16();

        L_tmp = L_mult(cdbk_fx[add(shl(index,1),1)] , gcode0_fx);  /* Q9*Q0 -> Q10 */
#ifdef BASOP_NOGLOB
        *gain_code_fx = L_shl_sat( L_tmp, add( exp_gcode0, 6 ) );
#else
        *gain_code_fx = L_shl( L_tmp, add( exp_gcode0, 6 ) );
#endif
        move16();  /* Q10 -> Q16*/

        gc_mem[1] = *gain_code_fx;
+5 −2
Original line number Diff line number Diff line
@@ -2872,8 +2872,11 @@ void swb_tbe_dec_fx(
            L_tmp1 = Mult_32_16(ener_tmp[i], GainShape_tmp[i]); /* (2*Q_bwe_exc) */
            L_tmp2 = Mult_32_16(hBWE_TD->prev_ener_fx, hBWE_TD->prev_GainShape_fx); /* (2*st_fx->prev_ener_fx_Q) */
            tmp = sub(shl(Q_bwe_exc, 1), shl(st_fx->prev_ener_fx_Q, 1));
#ifdef BASOP_NOGLOB
            L_tmp2 = L_shl_sat( L_tmp2, tmp ); /* new Q = (2*Q_bwe_exc) */
#else
            L_tmp2 = L_shl( L_tmp2, tmp ); /* new Q = (2*Q_bwe_exc) */

#endif
            IF (GT_32(L_tmp1,L_tmp2))
            {
                /*GainShape_tmp_fx[i] = 0.5f*(L_tmp2/ener_tmp_fx[i] + GainShape_tmp_fx[i]);*/