Loading lib_enc/lsf_enc_fx.c +52 −0 Original line number Diff line number Diff line Loading @@ -784,7 +784,11 @@ static Word16 qlsf_Mode_Select_fx( { pred_pow2[i] = shl( pred1[i], cs ); move16(); #ifdef ISSUE_1796_replace_shl_o En = L_mac_o( En, mult( pred_pow2[i], shl_sat( w[i], 2 ) ), pred_pow2[i], &Overflow ); /* 2.56*2.56 at Q-4 */ #else En = L_mac_o( En, mult( pred_pow2[i], shl_o( w[i], 2, &Overflow ) ), pred_pow2[i], &Overflow ); /* 2.56*2.56 at Q-4 */ #endif } cs = shl( cs, 1 ); Loading Loading @@ -2365,8 +2369,10 @@ static Word32 vq_lvq_lsf_enc( Word16 quant[LSFMBEST][M], diff[M], dd[M]; Word16 lat_cv[LSFMBEST][M]; Word16 idx_lead[LSFMBEST][2], idx_scale[LSFMBEST][2]; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif #endif stagesVQ = sub( stages, 1 ); Loading Loading @@ -2418,13 +2424,25 @@ static Word32 vq_lvq_lsf_enc( Vr_subt( cand[i], lsf, diff, M ); FOR( j = 0; j < M; j++ ) { #ifdef ISSUE_1796_replace_shl_o diff[j] = shl_sat( diff[j], 4 ); #else diff[j] = shl_o( diff[j], 4, &Overflow ); #endif move16(); } #ifdef ISSUE_1796_replace_shl_o L_tmp = L_mult( mult( diff[0], shl_sat( w[0], 1 ) ), diff[0] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #else L_tmp = L_mult( mult( diff[0], shl_o( w[0], 1, &Overflow ) ), diff[0] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #endif FOR( j = 1; j < M; j++ ) { #ifdef ISSUE_1796_replace_shl_o L_tmp = L_mac( L_tmp, mult( diff[j], shl_sat( w[j], 1 ) ), diff[j] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #else L_tmp = L_mac( L_tmp, mult( diff[j], shl_o( w[j], 1, &Overflow ) ), diff[j] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #endif } e[i] = L_tmp; /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ move32(); Loading Loading @@ -2471,8 +2489,10 @@ static Word32 vq_lvq_lsf_enc_ivas_fx( Word16 quant[LSFMBEST][M], diff[M], dd[M]; Word16 lat_cv[LSFMBEST][M]; Word16 idx_lead[LSFMBEST][2], idx_scale[LSFMBEST][2]; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif #endif stagesVQ = sub( stages, 1 ); Loading Loading @@ -2541,13 +2561,25 @@ static Word32 vq_lvq_lsf_enc_ivas_fx( Vr_subt( cand[i], lsf, diff, M ); FOR( j = 0; j < M; j++ ) { #ifdef ISSUE_1796_replace_shl_o diff[j] = shl_sat( diff[j], 4 ); #else diff[j] = shl_o( diff[j], 4, &Overflow ); #endif move16(); } #ifdef ISSUE_1796_replace_shl_o L_tmp = L_mult( mult( diff[0], shl_sat( w[0], 1 ) ), diff[0] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #else L_tmp = L_mult( mult( diff[0], shl_o( w[0], 1, &Overflow ) ), diff[0] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #endif FOR( j = 1; j < M; j++ ) { #ifdef ISSUE_1796_replace_shl_o L_tmp = L_mac( L_tmp, mult( diff[j], shl_sat( w[j], 1 ) ), diff[j] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #else L_tmp = L_mac( L_tmp, mult( diff[j], shl_o( w[j], 1, &Overflow ) ), diff[j] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #endif } e[i] = L_tmp; move32(); Loading Loading @@ -3396,7 +3428,11 @@ Word32 qlsf_ARSN_tcvq_Enc_16k_fx( { yy_fx[i] = shl( yy_fx[i], cs ); move16(); #ifdef ISSUE_1796_replace_shl_o temp_l = L_mac_o( temp_l, mult( yy_fx[i], shl_sat( w_fx[i], 2 ) ), yy_fx[i], &Overflow ); #else temp_l = L_mac_o( temp_l, mult( yy_fx[i], shl_o( w_fx[i], 2, &Overflow ) ), yy_fx[i], &Overflow ); #endif } cs = shl( cs, 1 ); temp_l = L_shr( temp_l, cs ); Loading Loading @@ -3600,9 +3636,17 @@ static void lsf_mid_enc_fx( tmp = sub( lsf[j], qlsf[j] ); /* err += wghts[j] * ftemp * ftemp; */ /* tmp is usually very small, we can have some extra precision with very rare saturation */ #ifdef ISSUE_1796_replace_shl_o tmp = shl_sat( tmp, 4 ); #else tmp = shl_o( tmp, 4, &Overflow ); #endif tmp = mult_ro( tmp, tmp, &Overflow ); #ifdef ISSUE_1796_replace_shl_o err = L_mac_o( err, tmp, shl_sat( wghts[j], 2 ), &Overflow ); #else err = L_mac_o( err, tmp, shl_o( wghts[j], 2, &Overflow ), &Overflow ); #endif } /* err = L_shl(err,Wscale); */ err = Mult_32_16( err, LSF_1_OVER_256SQ ); Loading Loading @@ -3786,9 +3830,17 @@ static void lsf_mid_enc_ivas_fx( tmp = sub( lsf[j], qlsf[j] ); /* err += wghts[j] * ftemp * ftemp; */ /* tmp is usually very small, we can have some extra precision with very rare saturation */ #ifdef ISSUE_1796_replace_shl_o tmp = shl_sat( tmp, 4 ); #else tmp = shl_o( tmp, 4, &Overflow ); #endif tmp = mult_ro( tmp, tmp, &Overflow ); #ifdef ISSUE_1796_replace_shl_o err = L_mac_o( err, tmp, shl_sat( wghts[j], 2 ), &Overflow ); #else err = L_mac_o( err, tmp, shl_o( wghts[j], 2, &Overflow ), &Overflow ); #endif } /* err = L_shl(err,Wscale); */ err = Mult_32_16( err, LSF_1_OVER_256SQ ); Loading lib_enc/lsf_msvq_ma_enc_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -1630,7 +1630,11 @@ void midlsf_enc_fx( tmp = sub( lsf[j], qlsf[j] ); /* err += wghts[j] * ftemp * ftemp; */ /* tmp is usually very small, we can have some extra precision with very rare saturation */ #ifdef ISSUE_1796_replace_shl_o tmp = shl_sat( tmp, 4 ); #else tmp = shl_o( tmp, 4, &Overflow ); #endif tmp = mult_ro( tmp, tmp, &Overflow ); err = L_mac( err, tmp, wghts[j] ); } Loading lib_enc/nois_est_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -1211,7 +1211,11 @@ void noise_est_fx( /* calculation of energy in the rest of bands */ Ltmp2 = sum32_fx( &fr_bands[10], sub( st_fx->max_band, 9 ) ); #ifdef ISSUE_1796_replace_shl_o wtmp = shl_sat( 1, sub( add( Q_new, QSCALE ), 1 ) ); #else wtmp = shl_o( 1, sub( add( Q_new, QSCALE ), 1 ), &Overflow ); #endif test(); IF( L_msu( Ltmp, 100, wtmp ) < 0 || L_msu( Ltmp2, 100, wtmp ) < 0 ) Loading Loading @@ -2548,7 +2552,11 @@ void noise_est_ivas_fx( { /* ftemp2 /= ftemp */ num = div_s( extract_h( Ltmp2 ), extract_h( Ltmp ) ); // 15+exp2-exp #ifdef ISSUE_1796_replace_shl_o noise_chartmp = shl_sat( num, sub( sub( exp, exp2 ), 4 ) ); // 15+exp2-exp1 -> Q11 #else noise_chartmp = shl_o( num, sub( sub( exp, exp2 ), 4 ), &Overflow ); // 15+exp2-exp1 -> Q11 #endif } if ( ncharX != NULL ) Loading lib_enc/pre_proc_fx.c +6 −0 Original line number Diff line number Diff line Loading @@ -126,9 +126,11 @@ void pre_proc_fx( LPD_state_HANDLE hLPDmem = st->hLPDmem; FD_BWE_ENC_HANDLE hBWE_FD = st->hBWE_FD; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif /*------------------------------------------------------------------* Loading Loading @@ -1046,7 +1048,11 @@ void pre_proc_fx( test(); IF( ( ( st->tcxonly == 0 ) || ( EQ_16( st->codec_mode, MODE1 ) ) ) && GT_32( st->input_Fs, 8000 ) ) { #ifdef ISSUE_1796_replace_shl_o st->mem_preemph_enc = shl_sat( new_inp_16k[sub( L_frame_tmp, 1 )], 1 ); #else st->mem_preemph_enc = shl_o( new_inp_16k[sub( L_frame_tmp, 1 )], 1, &Overflow ); #endif move16(); } Loading lib_enc/pvq_core_enc_fx.c +23 −0 Original line number Diff line number Diff line Loading @@ -267,6 +267,7 @@ void pvq_encode_frame_ivas_fx( Word32 xy_corr, yy_corr; PVQ_ENC_DATA pvq_enc; PVQ_ENC_HANDLE hPVQ = &pvq_enc; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); Loading Loading @@ -331,7 +332,11 @@ void pvq_encode_frame_ivas_fx( } tmp = ratio( xy_corr, yy_corr, &exp ); #ifdef ISSUE_1796_replace_shl_o gopt[is] = shl_sat( tmp, sub( sub( sub( 14, Q_coefs ), shift ), exp ) ); #else gopt[is] = shl_o( tmp, sub( sub( sub( 14, Q_coefs ), shift ), exp ), &Overflow ); #endif move16(); if ( gopt[is] == 0 ) Loading Loading @@ -391,9 +396,11 @@ void pvq_encode_frame_fx( Word32 xy_corr, yy_corr; PVQ_ENC_DATA pvq_enc; PVQ_ENC_HANDLE hPVQ = &pvq_enc; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif rc_enc_init_fx( hPVQ, pvq_bits ); Loading Loading @@ -455,7 +462,11 @@ void pvq_encode_frame_fx( } tmp = ratio( xy_corr, yy_corr, &exp ); #ifdef ISSUE_1796_replace_shl_o gopt[is] = shl_sat( tmp, sub( sub( sub( 14, Q_coefs ), shift ), exp ) ); #else gopt[is] = shl_o( tmp, sub( sub( sub( 14, Q_coefs ), shift ), exp ), &Overflow ); #endif move16(); if ( gopt[is] == 0 ) { Loading Loading @@ -931,9 +942,11 @@ static void densityIndexSymbolEncode_ivas_fx( Word32 sym_freq, cum_freq, tot; Word32 acc; UWord16 lsb; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif sym_freq = L_deposit_l( 1 ); Loading @@ -941,7 +954,11 @@ static void densityIndexSymbolEncode_ivas_fx( IF( s_and( (Word16) 0xFFFE, density ) != 0 ) /* even */ { angle = atan2_fx( SQRT_DIM_fx[r_dim], SQRT_DIM_fx[l_dim] ); #ifdef ISSUE_1796_replace_shl_o angle = shl_sat( angle, 1 ); #else angle = shl_o( angle, 1, &Overflow ); #endif angle = mult_r( angle, 20861 ); c = mult_r( density, angle ); Loading Loading @@ -1008,9 +1025,11 @@ static void densityIndexSymbolEncode_fx( Word32 sym_freq, cum_freq, tot; Word32 acc; UWord16 lsb; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif sym_freq = L_deposit_l( 1 ); Loading @@ -1018,7 +1037,11 @@ static void densityIndexSymbolEncode_fx( IF( s_and( (Word16) 0xFFFE, density ) != 0 ) /* even */ { angle = atan2_fx( SQRT_DIM_fx[r_dim], SQRT_DIM_fx[l_dim] ); #ifdef ISSUE_1796_replace_shl_o angle = shl_sat( angle, 1 ); #else angle = shl_o( angle, 1, &Overflow ); #endif angle = mult_r( angle, 20861 ); c = mult_r( density, angle ); Loading Loading
lib_enc/lsf_enc_fx.c +52 −0 Original line number Diff line number Diff line Loading @@ -784,7 +784,11 @@ static Word16 qlsf_Mode_Select_fx( { pred_pow2[i] = shl( pred1[i], cs ); move16(); #ifdef ISSUE_1796_replace_shl_o En = L_mac_o( En, mult( pred_pow2[i], shl_sat( w[i], 2 ) ), pred_pow2[i], &Overflow ); /* 2.56*2.56 at Q-4 */ #else En = L_mac_o( En, mult( pred_pow2[i], shl_o( w[i], 2, &Overflow ) ), pred_pow2[i], &Overflow ); /* 2.56*2.56 at Q-4 */ #endif } cs = shl( cs, 1 ); Loading Loading @@ -2365,8 +2369,10 @@ static Word32 vq_lvq_lsf_enc( Word16 quant[LSFMBEST][M], diff[M], dd[M]; Word16 lat_cv[LSFMBEST][M]; Word16 idx_lead[LSFMBEST][2], idx_scale[LSFMBEST][2]; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif #endif stagesVQ = sub( stages, 1 ); Loading Loading @@ -2418,13 +2424,25 @@ static Word32 vq_lvq_lsf_enc( Vr_subt( cand[i], lsf, diff, M ); FOR( j = 0; j < M; j++ ) { #ifdef ISSUE_1796_replace_shl_o diff[j] = shl_sat( diff[j], 4 ); #else diff[j] = shl_o( diff[j], 4, &Overflow ); #endif move16(); } #ifdef ISSUE_1796_replace_shl_o L_tmp = L_mult( mult( diff[0], shl_sat( w[0], 1 ) ), diff[0] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #else L_tmp = L_mult( mult( diff[0], shl_o( w[0], 1, &Overflow ) ), diff[0] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #endif FOR( j = 1; j < M; j++ ) { #ifdef ISSUE_1796_replace_shl_o L_tmp = L_mac( L_tmp, mult( diff[j], shl_sat( w[j], 1 ) ), diff[j] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #else L_tmp = L_mac( L_tmp, mult( diff[j], shl_o( w[j], 1, &Overflow ) ), diff[j] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #endif } e[i] = L_tmp; /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ move32(); Loading Loading @@ -2471,8 +2489,10 @@ static Word32 vq_lvq_lsf_enc_ivas_fx( Word16 quant[LSFMBEST][M], diff[M], dd[M]; Word16 lat_cv[LSFMBEST][M]; Word16 idx_lead[LSFMBEST][2], idx_scale[LSFMBEST][2]; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif #endif stagesVQ = sub( stages, 1 ); Loading Loading @@ -2541,13 +2561,25 @@ static Word32 vq_lvq_lsf_enc_ivas_fx( Vr_subt( cand[i], lsf, diff, M ); FOR( j = 0; j < M; j++ ) { #ifdef ISSUE_1796_replace_shl_o diff[j] = shl_sat( diff[j], 4 ); #else diff[j] = shl_o( diff[j], 4, &Overflow ); #endif move16(); } #ifdef ISSUE_1796_replace_shl_o L_tmp = L_mult( mult( diff[0], shl_sat( w[0], 1 ) ), diff[0] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #else L_tmp = L_mult( mult( diff[0], shl_o( w[0], 1, &Overflow ) ), diff[0] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #endif FOR( j = 1; j < M; j++ ) { #ifdef ISSUE_1796_replace_shl_o L_tmp = L_mac( L_tmp, mult( diff[j], shl_sat( w[j], 1 ) ), diff[j] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #else L_tmp = L_mac( L_tmp, mult( diff[j], shl_o( w[j], 1, &Overflow ) ), diff[j] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */ #endif } e[i] = L_tmp; move32(); Loading Loading @@ -3396,7 +3428,11 @@ Word32 qlsf_ARSN_tcvq_Enc_16k_fx( { yy_fx[i] = shl( yy_fx[i], cs ); move16(); #ifdef ISSUE_1796_replace_shl_o temp_l = L_mac_o( temp_l, mult( yy_fx[i], shl_sat( w_fx[i], 2 ) ), yy_fx[i], &Overflow ); #else temp_l = L_mac_o( temp_l, mult( yy_fx[i], shl_o( w_fx[i], 2, &Overflow ) ), yy_fx[i], &Overflow ); #endif } cs = shl( cs, 1 ); temp_l = L_shr( temp_l, cs ); Loading Loading @@ -3600,9 +3636,17 @@ static void lsf_mid_enc_fx( tmp = sub( lsf[j], qlsf[j] ); /* err += wghts[j] * ftemp * ftemp; */ /* tmp is usually very small, we can have some extra precision with very rare saturation */ #ifdef ISSUE_1796_replace_shl_o tmp = shl_sat( tmp, 4 ); #else tmp = shl_o( tmp, 4, &Overflow ); #endif tmp = mult_ro( tmp, tmp, &Overflow ); #ifdef ISSUE_1796_replace_shl_o err = L_mac_o( err, tmp, shl_sat( wghts[j], 2 ), &Overflow ); #else err = L_mac_o( err, tmp, shl_o( wghts[j], 2, &Overflow ), &Overflow ); #endif } /* err = L_shl(err,Wscale); */ err = Mult_32_16( err, LSF_1_OVER_256SQ ); Loading Loading @@ -3786,9 +3830,17 @@ static void lsf_mid_enc_ivas_fx( tmp = sub( lsf[j], qlsf[j] ); /* err += wghts[j] * ftemp * ftemp; */ /* tmp is usually very small, we can have some extra precision with very rare saturation */ #ifdef ISSUE_1796_replace_shl_o tmp = shl_sat( tmp, 4 ); #else tmp = shl_o( tmp, 4, &Overflow ); #endif tmp = mult_ro( tmp, tmp, &Overflow ); #ifdef ISSUE_1796_replace_shl_o err = L_mac_o( err, tmp, shl_sat( wghts[j], 2 ), &Overflow ); #else err = L_mac_o( err, tmp, shl_o( wghts[j], 2, &Overflow ), &Overflow ); #endif } /* err = L_shl(err,Wscale); */ err = Mult_32_16( err, LSF_1_OVER_256SQ ); Loading
lib_enc/lsf_msvq_ma_enc_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -1630,7 +1630,11 @@ void midlsf_enc_fx( tmp = sub( lsf[j], qlsf[j] ); /* err += wghts[j] * ftemp * ftemp; */ /* tmp is usually very small, we can have some extra precision with very rare saturation */ #ifdef ISSUE_1796_replace_shl_o tmp = shl_sat( tmp, 4 ); #else tmp = shl_o( tmp, 4, &Overflow ); #endif tmp = mult_ro( tmp, tmp, &Overflow ); err = L_mac( err, tmp, wghts[j] ); } Loading
lib_enc/nois_est_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -1211,7 +1211,11 @@ void noise_est_fx( /* calculation of energy in the rest of bands */ Ltmp2 = sum32_fx( &fr_bands[10], sub( st_fx->max_band, 9 ) ); #ifdef ISSUE_1796_replace_shl_o wtmp = shl_sat( 1, sub( add( Q_new, QSCALE ), 1 ) ); #else wtmp = shl_o( 1, sub( add( Q_new, QSCALE ), 1 ), &Overflow ); #endif test(); IF( L_msu( Ltmp, 100, wtmp ) < 0 || L_msu( Ltmp2, 100, wtmp ) < 0 ) Loading Loading @@ -2548,7 +2552,11 @@ void noise_est_ivas_fx( { /* ftemp2 /= ftemp */ num = div_s( extract_h( Ltmp2 ), extract_h( Ltmp ) ); // 15+exp2-exp #ifdef ISSUE_1796_replace_shl_o noise_chartmp = shl_sat( num, sub( sub( exp, exp2 ), 4 ) ); // 15+exp2-exp1 -> Q11 #else noise_chartmp = shl_o( num, sub( sub( exp, exp2 ), 4 ), &Overflow ); // 15+exp2-exp1 -> Q11 #endif } if ( ncharX != NULL ) Loading
lib_enc/pre_proc_fx.c +6 −0 Original line number Diff line number Diff line Loading @@ -126,9 +126,11 @@ void pre_proc_fx( LPD_state_HANDLE hLPDmem = st->hLPDmem; FD_BWE_ENC_HANDLE hBWE_FD = st->hBWE_FD; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif /*------------------------------------------------------------------* Loading Loading @@ -1046,7 +1048,11 @@ void pre_proc_fx( test(); IF( ( ( st->tcxonly == 0 ) || ( EQ_16( st->codec_mode, MODE1 ) ) ) && GT_32( st->input_Fs, 8000 ) ) { #ifdef ISSUE_1796_replace_shl_o st->mem_preemph_enc = shl_sat( new_inp_16k[sub( L_frame_tmp, 1 )], 1 ); #else st->mem_preemph_enc = shl_o( new_inp_16k[sub( L_frame_tmp, 1 )], 1, &Overflow ); #endif move16(); } Loading
lib_enc/pvq_core_enc_fx.c +23 −0 Original line number Diff line number Diff line Loading @@ -267,6 +267,7 @@ void pvq_encode_frame_ivas_fx( Word32 xy_corr, yy_corr; PVQ_ENC_DATA pvq_enc; PVQ_ENC_HANDLE hPVQ = &pvq_enc; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); Loading Loading @@ -331,7 +332,11 @@ void pvq_encode_frame_ivas_fx( } tmp = ratio( xy_corr, yy_corr, &exp ); #ifdef ISSUE_1796_replace_shl_o gopt[is] = shl_sat( tmp, sub( sub( sub( 14, Q_coefs ), shift ), exp ) ); #else gopt[is] = shl_o( tmp, sub( sub( sub( 14, Q_coefs ), shift ), exp ), &Overflow ); #endif move16(); if ( gopt[is] == 0 ) Loading Loading @@ -391,9 +396,11 @@ void pvq_encode_frame_fx( Word32 xy_corr, yy_corr; PVQ_ENC_DATA pvq_enc; PVQ_ENC_HANDLE hPVQ = &pvq_enc; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif rc_enc_init_fx( hPVQ, pvq_bits ); Loading Loading @@ -455,7 +462,11 @@ void pvq_encode_frame_fx( } tmp = ratio( xy_corr, yy_corr, &exp ); #ifdef ISSUE_1796_replace_shl_o gopt[is] = shl_sat( tmp, sub( sub( sub( 14, Q_coefs ), shift ), exp ) ); #else gopt[is] = shl_o( tmp, sub( sub( sub( 14, Q_coefs ), shift ), exp ), &Overflow ); #endif move16(); if ( gopt[is] == 0 ) { Loading Loading @@ -931,9 +942,11 @@ static void densityIndexSymbolEncode_ivas_fx( Word32 sym_freq, cum_freq, tot; Word32 acc; UWord16 lsb; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif sym_freq = L_deposit_l( 1 ); Loading @@ -941,7 +954,11 @@ static void densityIndexSymbolEncode_ivas_fx( IF( s_and( (Word16) 0xFFFE, density ) != 0 ) /* even */ { angle = atan2_fx( SQRT_DIM_fx[r_dim], SQRT_DIM_fx[l_dim] ); #ifdef ISSUE_1796_replace_shl_o angle = shl_sat( angle, 1 ); #else angle = shl_o( angle, 1, &Overflow ); #endif angle = mult_r( angle, 20861 ); c = mult_r( density, angle ); Loading Loading @@ -1008,9 +1025,11 @@ static void densityIndexSymbolEncode_fx( Word32 sym_freq, cum_freq, tot; Word32 acc; UWord16 lsb; #ifndef ISSUE_1796_replace_shl_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif sym_freq = L_deposit_l( 1 ); Loading @@ -1018,7 +1037,11 @@ static void densityIndexSymbolEncode_fx( IF( s_and( (Word16) 0xFFFE, density ) != 0 ) /* even */ { angle = atan2_fx( SQRT_DIM_fx[r_dim], SQRT_DIM_fx[l_dim] ); #ifdef ISSUE_1796_replace_shl_o angle = shl_sat( angle, 1 ); #else angle = shl_o( angle, 1, &Overflow ); #endif angle = mult_r( angle, 20861 ); c = mult_r( density, angle ); Loading