From b7bce2cf3c60f54ae73f113dbdb87f8d1cd7a0ab Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 24 Apr 2026 21:42:33 +0200 Subject: [PATCH] float issue 1582: Remove unncessary statement from stereo_dft_quantize_itd() --- lib_com/options.h | 1 + lib_enc/ivas_stereo_dft_enc_itd.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 0512ed250..0ec6f430b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -163,6 +163,7 @@ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ #define FIX_FLOAT_1539_G192_FORMAT_SWITCH /* Nokia: reintroduce format switching for g192 bitstreams */ #define FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN /* FhG: float issue 1560: Avoid optimizing the division on the result of maxWithSign() with -funsafe-math-optimizations */ +#define FIX_FLOAT_1582_STEREO_DFT_QUANTIZE_ITD /* FhG: float issue 1582: Remove unncessary statement from stereo_dft_quantize_itd() */ /* #################### End BE switches ################################## */ diff --git a/lib_enc/ivas_stereo_dft_enc_itd.c b/lib_enc/ivas_stereo_dft_enc_itd.c index f48fd9a66..8f2cfa69e 100644 --- a/lib_enc/ivas_stereo_dft_enc_itd.c +++ b/lib_enc/ivas_stereo_dft_enc_itd.c @@ -152,7 +152,11 @@ static void stereo_dft_quantize_itd( { int16_t itd; +#ifdef FIX_FLOAT_1582_STEREO_DFT_QUANTIZE_ITD + itd = in; +#else itd = (int16_t) ( sign( in ) * 0.5f + in ); +#endif /*Limit ITD*/ if ( ( ABSVAL( itd ) > STEREO_DFT_ITD_MAX ) || ( ABSVAL( itd ) < STEREO_DFT_ITD_MIN ) ) -- GitLab