diff --git a/lib_com/options.h b/lib_com/options.h index a5afc1b9f1e17b96c0c5ec6e54e4b3ceec00db5f..2320675a9f2ad56cb1461035dbcd18c15b5f9fee 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -89,6 +89,7 @@ #define FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /* OR : Fix issue basop 2201 hrtf_file_reader crend differs between basop ivas-main and ivas-float-update */ #define FIX_2245_INIT_FD_CNG_EVS /* Dolby/VA: Issue 2245: initialize FD CNG with EVS-type of init function */ #define FIX_2252_SCALING_SAVE_HB_SYNTH /* VA: issue 2252: fix use-of-uninit-value in save_hb_synth_fx[] scaling in FOA decoding with bitstream that starts with an SID */ +#define FIX_2248_EVS_ASSERT /* VA: Include _sat in an EVS related part of the code */ /* #################### End BE switches ################################## */ diff --git a/lib_enc/enc_acelpx_fx.c b/lib_enc/enc_acelpx_fx.c index 95104c76ca247bbd3f99052eae64f5cee21b4971..089c3bbb4d23fb9d4e536d691a0d413b66eeb589 100644 --- a/lib_enc/enc_acelpx_fx.c +++ b/lib_enc/enc_acelpx_fx.c @@ -292,9 +292,12 @@ static void E_ACELP_1pulse_searchx_fx( /*alp0 = *alp + R[0]; INDIRECT(1);*/ ps0 = *ps; /* Qdn */ move16(); - alp0 = L_deposit_h( *alp ); /* Q22 */ + alp0 = L_deposit_h( *alp ); /* Q22 */ +#ifndef FIX_2248_EVS_ASSERT alp0 = L_mac( alp0, R[0], sign_val_1 ); /* Qalp = (Q_R=Q_cor)*Q_signval */ - +#else + alp0 = L_mac_sat( alp0, R[0], sign_val_1 ); /* Qalp = (Q_R=Q_cor)*Q_signval */ +#endif /* Ensure that in the loop below s > 0 in the first iteration, the actual values do not matter. */ move16(); move16();