From 0e78fd50393615e67d7874d376ee50ef22d6f71f Mon Sep 17 00:00:00 2001 From: knj Date: Thu, 4 Apr 2024 17:18:29 +0200 Subject: [PATCH] add explicit cast to fix usan complaint --- lib_com/nelp.c | 4 ++++ lib_com/options.h | 1 + 2 files changed, 5 insertions(+) diff --git a/lib_com/nelp.c b/lib_com/nelp.c index 3b27ab7565..b21740f5ca 100644 --- a/lib_com/nelp.c +++ b/lib_com/nelp.c @@ -121,7 +121,11 @@ void generate_nelp_excitation( for ( j = 0; j < len; j++ ) { +#ifdef FIX_970_USAN_IN_NELP_SEED + tmp[j] = ( ( *seed ) = (int16_t) ( 521 * ( *seed ) + 259 ) ) / PCM16_TO_FLT_FAC; +#else tmp[j] = ( ( *seed ) = 521 * ( *seed ) + 259 ) / PCM16_TO_FLT_FAC; +#endif tmp1[j] = ABSVAL( tmp[j] ); I[j] = j; } diff --git a/lib_com/options.h b/lib_com/options.h index 34c6f7410a..7503f70df7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -158,6 +158,7 @@ #define FIX_1033_MEMORY_LEAK_OMASA /* Nokia / Orange: issue #1033: Memory leak in OMASA to BINAURAL with HRTF with bitrate switching */ #define FIX_1043_JBM_MD_BUFFER /* VA: issue 1043: JBM MD handle allocation is avoided in non-JBM EXT operations */ +#define FIX_970_USAN_IN_NELP_SEED /* #################### End BE switches ################################## */ -- GitLab