Loading lib_com/codec_tcx_common_fx.c +2 −0 Original line number Diff line number Diff line Loading @@ -61,9 +61,11 @@ void tcxFormantEnhancement( Word16 i, j, k, l, n; Word16 fac, fac0, fac1, fac_e, d, tmp; Word16 xn_buf_e, xn_one, m, e; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif k = shr( L_frame, 6 ); /* FDNS_NPTS = 64 */ Loading lib_com/swb_tbe_com_fx.c +58 −10 Original line number Diff line number Diff line Loading @@ -996,7 +996,9 @@ static void filt_mu_fx( Word16 mu, ga, temp; const Word16 *ptrs; Word16 tmp, exp; #ifndef ISSUE_1796_replace_shl_o Flag Overflow = 0; #endif move32(); Loading Loading @@ -1038,7 +1040,11 @@ static void filt_mu_fx( { temp = mult_r( mu, ( *ptrs++ ) ); temp = add_sat( temp, *ptrs ); /*Q12 */ #ifdef ISSUE_1796_replace_shl_o sig_out[n] = shl_sat( mult_r( ga, temp ), 1 ); #else sig_out[n] = shl_o( mult_r( ga, temp ), 1, &Overflow ); #endif move16(); /*Q12 */ } Loading Loading @@ -1537,7 +1543,11 @@ void GenShapedWBExcitation_ivas_fx( n1 = norm_s( max_val ); FOR( i = 0; i < L_FRAME16k / 4; i++ ) { #ifdef ISSUE_1796_replace_shl_o excTmp2_frac[i] = shl_sat( excTmp2[i], n1 ); // Q_bwe_exc + n1 #else excTmp2_frac[i] = shl_o( excTmp2[i], n1, &Overflow ); // Q_bwe_exc + n1 #endif move16(); /* Q14 */ } n1 = sub( sub( 14, n1 ), Q_bwe_exc ); Loading Loading @@ -1620,7 +1630,11 @@ void GenShapedWBExcitation_ivas_fx( { /*tmp_vfac = 2*voice_factors[i]; tmp_vfac = min(1, tmp_vfac);*/ #ifdef ISSUE_1796_replace_shl_o tmp_vfac = shl_sat( voice_factors[i], 1 ); #else tmp_vfac = shl_o( voice_factors[i], 1, &Overflow ); #endif } ELSE { Loading Loading @@ -1789,7 +1803,11 @@ void GenShapedWBExcitation_fx( n1 = norm_s( max_val ); FOR( i = 0; i < L_FRAME16k / 4; i++ ) { #ifdef ISSUE_1796_replace_shl_o excTmp2_frac[i] = shl_sat( excTmp2[i], n1 ); #else excTmp2_frac[i] = shl_o( excTmp2[i], n1, &Overflow ); #endif move16(); /* Q14 */ } n1 = sub( sub( 14, n1 ), Q_bwe_exc ); Loading Loading @@ -1874,7 +1892,11 @@ void GenShapedWBExcitation_fx( { /*tmp_vfac = 2*voice_factors[i]; tmp_vfac = min(1, tmp_vfac);*/ #ifdef ISSUE_1796_replace_shl_o tmp_vfac = shl_sat( voice_factors[i], 1 ); #else tmp_vfac = shl_o( voice_factors[i], 1, &Overflow ); #endif } ELSE { Loading Loading @@ -5776,7 +5798,11 @@ void non_linearity_fx( frac = L_Extract_lc( L_tmp, &exp ); /* Extract exponent of L_tmp */ tmp = extract_l( Pow2( 14, frac ) ); #ifdef ISSUE_1796_replace_shl_o scale_step = shl_sat( tmp, exp ); /* Q14 */ #else scale_step = shl_o( tmp, exp, &Overflow ); /* Q14 */ #endif } } Loading Loading @@ -5854,7 +5880,11 @@ void non_linearity_fx( frac = L_Extract_lc( L_tmp, &exp ); /* Extract exponent of L_tmp */ tmp = extract_l( Pow2( 14, frac ) ); #ifdef ISSUE_1796_replace_shl_o scale_step = shl_sat( tmp, exp ); /*Q14 */ #else scale_step = shl_o( tmp, exp, &Overflow ); /*Q14 */ #endif } } Loading Loading @@ -6028,7 +6058,11 @@ void non_linearity_ivas_fx( frac = L_Extract_lc( L_tmp, &exp ); /* Extract exponent of L_tmp */ tmp = extract_l( Pow2( 14, frac ) ); #ifdef ISSUE_1796_replace_shl_o scale_step = shl_sat( tmp, exp ); /* Q14 */ #else scale_step = shl_o( tmp, exp, &Overflow ); /* Q14 */ #endif } } Loading Loading @@ -6106,7 +6140,11 @@ void non_linearity_ivas_fx( frac = L_Extract_lc( L_tmp, &exp ); /* Extract exponent of L_tmp */ tmp = extract_l( Pow2( 14, frac ) ); #ifdef ISSUE_1796_replace_shl_o scale_step = shl_sat( tmp, exp ); /*Q14 */ #else scale_step = shl_o( tmp, exp, &Overflow ); /*Q14 */ #endif } } Loading Loading @@ -7043,7 +7081,11 @@ void prep_tbe_exc_fx( tmp = MAX_16; move16(); #ifdef ISSUE_1796_replace_shl_o pitch = shl_sat( add( shl_sat( T0, 2 ), T0_frac ), 5 ); /* Q7 */ #else pitch = shl_o( add( shl_o( T0, 2, &Overflow ), T0_frac ), 5, &Overflow ); /* Q7 */ #endif test(); test(); Loading Loading @@ -7156,8 +7198,10 @@ Word16 swb_formant_fac_fx( { Word16 formant_fac; Word16 tmp; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif #endif /* Smoothen tilt value */ Loading Loading @@ -7185,7 +7229,11 @@ Word16 swb_formant_fac_fx( /* formant_fac = 1.0f - 0.5f*formant_fac */ tmp = mult_r( 16384, formant_fac ); /* 0.5 in Q15 */ #ifdef ISSUE_1796_replace_shl_o formant_fac = shl_sat( sub( 4096 /* 1 in Q12 */, tmp ), 3 ); #else formant_fac = shl_o( sub( 4096 /* 1 in Q12 */, tmp ), 3, &Overflow ); #endif return formant_fac; /*Q15 */ } Loading lib_com/tools_fx.c +34 −6 Original line number Diff line number Diff line Loading @@ -337,7 +337,11 @@ Word16 usquant_fx( /* o: index of the winning codeword */ exp = norm_s( delta ); tmp = div_s( shl( 1, sub( 14, exp ) ), delta ); /*Q(29-exp-(Qx-1))->Q(30-exp-Qx) */ L_tmp = L_mult( sub_o( x, qlow, &Overflow ), tmp ); /*Q(31-exp) */ #ifdef ISSUE_1796_replace_shl_o idx = extract_l( L_shr_r( L_add( L_tmp, shl_sat( 1, sub( 30, exp ) ) ), sub( 31, exp ) ) ); /*Q0 */ #else idx = extract_l( L_shr_r( L_add( L_tmp, shl_o( 1, sub( 30, exp ), &Overflow ) ), sub( 31, exp ) ) ); /*Q0 */ #endif idx = s_min( idx, sub( cbsize, 1 ) ); idx = s_max( idx, 0 ); Loading Loading @@ -700,9 +704,11 @@ void Copy_Scale_sig( { Word16 i; Word16 tmp; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif IF( exp0 == 0 ) { Loading @@ -725,7 +731,11 @@ void Copy_Scale_sig( } FOR( i = 0; i < lg; i++ ) { #ifdef ISSUE_1796_replace_shl_o y[i] = shl_sat( x[i], exp0 ); #else y[i] = shl_o( x[i], exp0, &Overflow ); #endif move16(); /* saturation can occur here */ } } Loading @@ -743,10 +753,12 @@ void Copy_Scale_sig_16_32_DEPREC( { Word16 i; Word16 tmp; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif IF( exp0 == 0 ) Loading @@ -763,7 +775,11 @@ void Copy_Scale_sig_16_32_DEPREC( /*Should not happen */ FOR( i = 0; i < lg; i++ ) { #ifdef ISSUE_1796_replace_shl_o y[i] = L_deposit_l( shl_sat( x[i], exp0 ) ); #else y[i] = L_deposit_l( shl_o( x[i], exp0, &Overflow ) ); #endif move32(); } return; Loading @@ -776,7 +792,11 @@ void Copy_Scale_sig_16_32_DEPREC( #else assert( exp0 < 16 ); #endif #ifdef ISSUE_1796_replace_shl_o tmp = shl_sat( 1, exp0 ); #else tmp = shl_o( 1, exp0, &Overflow ); #endif FOR( i = 0; i < lg; i++ ) { y[i] = L_mult0( x[i], tmp ); Loading Loading @@ -813,7 +833,11 @@ void Copy_Scale_sig_16_32_no_sat( /*Should not happen */ FOR( i = 0; i < lg; i++ ) { #ifdef ISSUE_1796_replace_shl_o y[i] = L_deposit_l( shl_sat( x[i], exp0 ) ); #else y[i] = L_deposit_l( shl_o( x[i], exp0, &Overflow ) ); #endif move32(); } return; Loading Loading @@ -2468,7 +2492,11 @@ Word32 root_a_over_b_fx( exp_den = sub( sub( 30, exp_den ), Q_a ); scale = shr( sub( den, num ), 15 ); #ifdef ISSUE_1796_replace_shl_o num = shl_sat( num, scale ); #else num = shl_o( num, scale, &Overflow ); #endif exp_num = sub( exp_num, scale ); tmp = div_s( num, den ); Loading lib_com/wi_fx.c +24 −0 Original line number Diff line number Diff line Loading @@ -359,7 +359,11 @@ static Word16 DTFS_alignment_weight_fx( } temp1 = round_fx_o( (Word32) L_shl_o( corr_fx, Qcorr, &Overflow ), &Overflow ); /* Q(Qcorr-16) */ #ifdef ISSUE_1796_replace_shl_o wcorr_fx = L_mult_o( temp1, shl_sat( temp, 2 ), &Overflow ); /* Q(Qcorr-16+13+2+1)=Q(Qcorr) */ #else wcorr_fx = L_mult_o( temp1, shl_o( temp, 2, &Overflow ), &Overflow ); /* Q(Qcorr-16+13+2+1)=Q(Qcorr) */ #endif IF( GE_16( Qmaxcorr, Qcorr ) ) { diff_corr = L_sub_o( wcorr_fx, L_shl_o( maxcorr_fx, sub( Qcorr, Qmaxcorr ), &Overflow ), &Overflow ); /* Qcorr */ Loading Loading @@ -1266,9 +1270,17 @@ void DTFS_zeroFilter_fx( /* bring to the same Q */ FOR( k = 0; k <= HalfLag; k++ ) { #ifdef ISSUE_1796_replace_shl_o X_fx->a_fx[k] = shl_sat( X_fx->a_fx[k], sub( Qmin, Qab[k] ) ); #else X_fx->a_fx[k] = shl_o( X_fx->a_fx[k], sub( Qmin, Qab[k] ), &Overflow ); #endif move16(); /* Q(Q+Qab[k]+Qmin-Qab[k]=Q(Q+Qmin) */ #ifdef ISSUE_1796_replace_shl_o X_fx->b_fx[k] = shl_sat( X_fx->b_fx[k], sub( Qmin, Qab[k] ) ); #else X_fx->b_fx[k] = shl_o( X_fx->b_fx[k], sub( Qmin, Qab[k] ), &Overflow ); #endif move16(); /* Q(Q+Qmin) */ } Loading Loading @@ -2105,7 +2117,11 @@ static void cubicPhase_fx( fracb = negate( fracb ); } scale = shr( sub( fracb, fraca ), 15 ); #ifdef ISSUE_1796_replace_shl_o fraca = shl_sat( fraca, scale ); #else fraca = shl_o( fraca, scale, &Overflow ); #endif expa = sub( expa, scale ); tmp = div_s( fraca, fracb ); /* 15-exp */ Loading Loading @@ -3491,7 +3507,11 @@ void DTFS_peaktoaverage_fx( DTFS_STRUCTURE X_fx, Word32 *pos_fx, Word16 *Qpos, W scale = shr( sub( fraca, fracb ), 15 ); #ifdef ISSUE_1796_replace_shl_o fracb = shl_sat( fracb, scale ); #else fracb = shl_o( fracb, scale, &Overflow ); #endif expb = sub( expb, scale ); tmp = div_s( fracb, fraca ); Loading Loading @@ -3525,7 +3545,11 @@ void DTFS_peaktoaverage_fx( DTFS_STRUCTURE X_fx, Word32 *pos_fx, Word16 *Qpos, W scale = shr( sub( fraca, fracb ), 15 ); #ifdef ISSUE_1796_replace_shl_o fracb = shl_sat( fracb, scale ); #else fracb = shl_o( fracb, scale, &Overflow ); #endif expb = sub( expb, scale ); tmp = div_s( fracb, fraca ); Loading lib_com/window_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -63,7 +63,11 @@ void ham_cos_window( FOR( i = n1; i < n1 + n2; i++ ) { /* fh_f[i] = (Float32)cos(cc); */ #ifdef ISSUE_1796_replace_shl_o fh[i] = shl_sat( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1 ); /*0Q15*/ #else fh[i] = shl_o( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1, &Overflow ); /*0Q15*/ #endif move16(); cc = L_add( cc, cte ); } Loading Loading
lib_com/codec_tcx_common_fx.c +2 −0 Original line number Diff line number Diff line Loading @@ -61,9 +61,11 @@ void tcxFormantEnhancement( Word16 i, j, k, l, n; Word16 fac, fac0, fac1, fac_e, d, tmp; Word16 xn_buf_e, xn_one, m, e; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif k = shr( L_frame, 6 ); /* FDNS_NPTS = 64 */ Loading
lib_com/swb_tbe_com_fx.c +58 −10 Original line number Diff line number Diff line Loading @@ -996,7 +996,9 @@ static void filt_mu_fx( Word16 mu, ga, temp; const Word16 *ptrs; Word16 tmp, exp; #ifndef ISSUE_1796_replace_shl_o Flag Overflow = 0; #endif move32(); Loading Loading @@ -1038,7 +1040,11 @@ static void filt_mu_fx( { temp = mult_r( mu, ( *ptrs++ ) ); temp = add_sat( temp, *ptrs ); /*Q12 */ #ifdef ISSUE_1796_replace_shl_o sig_out[n] = shl_sat( mult_r( ga, temp ), 1 ); #else sig_out[n] = shl_o( mult_r( ga, temp ), 1, &Overflow ); #endif move16(); /*Q12 */ } Loading Loading @@ -1537,7 +1543,11 @@ void GenShapedWBExcitation_ivas_fx( n1 = norm_s( max_val ); FOR( i = 0; i < L_FRAME16k / 4; i++ ) { #ifdef ISSUE_1796_replace_shl_o excTmp2_frac[i] = shl_sat( excTmp2[i], n1 ); // Q_bwe_exc + n1 #else excTmp2_frac[i] = shl_o( excTmp2[i], n1, &Overflow ); // Q_bwe_exc + n1 #endif move16(); /* Q14 */ } n1 = sub( sub( 14, n1 ), Q_bwe_exc ); Loading Loading @@ -1620,7 +1630,11 @@ void GenShapedWBExcitation_ivas_fx( { /*tmp_vfac = 2*voice_factors[i]; tmp_vfac = min(1, tmp_vfac);*/ #ifdef ISSUE_1796_replace_shl_o tmp_vfac = shl_sat( voice_factors[i], 1 ); #else tmp_vfac = shl_o( voice_factors[i], 1, &Overflow ); #endif } ELSE { Loading Loading @@ -1789,7 +1803,11 @@ void GenShapedWBExcitation_fx( n1 = norm_s( max_val ); FOR( i = 0; i < L_FRAME16k / 4; i++ ) { #ifdef ISSUE_1796_replace_shl_o excTmp2_frac[i] = shl_sat( excTmp2[i], n1 ); #else excTmp2_frac[i] = shl_o( excTmp2[i], n1, &Overflow ); #endif move16(); /* Q14 */ } n1 = sub( sub( 14, n1 ), Q_bwe_exc ); Loading Loading @@ -1874,7 +1892,11 @@ void GenShapedWBExcitation_fx( { /*tmp_vfac = 2*voice_factors[i]; tmp_vfac = min(1, tmp_vfac);*/ #ifdef ISSUE_1796_replace_shl_o tmp_vfac = shl_sat( voice_factors[i], 1 ); #else tmp_vfac = shl_o( voice_factors[i], 1, &Overflow ); #endif } ELSE { Loading Loading @@ -5776,7 +5798,11 @@ void non_linearity_fx( frac = L_Extract_lc( L_tmp, &exp ); /* Extract exponent of L_tmp */ tmp = extract_l( Pow2( 14, frac ) ); #ifdef ISSUE_1796_replace_shl_o scale_step = shl_sat( tmp, exp ); /* Q14 */ #else scale_step = shl_o( tmp, exp, &Overflow ); /* Q14 */ #endif } } Loading Loading @@ -5854,7 +5880,11 @@ void non_linearity_fx( frac = L_Extract_lc( L_tmp, &exp ); /* Extract exponent of L_tmp */ tmp = extract_l( Pow2( 14, frac ) ); #ifdef ISSUE_1796_replace_shl_o scale_step = shl_sat( tmp, exp ); /*Q14 */ #else scale_step = shl_o( tmp, exp, &Overflow ); /*Q14 */ #endif } } Loading Loading @@ -6028,7 +6058,11 @@ void non_linearity_ivas_fx( frac = L_Extract_lc( L_tmp, &exp ); /* Extract exponent of L_tmp */ tmp = extract_l( Pow2( 14, frac ) ); #ifdef ISSUE_1796_replace_shl_o scale_step = shl_sat( tmp, exp ); /* Q14 */ #else scale_step = shl_o( tmp, exp, &Overflow ); /* Q14 */ #endif } } Loading Loading @@ -6106,7 +6140,11 @@ void non_linearity_ivas_fx( frac = L_Extract_lc( L_tmp, &exp ); /* Extract exponent of L_tmp */ tmp = extract_l( Pow2( 14, frac ) ); #ifdef ISSUE_1796_replace_shl_o scale_step = shl_sat( tmp, exp ); /*Q14 */ #else scale_step = shl_o( tmp, exp, &Overflow ); /*Q14 */ #endif } } Loading Loading @@ -7043,7 +7081,11 @@ void prep_tbe_exc_fx( tmp = MAX_16; move16(); #ifdef ISSUE_1796_replace_shl_o pitch = shl_sat( add( shl_sat( T0, 2 ), T0_frac ), 5 ); /* Q7 */ #else pitch = shl_o( add( shl_o( T0, 2, &Overflow ), T0_frac ), 5, &Overflow ); /* Q7 */ #endif test(); test(); Loading Loading @@ -7156,8 +7198,10 @@ Word16 swb_formant_fac_fx( { Word16 formant_fac; Word16 tmp; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif #endif /* Smoothen tilt value */ Loading Loading @@ -7185,7 +7229,11 @@ Word16 swb_formant_fac_fx( /* formant_fac = 1.0f - 0.5f*formant_fac */ tmp = mult_r( 16384, formant_fac ); /* 0.5 in Q15 */ #ifdef ISSUE_1796_replace_shl_o formant_fac = shl_sat( sub( 4096 /* 1 in Q12 */, tmp ), 3 ); #else formant_fac = shl_o( sub( 4096 /* 1 in Q12 */, tmp ), 3, &Overflow ); #endif return formant_fac; /*Q15 */ } Loading
lib_com/tools_fx.c +34 −6 Original line number Diff line number Diff line Loading @@ -337,7 +337,11 @@ Word16 usquant_fx( /* o: index of the winning codeword */ exp = norm_s( delta ); tmp = div_s( shl( 1, sub( 14, exp ) ), delta ); /*Q(29-exp-(Qx-1))->Q(30-exp-Qx) */ L_tmp = L_mult( sub_o( x, qlow, &Overflow ), tmp ); /*Q(31-exp) */ #ifdef ISSUE_1796_replace_shl_o idx = extract_l( L_shr_r( L_add( L_tmp, shl_sat( 1, sub( 30, exp ) ) ), sub( 31, exp ) ) ); /*Q0 */ #else idx = extract_l( L_shr_r( L_add( L_tmp, shl_o( 1, sub( 30, exp ), &Overflow ) ), sub( 31, exp ) ) ); /*Q0 */ #endif idx = s_min( idx, sub( cbsize, 1 ) ); idx = s_max( idx, 0 ); Loading Loading @@ -700,9 +704,11 @@ void Copy_Scale_sig( { Word16 i; Word16 tmp; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif IF( exp0 == 0 ) { Loading @@ -725,7 +731,11 @@ void Copy_Scale_sig( } FOR( i = 0; i < lg; i++ ) { #ifdef ISSUE_1796_replace_shl_o y[i] = shl_sat( x[i], exp0 ); #else y[i] = shl_o( x[i], exp0, &Overflow ); #endif move16(); /* saturation can occur here */ } } Loading @@ -743,10 +753,12 @@ void Copy_Scale_sig_16_32_DEPREC( { Word16 i; Word16 tmp; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif IF( exp0 == 0 ) Loading @@ -763,7 +775,11 @@ void Copy_Scale_sig_16_32_DEPREC( /*Should not happen */ FOR( i = 0; i < lg; i++ ) { #ifdef ISSUE_1796_replace_shl_o y[i] = L_deposit_l( shl_sat( x[i], exp0 ) ); #else y[i] = L_deposit_l( shl_o( x[i], exp0, &Overflow ) ); #endif move32(); } return; Loading @@ -776,7 +792,11 @@ void Copy_Scale_sig_16_32_DEPREC( #else assert( exp0 < 16 ); #endif #ifdef ISSUE_1796_replace_shl_o tmp = shl_sat( 1, exp0 ); #else tmp = shl_o( 1, exp0, &Overflow ); #endif FOR( i = 0; i < lg; i++ ) { y[i] = L_mult0( x[i], tmp ); Loading Loading @@ -813,7 +833,11 @@ void Copy_Scale_sig_16_32_no_sat( /*Should not happen */ FOR( i = 0; i < lg; i++ ) { #ifdef ISSUE_1796_replace_shl_o y[i] = L_deposit_l( shl_sat( x[i], exp0 ) ); #else y[i] = L_deposit_l( shl_o( x[i], exp0, &Overflow ) ); #endif move32(); } return; Loading Loading @@ -2468,7 +2492,11 @@ Word32 root_a_over_b_fx( exp_den = sub( sub( 30, exp_den ), Q_a ); scale = shr( sub( den, num ), 15 ); #ifdef ISSUE_1796_replace_shl_o num = shl_sat( num, scale ); #else num = shl_o( num, scale, &Overflow ); #endif exp_num = sub( exp_num, scale ); tmp = div_s( num, den ); Loading
lib_com/wi_fx.c +24 −0 Original line number Diff line number Diff line Loading @@ -359,7 +359,11 @@ static Word16 DTFS_alignment_weight_fx( } temp1 = round_fx_o( (Word32) L_shl_o( corr_fx, Qcorr, &Overflow ), &Overflow ); /* Q(Qcorr-16) */ #ifdef ISSUE_1796_replace_shl_o wcorr_fx = L_mult_o( temp1, shl_sat( temp, 2 ), &Overflow ); /* Q(Qcorr-16+13+2+1)=Q(Qcorr) */ #else wcorr_fx = L_mult_o( temp1, shl_o( temp, 2, &Overflow ), &Overflow ); /* Q(Qcorr-16+13+2+1)=Q(Qcorr) */ #endif IF( GE_16( Qmaxcorr, Qcorr ) ) { diff_corr = L_sub_o( wcorr_fx, L_shl_o( maxcorr_fx, sub( Qcorr, Qmaxcorr ), &Overflow ), &Overflow ); /* Qcorr */ Loading Loading @@ -1266,9 +1270,17 @@ void DTFS_zeroFilter_fx( /* bring to the same Q */ FOR( k = 0; k <= HalfLag; k++ ) { #ifdef ISSUE_1796_replace_shl_o X_fx->a_fx[k] = shl_sat( X_fx->a_fx[k], sub( Qmin, Qab[k] ) ); #else X_fx->a_fx[k] = shl_o( X_fx->a_fx[k], sub( Qmin, Qab[k] ), &Overflow ); #endif move16(); /* Q(Q+Qab[k]+Qmin-Qab[k]=Q(Q+Qmin) */ #ifdef ISSUE_1796_replace_shl_o X_fx->b_fx[k] = shl_sat( X_fx->b_fx[k], sub( Qmin, Qab[k] ) ); #else X_fx->b_fx[k] = shl_o( X_fx->b_fx[k], sub( Qmin, Qab[k] ), &Overflow ); #endif move16(); /* Q(Q+Qmin) */ } Loading Loading @@ -2105,7 +2117,11 @@ static void cubicPhase_fx( fracb = negate( fracb ); } scale = shr( sub( fracb, fraca ), 15 ); #ifdef ISSUE_1796_replace_shl_o fraca = shl_sat( fraca, scale ); #else fraca = shl_o( fraca, scale, &Overflow ); #endif expa = sub( expa, scale ); tmp = div_s( fraca, fracb ); /* 15-exp */ Loading Loading @@ -3491,7 +3507,11 @@ void DTFS_peaktoaverage_fx( DTFS_STRUCTURE X_fx, Word32 *pos_fx, Word16 *Qpos, W scale = shr( sub( fraca, fracb ), 15 ); #ifdef ISSUE_1796_replace_shl_o fracb = shl_sat( fracb, scale ); #else fracb = shl_o( fracb, scale, &Overflow ); #endif expb = sub( expb, scale ); tmp = div_s( fracb, fraca ); Loading Loading @@ -3525,7 +3545,11 @@ void DTFS_peaktoaverage_fx( DTFS_STRUCTURE X_fx, Word32 *pos_fx, Word16 *Qpos, W scale = shr( sub( fraca, fracb ), 15 ); #ifdef ISSUE_1796_replace_shl_o fracb = shl_sat( fracb, scale ); #else fracb = shl_o( fracb, scale, &Overflow ); #endif expb = sub( expb, scale ); tmp = div_s( fracb, fraca ); Loading
lib_com/window_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -63,7 +63,11 @@ void ham_cos_window( FOR( i = n1; i < n1 + n2; i++ ) { /* fh_f[i] = (Float32)cos(cc); */ #ifdef ISSUE_1796_replace_shl_o fh[i] = shl_sat( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1 ); /*0Q15*/ #else fh[i] = shl_o( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1, &Overflow ); /*0Q15*/ #endif move16(); cc = L_add( cc, cte ); } Loading