From f697ed7d50ad46cbf0f0957fcf9c12d10e00ed2f Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 16 May 2025 15:08:10 +0200 Subject: [PATCH 1/3] port float MR !1364 --- lib_com/options.h | 1 + lib_dec/ivas_ism_param_dec_fx.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 2e8fa8802..f7e1e062a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -122,6 +122,7 @@ #define NONBE_FIX_947_STEREO_DMX_EVS_POC /* Orange: Fix clicks on POC */ #define NONBE_FIX_947_STEREO_DMX_EVS_PHA /* Orange: Fix issues on PHA */ #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 */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_ism_param_dec_fx.c b/lib_dec/ivas_ism_param_dec_fx.c index d7ec5b6e7..8af9b8cec 100644 --- a/lib_dec/ivas_ism_param_dec_fx.c +++ b/lib_dec/ivas_ism_param_dec_fx.c @@ -939,7 +939,11 @@ void ivas_ism_dec_digest_tc_fx( EQ_32( st_ivas->renderer_type, RENDERER_OSBA_STEREO ) || ( EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_MIXER_CONV_ROOM ) && st_ivas->hDecoderConfig->Opt_Headrotation == 0 ) ) { - Word16 i, num_objects; +#ifdef FIX_983_DISC_ISM_DIGEST_NUM_OBJS + int16_t i; +#else + int16_t i, num_objects; +#endif Word32 azimuth_fx, elevation_fx; /* we have a full frame interpolator, adapt it */ @@ -981,9 +985,14 @@ void ivas_ism_dec_digest_tc_fx( } /* also get the gains here */ +#ifdef FIX_983_DISC_ISM_DIGEST_NUM_OBJS + FOR ( i = 0; i < st_ivas->nchan_ism; i++ ) +#else num_objects = st_ivas->nchan_transport; move16(); - FOR( i = 0; i < num_objects; i++ ) + FOR ( i = 0; i < num_objects; i++ ) +#endif + FOR( i = 0; i < num_objects; i++ ) { Copy32( st_ivas->hIsmRendererData->gains_fx[i], st_ivas->hIsmRendererData->prev_gains_fx[i], MAX_OUTPUT_CHANNELS ); -- GitLab From 7e900aab167a3fae3c04afe2dce83068b804a76b Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 16 May 2025 16:10:14 +0200 Subject: [PATCH 2/3] fix formatting --- lib_dec/ivas_ism_param_dec_fx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_dec/ivas_ism_param_dec_fx.c b/lib_dec/ivas_ism_param_dec_fx.c index 8af9b8cec..a192625fa 100644 --- a/lib_dec/ivas_ism_param_dec_fx.c +++ b/lib_dec/ivas_ism_param_dec_fx.c @@ -986,13 +986,13 @@ void ivas_ism_dec_digest_tc_fx( /* also get the gains here */ #ifdef FIX_983_DISC_ISM_DIGEST_NUM_OBJS - FOR ( i = 0; i < st_ivas->nchan_ism; i++ ) + FOR( i = 0; i < st_ivas->nchan_ism; i++ ) #else num_objects = st_ivas->nchan_transport; move16(); - FOR ( i = 0; i < num_objects; i++ ) + FOR( i = 0; i < num_objects; i++ ) #endif - FOR( i = 0; i < num_objects; i++ ) + FOR( i = 0; i < num_objects; i++ ) { Copy32( st_ivas->hIsmRendererData->gains_fx[i], st_ivas->hIsmRendererData->prev_gains_fx[i], MAX_OUTPUT_CHANNELS ); -- GitLab From e80a50ee2068a6262882ec0af8a9ed6cc8e4e470 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 16 May 2025 16:25:47 +0200 Subject: [PATCH 3/3] fix compile error --- lib_dec/ivas_ism_param_dec_fx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_dec/ivas_ism_param_dec_fx.c b/lib_dec/ivas_ism_param_dec_fx.c index a192625fa..1485c09c1 100644 --- a/lib_dec/ivas_ism_param_dec_fx.c +++ b/lib_dec/ivas_ism_param_dec_fx.c @@ -992,7 +992,6 @@ void ivas_ism_dec_digest_tc_fx( move16(); FOR( i = 0; i < num_objects; i++ ) #endif - FOR( i = 0; i < num_objects; i++ ) { Copy32( st_ivas->hIsmRendererData->gains_fx[i], st_ivas->hIsmRendererData->prev_gains_fx[i], MAX_OUTPUT_CHANNELS ); -- GitLab