diff --git a/lib_com/options.h b/lib_com/options.h index bff4dcaad4a11ee2e62b0f03a76092cbeb3e9704..c568a52fa21f2df3f026c396a4cded894919e2f8 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -100,6 +100,7 @@ #define FIX_959_MASA_LINEAR_REND /* VA: issue 959: remove unused calling of ivas_sba_linear_renderer() in MASA rendering */ #define NONBE_FIX_968_ISM_BRIR_WITH_HEADROTATION_5MS_FIX /* FhG : issue #968: differences between 5ms and 20ms rendering for discrete ISM with BRIR and head rotation*/ +#define FIX_969_USAN_IGF_ARITH /* FhG: issue 969: fix USAN error in igf_sce_dec; same issue as #962 */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/igf_scf_dec_fx.c b/lib_dec/igf_scf_dec_fx.c index 1ddb9950aae54c498fd2f79c32e2ccfbd0ee8073..3db6581dac3e32eebcab53deca5339f9c3b493ff 100644 --- a/lib_dec/igf_scf_dec_fx.c +++ b/lib_dec/igf_scf_dec_fx.c @@ -189,6 +189,9 @@ static void decode_sfe_vector_fx( { /* (t == 0) && (f == 0) */ /* decode one of the IGF_SYMBOLS_IN_TABLE == 27 alphabet symbols using the new raw AC function */ +#ifdef FIX_969_USAN_IGF_ARITH + /* NOTE: the float equivalent uses a tmp variable + explicit cast here to avoid undefined behaviour here. This BASOP version does not need it as it already uses signed Word16 return value here. */ +#endif res = ari_decode_14bits_s27_ext_fx( st, &hPrivateData->acState, (const UWord16 *) hPrivateData->cf_se00 ); pred = arith_decode_bits_fx( hPrivateData, st, 2 ); /* LSBs as 2 bit raw */