From 2573f640d54eeff0e981af21e47f54f955e20d25 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Mon, 19 May 2025 14:20:28 +0200 Subject: [PATCH] port FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI --- lib_com/ari_hm.c | 4 ++++ lib_com/options.h | 1 + 2 files changed, 5 insertions(+) diff --git a/lib_com/ari_hm.c b/lib_com/ari_hm.c index 0bd7b144f..28a410933 100644 --- a/lib_com/ari_hm.c +++ b/lib_com/ari_hm.c @@ -272,7 +272,11 @@ void tcx_hm_modify_envelope( const int16_t L_frame /* i : number of spectral lines */ ) { +#ifdef FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI + int32_t k, h, x; +#else int16_t k, h, x; +#endif Word16 inv_shape[2 * kTcxHmParabolaHalfWidth + 1]; /* Q15 */ if ( gain == 0 ) diff --git a/lib_com/options.h b/lib_com/options.h index 14ce9128d..6fd5c9729 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -206,6 +206,7 @@ #define NONBE_FIX_979_OSBA_STEREO_5MS /* FhG : issue #979 : 5ms and 20ms output different for OSBA and stereo */ #define FIX_983_DISC_ISM_DIGEST_NUM_OBJS /* FhG: issue #983: the discrete ISM digest function uses the wrong number of objects */ +#define FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI /* FhG: fix and undef behaviour bug in the harmonic TCX model arithmetic coder */ /* #################### End BASOP porting switches ############################ */ -- GitLab