Commit 0587f9d3 authored by vaillancour's avatar vaillancour
Browse files

Correction on compl saturations for 26.444

parent e30c5310
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -248,11 +248,13 @@ void enhancer_fx(
            /* pt_exc2[i] += code[i] - tmp * code[i-1] - tmp * code[i+1] */
            L_tmp = L_msu(-32768, code[i], -32768);
            L_tmp = L_msu(L_tmp, code[i + 1], tmp);
            tmp16 = msu_r(L_tmp, code[i - 1], tmp);
            L_tmp = L_shl(L_mult(gain_code_hi, tmp16), sc);
#ifdef BASOP_NOGLOB
            tmp16 = msu_r_sat( L_tmp, code[i - 1], tmp );
            L_tmp = L_shl_sat( L_mult( gain_code_hi, tmp16 ), sc );
            pt_exc2[i] = msu_r_sat( L_tmp, -32768, pt_exc2[i] );
#else
            tmp16 = msu_r( L_tmp, code[i - 1], tmp );
            L_tmp = L_shl( L_mult( gain_code_hi, tmp16 ), sc );
            pt_exc2[i] = msu_r( L_tmp, -32768, pt_exc2[i] );
#endif
            move16(); /* in Q_exc */
+5 −1
Original line number Diff line number Diff line
@@ -713,7 +713,11 @@ Word32 calc_tilt_bwe_fx( /* o : Tilt in Q24 */

	/* *tilt_flt = (float)(r1/sqrt(r0)); */
	exp2 = norm_l(L_ener);
#ifdef BASOP_NOGLOB
    L_temp = Mult_32_16( L_temp, round_fx_sat( L_shl_sat( L_ener, exp2 ) ) );
#else
    L_temp = Mult_32_16( L_temp, round_fx( L_shl( L_ener, exp2 ) ) );
#endif
	exp2 = sub(exp2, tmp1);
	exp2 = add(exp2, exp_sp);

+12 −2
Original line number Diff line number Diff line
@@ -2500,16 +2500,26 @@ void Copy_Scale_sig32_16(
    {
        FOR (i = 0; i < len; i++ )
        {
#ifdef BASOP_NOGLOB
            *dst++ = round_fx_sat( *src++ );
#else
            *dst++ = round_fx( *src++ );
#endif
        }
        return;
    }

    FOR (i = 0; i < len; i++ )
    {
#ifdef BASOP_NOGLOB
        L_temp = L_shl_sat( *src++, exp0 );

        *dst++ = round_fx_sat(L_temp);
#else
        L_temp = L_shl( *src++, exp0 );

        *dst++ = round_fx(L_temp);
#endif
    }
}

+5 −1
Original line number Diff line number Diff line
@@ -29,7 +29,11 @@ void sinq_fx(
    tmp2 = round_fx(L_tmp); /*Q15 */
    x[1] = sub(tmp1, tmp2);
    move16(); /* sin(x) approximated by (x-x^3/3!); Q15 */
#ifdef BASOP_NOGLOB
    tmp1 = add_sat( shl_sat( tmp, 1 ), phi ); /*Q15 */
#else
    tmp1 = add( shl( tmp, 1 ), phi ); /*Q15 */
#endif
    L_tmp = L_mult(tmp1, tmp1); /*Q31 */
    L_tmp = Mult_32_16(L_tmp, tmp1); /*Q31 */
    L_tmp = Mult_32_16(L_tmp, 5461); /*Q31; division by 6 */
+5 −1
Original line number Diff line number Diff line
@@ -4516,7 +4516,11 @@ void fec_noise_filling_fx(


        tmp_fx = div_s(1, Rnd_N_noise); /*Q15 */
#ifdef BASOP_NOGLOB
        tmp_fx = round_fx_sat( L_shl_sat( L_mult( tmp_fx, 25736 ), 2 ) ); /*Q15 */
#else
        tmp_fx = round_fx( L_shl( L_mult( tmp_fx, 25736 ), 2 ) ); /*Q15 */
#endif
#ifdef IVAS_FEC_ECU_TO_COMPLETE
        if (element_mode == EVS_MONO)
        {
Loading