diff --git a/lib_com/options.h b/lib_com/options.h index 390ea85b86b2e4cd24d6343a2de2cf9e36976272..e764bc83b5f88916d2549a679a56100fa687deb7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -123,6 +123,7 @@ #define NONBE_FIX_947_STEREO_DMX_EVS_PHA /* Orange: Fix issues on PHA */ #define NONBE_FIX_951_MCMASA_5MS_RENDERING /* Nokia: issue #951: Differences for 5ms and 20ms rendering for McMASA at 13.2 kbps to BINAURAL */ #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 d7ec5b6e7a803ad763c0e3231dff91866beefd6f..1485c09c1d1d479067199f9e271de54dea7c54c2 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,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++ ) +#else num_objects = st_ivas->nchan_transport; move16(); FOR( i = 0; i < num_objects; i++ ) +#endif { Copy32( st_ivas->hIsmRendererData->gains_fx[i], st_ivas->hIsmRendererData->prev_gains_fx[i], MAX_OUTPUT_CHANNELS );