Commit ff8d86db authored by vaillancour's avatar vaillancour
Browse files

Fix assert for hi-level input

parent 19d7ac40
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -249,8 +249,11 @@ void CNG_exc_fx(
        exp = norm_l(*Enew);
        L_tmp = L_shl(*Enew,exp); /* Q(exp+6) */
        L_tmp = Mult_32_16(L_tmp,shl(L_frame,5)); /* Q(exp+6+5-15=exp-4) */
#ifdef BASOP_NOGLOB
        L_tmp = L_shr_sat( L_tmp, sub( exp, 10 ) ); /* Q6 */
#else
        L_tmp = L_shr( L_tmp, sub( exp, 10 ) ); /* Q6 */

#endif
        exp = norm_l(L_tmp);
        fra = Log2_norm_lc(L_shl(L_tmp,exp));
        exp = sub(sub(30,exp),6);
+6 −1
Original line number Diff line number Diff line
@@ -452,7 +452,7 @@ void CNG_enc_fx(
            IF(NE_16(lp_ener_thr_scale, 8))
            {
                L_tmp1 = L_add(L_tmp1, L_shr(hTdCngEnc->lp_ener_fx, 8));
            }
            } /*fenew = dotp( fexc, fexc, pit_max )/pit_max;*/
            L_tmp1 = L_sub(L_tmp1, hTdCngEnc->lp_ener_fx);
#else
            L_tmp1 = L_shr(hTdCngEnc->ho_ener_hist_fx[hTdCngEnc->ho_hist_ptr],2);
@@ -989,7 +989,12 @@ void CNG_enc_fx(
            exp = norm_l(hTdCngEnc->Enew_fx);
            L_tmp = L_shl(hTdCngEnc->Enew_fx,exp); /*Q(exp+6) */
            L_tmp = Mult_32_16(L_tmp,shl(st_fx->L_frame_fx,5));/* Q(exp+6+5-15=exp-4) */

#ifdef BASOP_NOGLOB  
            L_tmp = L_shr_sat(L_tmp,sub(exp,10)); /* Q6 */
#else
            L_tmp = L_shr(L_tmp,sub(exp,10)); /* Q6 */
#endif

            exp = norm_l(L_tmp);
            fra = Log2_norm_lc(L_shl(L_tmp,exp));
+4 −0
Original line number Diff line number Diff line
@@ -43,7 +43,11 @@ Word16 correlation_shift_fx( /* o : noise dependent voicing correction Q

        e_Noise = sub(e_Noise, 14);               /* Retreive exponent of wtmp */
        Ltmp = Mpy_32_16(8, 837, wtmp);           /* 2.4492e-4(Q31) * exp(0.1596*totalNoise) */
#ifdef BASOP_NOGLOB
        Ltmp = L_shl_sat(Ltmp,add(e_Noise, 15));      /* Result in Q31 */
#else
        Ltmp = L_shl(Ltmp,add(e_Noise, 15));      /* Result in Q31 */
#endif
        corr_shift_fx = round_fx(L_sub(Ltmp, 47244640));  /* Represents corr_shift in Q15 */
    }
    corr_shift_fx = s_min(corr_shift_fx,16384); /* limit to 0.5 */
+8 −0
Original line number Diff line number Diff line
@@ -341,7 +341,11 @@ Word16 detect_transient_fx(
		{
			/*blk++;	 */
			blk = add(blk, 1);
#ifdef BASOP_NOGLOB    
            E_low_fx = L_add_sat(E_low_fx, Energy_in_fx[i]);
#else
			E_low_fx = L_add(E_low_fx, Energy_in_fx[i]);
#endif
		}

		exp = norm_s(blk);
@@ -357,7 +361,11 @@ Word16 detect_transient_fx(
		{
			/*blk++; */
			blk = add(blk, 1);
#ifdef BASOP_NOGLOB
            E_high_fx = L_add_sat( E_high_fx, Energy_in_fx[i] );
#else
			E_high_fx = L_add(E_high_fx, Energy_in_fx[i]);
#endif
		}

		exp = norm_s(blk);
+4 −0
Original line number Diff line number Diff line
@@ -241,7 +241,11 @@ void find_tilt_fx(
            IF (EQ_32(Ltmp, MAX_32))     /* if Overflow: Compute with less precision */
            {
                Ltmp = Mult_32_16(ee[i], 24576);               /* 6/8 */
#ifdef BASOP_NOGLOB
                ee[i] = L_shl_sat( Ltmp, 3 );
#else
                ee[i] = L_shl(Ltmp, 3);
#endif
                move32();  /* x8  */
            }
            ELSE
Loading