From 1bd5dfac9c0f30d23bcec8a511ef2e0c18ba5c1d Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 28 May 2025 09:36:37 +0200 Subject: [PATCH 1/4] port float MR 1502 --- lib_com/options.h | 5 +++-- lib_dec/ivas_dirac_dec_fx.c | 14 +++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 73a8f082f..d2af53879 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -131,10 +131,11 @@ #define FIX_997_REMOVE_SPAR_DEC_UPMIXER /* VA: issue 997: remove obsolete function ivas_spar_dec_upmixer() */ #define NONBE_FIX_978_MC_TDREND_REVERB /* Eri : activate reverb for TDREND with headtracking */ -#define NONBE_FIX_999_JBM_MCT_FLUSH /* FhG: issue #999: fix wrong flushing for MCT at a JBM rate switch */ +#define NONBE_FIX_999_JBM_MCT_FLUSH /* FhG: issue #999: fix wrong flushing for MCT at a JBM rate switch */ #define FIX_1003_PARAMISM_BINAURAL_RECONFIG_USAN /* FhG: fix for #1003: fix USAN caused by ParamISM reconfig */ #define FIX_1001_ARI_HM_OVERFLOW /* FhG: (no changes needed in BASOP) fix for undef behaviour in in the harmonic TCX model arithmetic coder */ -#define NONBE_FIX_1005_MC_RS_TCBUFFER_UPDATE /* FhG: issue #1005: fix TC Buffer update at a MC rate switch */ +#define NONBE_FIX_1005_MC_RS_TCBUFFER_UPDATE /* FhG: issue #1005: fix TC Buffer update at a MC rate switch */ +#define FIX_1060_USAN_ARRAY_BOUNDS /* FhG: issue 1060: USAN array-bounds errors */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_dirac_dec_fx.c b/lib_dec/ivas_dirac_dec_fx.c index ff02d813d..36f5be8c4 100644 --- a/lib_dec/ivas_dirac_dec_fx.c +++ b/lib_dec/ivas_dirac_dec_fx.c @@ -4061,12 +4061,20 @@ void ivas_dirac_dec_render_sf_fx( { Word32 tmp; tmp = Mpy_32_32( g_fx, *tc_re_fx ); - Cldfb_RealBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l] = L_add( Cldfb_RealBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l], tmp ); - move32(); +#ifdef FIX_1060_USAN_ARRAY_BOUNDS + Cldfb_RealBuffer_fx[j2][k][l] = Ladd(Cldfb_RealBuffer[j2][k][l], tmp ); +#else + Cldfb_RealBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l] = L_add( Cldfb_RealBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l], tmp ); +#endif + move32(); tc_re_fx++; tmp = Mpy_32_32( g_fx, *tc_im_fx ); +#ifdef FIX_1060_USAN_ARRAY_BOUNDS + Cldfb_ImagBuffer_fx[j2][k][l] = Ladd(Cldfb_ImagBuffer_fx[j2][k][l], tmp); +#else Cldfb_ImagBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l] = L_add( Cldfb_ImagBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l], tmp ); - move32(); +#endif + move32(); tc_re_fx++; } w1_fx += hSpatParamRendCom->num_freq_bands; -- GitLab From 5c72e64522868c7c26cf409798950206f40361b1 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 28 May 2025 09:37:40 +0200 Subject: [PATCH 2/4] fix formatting --- lib_dec/ivas_dirac_dec_fx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib_dec/ivas_dirac_dec_fx.c b/lib_dec/ivas_dirac_dec_fx.c index 36f5be8c4..b209e7e98 100644 --- a/lib_dec/ivas_dirac_dec_fx.c +++ b/lib_dec/ivas_dirac_dec_fx.c @@ -4062,19 +4062,19 @@ void ivas_dirac_dec_render_sf_fx( Word32 tmp; tmp = Mpy_32_32( g_fx, *tc_re_fx ); #ifdef FIX_1060_USAN_ARRAY_BOUNDS - Cldfb_RealBuffer_fx[j2][k][l] = Ladd(Cldfb_RealBuffer[j2][k][l], tmp ); + Cldfb_RealBuffer_fx[j2][k][l] = Ladd( Cldfb_RealBuffer[j2][k][l], tmp ); #else - Cldfb_RealBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l] = L_add( Cldfb_RealBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l], tmp ); + Cldfb_RealBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l] = L_add( Cldfb_RealBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l], tmp ); #endif - move32(); + move32(); tc_re_fx++; tmp = Mpy_32_32( g_fx, *tc_im_fx ); #ifdef FIX_1060_USAN_ARRAY_BOUNDS - Cldfb_ImagBuffer_fx[j2][k][l] = Ladd(Cldfb_ImagBuffer_fx[j2][k][l], tmp); + Cldfb_ImagBuffer_fx[j2][k][l] = Ladd( Cldfb_ImagBuffer_fx[j2][k][l], tmp ); #else Cldfb_ImagBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l] = L_add( Cldfb_ImagBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l], tmp ); #endif - move32(); + move32(); tc_re_fx++; } w1_fx += hSpatParamRendCom->num_freq_bands; -- GitLab From d96a7bd60813134cd2b50618913c0a0ce3b96747 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 28 May 2025 10:25:20 +0200 Subject: [PATCH 3/4] fix compile error --- lib_dec/ivas_dirac_dec_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_dirac_dec_fx.c b/lib_dec/ivas_dirac_dec_fx.c index b209e7e98..153b83b64 100644 --- a/lib_dec/ivas_dirac_dec_fx.c +++ b/lib_dec/ivas_dirac_dec_fx.c @@ -4062,7 +4062,7 @@ void ivas_dirac_dec_render_sf_fx( Word32 tmp; tmp = Mpy_32_32( g_fx, *tc_re_fx ); #ifdef FIX_1060_USAN_ARRAY_BOUNDS - Cldfb_RealBuffer_fx[j2][k][l] = Ladd( Cldfb_RealBuffer[j2][k][l], tmp ); + Cldfb_RealBuffer_fx[j2][k][l] = L_add( Cldfb_RealBuffer_fx[j2][k][l], tmp ); #else Cldfb_RealBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l] = L_add( Cldfb_RealBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l], tmp ); #endif @@ -4070,7 +4070,7 @@ void ivas_dirac_dec_render_sf_fx( tc_re_fx++; tmp = Mpy_32_32( g_fx, *tc_im_fx ); #ifdef FIX_1060_USAN_ARRAY_BOUNDS - Cldfb_ImagBuffer_fx[j2][k][l] = Ladd( Cldfb_ImagBuffer_fx[j2][k][l], tmp ); + Cldfb_ImagBuffer_fx[j2][k][l] = L_add( Cldfb_ImagBuffer_fx[j2][k][l], tmp ); #else Cldfb_ImagBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l] = L_add( Cldfb_ImagBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l], tmp ); #endif -- GitLab From 461fbcb4b185dbe261590efd913968fa4b537df7 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 1 Aug 2025 13:31:59 +0200 Subject: [PATCH 4/4] fix merging issues in options.h --- lib_com/options.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index f0d60d234..eda09ff9f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -163,19 +163,9 @@ #define FIX_1741_REVERB_TIMES_Q_FORMAT /* Philips: reverberation times in Q26 format instead of Q31 */ #define FIX_1831_REVERB_REGRESSION /* Philips: fixes reverb regression issues */ -#define FIX_944_REMOVE_LS_RENDERER_CALL_IN_STEREO /* VA: issue 994: remove an obsolete call of function ivas_ls_setup_conversion() in stereo */ -#define FIX_699_FILE_READER_JBM_TSM /* VA: issue 699: complement FileReader_getFilePath() logic for TSM and JBM */ -#define FIX_997_REMOVE_SPAR_DEC_UPMIXER /* VA: issue 997: remove obsolete function ivas_spar_dec_upmixer() */ - -#define NONBE_FIX_978_MC_TDREND_REVERB /* Eri : activate reverb for TDREND with headtracking */ -#define NONBE_FIX_999_JBM_MCT_FLUSH /* FhG: issue #999: fix wrong flushing for MCT at a JBM rate switch */ -#define FIX_1003_PARAMISM_BINAURAL_RECONFIG_USAN /* FhG: fix for #1003: fix USAN caused by ParamISM reconfig */ -#define FIX_1001_ARI_HM_OVERFLOW /* FhG: (no changes needed in BASOP) fix for undef behaviour in in the harmonic TCX model arithmetic coder */ -#define NONBE_FIX_1005_MC_RS_TCBUFFER_UPDATE /* FhG: issue #1005: fix TC Buffer update at a MC rate switch */ -#define FIX_1060_USAN_ARRAY_BOUNDS /* FhG: issue 1060: USAN array-bounds errors */ - #define FIX_1835_REVERB_ACTIVATION /* FhG: Modified reverberation activation logic and corrected factEQ calculation */ #define NON_BE_FIX_EVS_USAN_ERR_IN_WAVEADJUST /* FhG: address issue 1037 */ +#define FIX_1060_USAN_ARRAY_BOUNDS /* FhG: issue 1060: USAN array-bounds errors */ /* #################### End BASOP porting switches ############################ */ -- GitLab