Loading lib_com/modif_fs_fx.c +13 −5 Original line number Diff line number Diff line Loading @@ -277,7 +277,11 @@ Word16 modify_Fs_ivas_fx( /* o : length of output Q test(); IF( GT_32( fin, 16000 ) && ( EQ_16( lg_out, L_FRAME ) || EQ_16( lg_out, L_FRAME16k ) || EQ_16( lg_out, 512 ) ) ) { #ifdef ISSUE_1796_replace_shl_o num_den = shl_sat( num_den, 1 ); #else num_den = shl_o( num_den, 1, &Overflow ); #endif *Q_new_inp = add( *Q_new_inp, 1 ); move16(); } Loading Loading @@ -557,7 +561,11 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ if ( GT_32( fin, 16000 ) && ( EQ_16( lg_out, L_FRAME ) || EQ_16( lg_out, L_FRAME16k ) || EQ_16( lg_out, 512 ) ) ) { #ifdef BASOP_NOGLOB_DECLARE_LOCAL #ifdef ISSUE_1796_replace_shl_o num_den = shl_sat( num_den, 1 ); #else num_den = shl_o( num_den, 1, &Overflow ); #endif #else num_den = shl( num_den, 1 ); #endif Loading lib_com/residu_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -72,7 +72,11 @@ void Residu3_lc_fx( { q = add( q, shift ); } #ifdef ISSUE_1796_replace_shl_o *y++ = shl_sat( x[0], shift ); #else *y++ = shl_o( x[0], shift, &Overflow ); #endif move16(); FOR( i = 1; i < m; i++ ) Loading lib_com/stat_noise_uv_mod_fx.c +16 −0 Original line number Diff line number Diff line Loading @@ -161,7 +161,11 @@ void stat_noise_uv_mod_fx( FOR( i_subfr = 0; i_subfr < L_FRAME; i_subfr += L_SUBFR ) { exctilt = calc_tilt_fx( &Exc2_local[i_subfr], En_shift, L_SUBFR ); /*Q15 */ #ifdef ISSUE_1796_replace_shl_o exctilt = mult( shl_sat( sub( TILT_COMP_LIM_FX, min_alpha ), 2 ), exctilt ); /*Q15 */ #else exctilt = mult( shl_o( sub( TILT_COMP_LIM_FX, min_alpha ), 2, &Overflow ), exctilt ); /*Q15 */ #endif PREEMPH_FX( &Exc2_local[i_subfr], exctilt, L_SUBFR, exc_pe ); } Loading @@ -186,7 +190,11 @@ void stat_noise_uv_mod_fx( tmp_shift = norm_s( tmp_den ); tmp_den = shl( tmp_den, tmp_shift ); tmp_res = div_s( tmp_nom, tmp_den ); #ifdef ISSUE_1796_replace_shl_o tmp_res = shl_sat( tmp_res, tmp_shift ); #else tmp_res = shl_o( tmp_res, tmp_shift, &Overflow ); #endif alpha = add( 32767, mult( tmp_res, sub( min_alpha, 32767 ) ) ); *act_count = 0; Loading Loading @@ -467,7 +475,11 @@ void stat_noise_uv_mod_ivas_fx( FOR( i_subfr = 0; i_subfr < L_FRAME; i_subfr += L_SUBFR ) { exctilt = calc_tilt_fx( &Exc2_local[i_subfr], En_shift, L_SUBFR ); /*Q15 */ #ifdef ISSUE_1796_replace_shl_o exctilt = mult( shl_sat( sub( TILT_COMP_LIM_FX, min_alpha ), 2 ), exctilt ); /*Q15 */ #else exctilt = mult( shl_o( sub( TILT_COMP_LIM_FX, min_alpha ), 2, &Overflow ), exctilt ); /*Q15 */ #endif PREEMPH_FX( &Exc2_local[i_subfr], exctilt, L_SUBFR, exc_pe ); } Loading @@ -492,7 +504,11 @@ void stat_noise_uv_mod_ivas_fx( tmp_shift = norm_s( tmp_den ); tmp_den = shl( tmp_den, tmp_shift ); tmp_res = div_s( tmp_nom, tmp_den ); #ifdef ISSUE_1796_replace_shl_o tmp_res = shl_sat( tmp_res, tmp_shift ); #else tmp_res = shl_o( tmp_res, tmp_shift, &Overflow ); #endif alpha = add( 32767, mult( tmp_res, sub( min_alpha, 32767 ) ) ); *act_count = 0; Loading lib_com/swb_bwe_com_lr_fx.c +12 −0 Original line number Diff line number Diff line Loading @@ -2338,7 +2338,11 @@ void ton_ene_est_fx( move16(); /* 0.06=15729(Q18) */ exp_shift = sub( 18, QE_r ); #ifdef ISSUE_1796_replace_shl_o E_r_shift_fx = shl_sat( E_r_fx, exp_shift ); #else E_r_shift_fx = shl_o( E_r_fx, exp_shift, &Overflow ); #endif IF( LT_16( E_r_shift_fx, 15729 ) ) /* E_r < 0.06 */ { /* avg_pe[k] = (float) sqrt(pow(2.0f,band_energy[i])/band_width[i]); */ Loading Loading @@ -3246,7 +3250,11 @@ void noiseinj_hf_fx( move32(); /**p_L_En = (float)sqrt(*p_En);*/ sqrt_32n_16_fx( *p_L_En, QbeL, p_sqrt_En_fx, &Qtemp ); #ifdef ISSUE_1796_replace_shl_o *p_sqrt_En_fx = shl_sat( *p_sqrt_En_fx, sub( QsEn, Qtemp ) ); /* -> Q2 */ #else *p_sqrt_En_fx = shl_o( *p_sqrt_En_fx, sub( QsEn, Qtemp ), &Overflow ); /* -> Q2 */ #endif move16(); } p_L_En++; Loading Loading @@ -3316,7 +3324,11 @@ FOR( k = BANDS_fx - NB_SWB_SUBBANDS; k < BANDS_fx; k++ ) /* SQRT Part */ sqrt_32n_16_fx( L_deposit_h( div_fx ), add( Qdiv, 16 ), &ni_scale_fx, &Qtemp ); #ifdef ISSUE_1796_replace_shl_o ni_scale_fx = shl_sat( ni_scale_fx, sub( 14, Qtemp ) ); #else ni_scale_fx = shl_o( ni_scale_fx, sub( 14, Qtemp ), &Overflow ); #endif ni_scale_fx = s_min( 20408, ni_scale_fx ); /* 1.25=20408.0(Q14) */ ni_scale_fx = s_max( 12288, ni_scale_fx ); /* 0.75=12288.0(Q14) */ Loading Loading
lib_com/modif_fs_fx.c +13 −5 Original line number Diff line number Diff line Loading @@ -277,7 +277,11 @@ Word16 modify_Fs_ivas_fx( /* o : length of output Q test(); IF( GT_32( fin, 16000 ) && ( EQ_16( lg_out, L_FRAME ) || EQ_16( lg_out, L_FRAME16k ) || EQ_16( lg_out, 512 ) ) ) { #ifdef ISSUE_1796_replace_shl_o num_den = shl_sat( num_den, 1 ); #else num_den = shl_o( num_den, 1, &Overflow ); #endif *Q_new_inp = add( *Q_new_inp, 1 ); move16(); } Loading Loading @@ -557,7 +561,11 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ if ( GT_32( fin, 16000 ) && ( EQ_16( lg_out, L_FRAME ) || EQ_16( lg_out, L_FRAME16k ) || EQ_16( lg_out, 512 ) ) ) { #ifdef BASOP_NOGLOB_DECLARE_LOCAL #ifdef ISSUE_1796_replace_shl_o num_den = shl_sat( num_den, 1 ); #else num_den = shl_o( num_den, 1, &Overflow ); #endif #else num_den = shl( num_den, 1 ); #endif Loading
lib_com/residu_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -72,7 +72,11 @@ void Residu3_lc_fx( { q = add( q, shift ); } #ifdef ISSUE_1796_replace_shl_o *y++ = shl_sat( x[0], shift ); #else *y++ = shl_o( x[0], shift, &Overflow ); #endif move16(); FOR( i = 1; i < m; i++ ) Loading
lib_com/stat_noise_uv_mod_fx.c +16 −0 Original line number Diff line number Diff line Loading @@ -161,7 +161,11 @@ void stat_noise_uv_mod_fx( FOR( i_subfr = 0; i_subfr < L_FRAME; i_subfr += L_SUBFR ) { exctilt = calc_tilt_fx( &Exc2_local[i_subfr], En_shift, L_SUBFR ); /*Q15 */ #ifdef ISSUE_1796_replace_shl_o exctilt = mult( shl_sat( sub( TILT_COMP_LIM_FX, min_alpha ), 2 ), exctilt ); /*Q15 */ #else exctilt = mult( shl_o( sub( TILT_COMP_LIM_FX, min_alpha ), 2, &Overflow ), exctilt ); /*Q15 */ #endif PREEMPH_FX( &Exc2_local[i_subfr], exctilt, L_SUBFR, exc_pe ); } Loading @@ -186,7 +190,11 @@ void stat_noise_uv_mod_fx( tmp_shift = norm_s( tmp_den ); tmp_den = shl( tmp_den, tmp_shift ); tmp_res = div_s( tmp_nom, tmp_den ); #ifdef ISSUE_1796_replace_shl_o tmp_res = shl_sat( tmp_res, tmp_shift ); #else tmp_res = shl_o( tmp_res, tmp_shift, &Overflow ); #endif alpha = add( 32767, mult( tmp_res, sub( min_alpha, 32767 ) ) ); *act_count = 0; Loading Loading @@ -467,7 +475,11 @@ void stat_noise_uv_mod_ivas_fx( FOR( i_subfr = 0; i_subfr < L_FRAME; i_subfr += L_SUBFR ) { exctilt = calc_tilt_fx( &Exc2_local[i_subfr], En_shift, L_SUBFR ); /*Q15 */ #ifdef ISSUE_1796_replace_shl_o exctilt = mult( shl_sat( sub( TILT_COMP_LIM_FX, min_alpha ), 2 ), exctilt ); /*Q15 */ #else exctilt = mult( shl_o( sub( TILT_COMP_LIM_FX, min_alpha ), 2, &Overflow ), exctilt ); /*Q15 */ #endif PREEMPH_FX( &Exc2_local[i_subfr], exctilt, L_SUBFR, exc_pe ); } Loading @@ -492,7 +504,11 @@ void stat_noise_uv_mod_ivas_fx( tmp_shift = norm_s( tmp_den ); tmp_den = shl( tmp_den, tmp_shift ); tmp_res = div_s( tmp_nom, tmp_den ); #ifdef ISSUE_1796_replace_shl_o tmp_res = shl_sat( tmp_res, tmp_shift ); #else tmp_res = shl_o( tmp_res, tmp_shift, &Overflow ); #endif alpha = add( 32767, mult( tmp_res, sub( min_alpha, 32767 ) ) ); *act_count = 0; Loading
lib_com/swb_bwe_com_lr_fx.c +12 −0 Original line number Diff line number Diff line Loading @@ -2338,7 +2338,11 @@ void ton_ene_est_fx( move16(); /* 0.06=15729(Q18) */ exp_shift = sub( 18, QE_r ); #ifdef ISSUE_1796_replace_shl_o E_r_shift_fx = shl_sat( E_r_fx, exp_shift ); #else E_r_shift_fx = shl_o( E_r_fx, exp_shift, &Overflow ); #endif IF( LT_16( E_r_shift_fx, 15729 ) ) /* E_r < 0.06 */ { /* avg_pe[k] = (float) sqrt(pow(2.0f,band_energy[i])/band_width[i]); */ Loading Loading @@ -3246,7 +3250,11 @@ void noiseinj_hf_fx( move32(); /**p_L_En = (float)sqrt(*p_En);*/ sqrt_32n_16_fx( *p_L_En, QbeL, p_sqrt_En_fx, &Qtemp ); #ifdef ISSUE_1796_replace_shl_o *p_sqrt_En_fx = shl_sat( *p_sqrt_En_fx, sub( QsEn, Qtemp ) ); /* -> Q2 */ #else *p_sqrt_En_fx = shl_o( *p_sqrt_En_fx, sub( QsEn, Qtemp ), &Overflow ); /* -> Q2 */ #endif move16(); } p_L_En++; Loading Loading @@ -3316,7 +3324,11 @@ FOR( k = BANDS_fx - NB_SWB_SUBBANDS; k < BANDS_fx; k++ ) /* SQRT Part */ sqrt_32n_16_fx( L_deposit_h( div_fx ), add( Qdiv, 16 ), &ni_scale_fx, &Qtemp ); #ifdef ISSUE_1796_replace_shl_o ni_scale_fx = shl_sat( ni_scale_fx, sub( 14, Qtemp ) ); #else ni_scale_fx = shl_o( ni_scale_fx, sub( 14, Qtemp ), &Overflow ); #endif ni_scale_fx = s_min( 20408, ni_scale_fx ); /* 1.25=20408.0(Q14) */ ni_scale_fx = s_max( 12288, ni_scale_fx ); /* 0.75=12288.0(Q14) */ Loading