From 2813acda9ef6bf2d47364b0427cc3c2f463f5cfd Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 19:41:22 +0200 Subject: [PATCH 01/14] [cleanup] accept FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI --- lib_com/options.h | 1 - lib_dec/dec_LPD.c | 8 -------- lib_dec/dec_tcx.c | 19 ------------------- 3 files changed, 28 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 1a4f01416..d138f8d68 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -186,7 +186,6 @@ #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on )*/ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ #define NON_BE_FIX_EVS_USAN_ERR_IN_WAVEADJUST /* FhG: address issue 1037 */ -#define FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI /* FhG: move setting of pointers for parameter decoding so they are skipped in lost frames when they are not needed */ #define NONBE_FIX_1056_ISM_RATE_SWITCH /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */ #define FIX_970_USAN_IN_NELP_SEED #define NONBE_FIX_1075 /* FhG: fix segfault for bitrate switching + BINAURAL_ROOM_REVERB output in MC */ diff --git a/lib_dec/dec_LPD.c b/lib_dec/dec_LPD.c index 1ce388ce9..89597cae4 100644 --- a/lib_dec/dec_LPD.c +++ b/lib_dec/dec_LPD.c @@ -604,20 +604,12 @@ void decoder_LPD( for ( k = 0; k < 2; k++ ) { -#ifndef FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI - /* Set pointer to parameters */ - prm = param + ( k * DEC_NPRM_DIV ); - - /* Stability Factor */ -#endif if ( !bfi ) { -#ifdef FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI /* Set pointer to parameters */ prm = param + ( k * DEC_NPRM_DIV ); /* Stability Factor */ -#endif st->stab_fac = lsf_stab( &lsf[( k + 1 ) * M], &lsf[k * M], 0, st->L_frame ); } diff --git a/lib_dec/dec_tcx.c b/lib_dec/dec_tcx.c index 554c4a4bd..03f1e6793 100644 --- a/lib_dec/dec_tcx.c +++ b/lib_dec/dec_tcx.c @@ -93,9 +93,7 @@ void decoder_tcx( tmp_concealment_method = 0; nf_seed = 0; fUseTns = 0; /* flag that is set if TNS data is present */ -#ifdef FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI prm_sqQ = NULL; -#endif set_f( xn_buf, 0, L_MDCT_OVLP_MAX + L_FRAME_PLUS + L_MDCT_OVLP_MAX ); @@ -733,15 +731,11 @@ void decoder_tcx_invQ( TCX_CONFIG_HANDLE hTcxCfg = st->hTcxCfg; tnsSize = 0; -#ifndef FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI - prm_target = NULL; /* just to suppress MSVC warnigs */ -#else /* just to suppress MSVC warnigs */ prm_target = NULL; prm_ltp = NULL; prm_tns = NULL; prm_sqQ = NULL; -#endif /*-----------------------------------------------------------------* * Initializations @@ -761,10 +755,6 @@ void decoder_tcx_invQ( noiseFillingSize = st->hIGFDec->infoIGFStartLine; } -#ifndef FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI - prm_ltp = &prm[1 + NOISE_FILL_RANGES]; - prm_tns = prm_ltp + LTPSIZE; -#endif /*-----------------------------------------------------------* * Read TCX parameters * @@ -775,10 +765,8 @@ void decoder_tcx_invQ( if ( !bfi ) { index = prm[0]; -#ifdef FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI prm_ltp = &prm[1 + NOISE_FILL_RANGES]; prm_tns = prm_ltp + LTPSIZE; -#endif /* read noise level (fac_ns) */ st->hTcxDec->noise_filling_index[frame_cnt] = prm[1]; } @@ -793,11 +781,6 @@ void decoder_tcx_invQ( *fUseTns = 0; } -#ifndef FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI - prm_hm = prm_tns + tnsSize; - prm_sqQ = prm_hm + NPRM_CTX_HM; - *prm_sqQ1 = prm_sqQ; -#endif /*-----------------------------------------------------------* * Spectrum data * @@ -805,11 +788,9 @@ void decoder_tcx_invQ( if ( !bfi ) { -#ifdef FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI prm_hm = prm_tns + tnsSize; prm_sqQ = prm_hm + NPRM_CTX_HM; *prm_sqQ1 = prm_sqQ; -#endif /*-----------------------------------------------------------* * Context HM * *-----------------------------------------------------------*/ -- GitLab From 7794fe078fc4c3ee764e917a579f2cf67f07aeb1 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 19:42:42 +0200 Subject: [PATCH 02/14] [cleanup] accept FIX_970_USAN_IN_NELP_SEED --- lib_com/nelp.c | 4 ---- lib_com/options.h | 1 - 2 files changed, 5 deletions(-) diff --git a/lib_com/nelp.c b/lib_com/nelp.c index e7a86ee32..44e4e4b94 100644 --- a/lib_com/nelp.c +++ b/lib_com/nelp.c @@ -121,11 +121,7 @@ void generate_nelp_excitation( for ( j = 0; j < len; j++ ) { -#ifdef FIX_970_USAN_IN_NELP_SEED tmp[j] = ( ( *seed ) = (int16_t) ( 521 * ( *seed ) + 259 ) ) / PCM16_TO_FLT_FAC; -#else - tmp[j] = ( ( *seed ) = 521 * ( *seed ) + 259 ) / PCM16_TO_FLT_FAC; -#endif tmp1[j] = ABSVAL( tmp[j] ); I[j] = j; } diff --git a/lib_com/options.h b/lib_com/options.h index d138f8d68..3fb4652ab 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -187,7 +187,6 @@ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ #define NON_BE_FIX_EVS_USAN_ERR_IN_WAVEADJUST /* FhG: address issue 1037 */ #define NONBE_FIX_1056_ISM_RATE_SWITCH /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */ -#define FIX_970_USAN_IN_NELP_SEED #define NONBE_FIX_1075 /* FhG: fix segfault for bitrate switching + BINAURAL_ROOM_REVERB output in MC */ #define NON_BE_FIX_1041_USE_OLD_CNG_LSPS_IF_NONSTAB /* FhG: fix bug in TD MDCT-Stereo concealment */ #define FIX_1044_ISM_REND_MEMORY /* VA: issue 1044: Lower the memory of the ISM renderer handle. */ -- GitLab From 519789f05ff810901b8e9fbe2df6060f1edf1999 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 19:44:40 +0200 Subject: [PATCH 03/14] [cleanup] accept FIX_1044_ISM_REND_MEMORY --- lib_com/options.h | 1 - lib_dec/ivas_stat_dec.h | 8 -------- 2 files changed, 9 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 3fb4652ab..735b7ddbd 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -189,7 +189,6 @@ #define NONBE_FIX_1056_ISM_RATE_SWITCH /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */ #define NONBE_FIX_1075 /* FhG: fix segfault for bitrate switching + BINAURAL_ROOM_REVERB output in MC */ #define NON_BE_FIX_1041_USE_OLD_CNG_LSPS_IF_NONSTAB /* FhG: fix bug in TD MDCT-Stereo concealment */ -#define FIX_1044_ISM_REND_MEMORY /* VA: issue 1044: Lower the memory of the ISM renderer handle. */ #define NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */ #define FIX_1060_USAN_ARRAY_BOUNDS /* FhG: issue 1060: USAN array-bounds errors */ #define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index b260a48e4..bbcc17568 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -805,18 +805,10 @@ typedef struct ivas_lfe_dec_data_structure typedef struct renderer_struct { -#ifdef FIX_1044_ISM_REND_MEMORY float prev_gains[MAX_NUM_OBJECTS][MAX_OUTPUT_CHANNELS]; -#else - float prev_gains[MAX_CICP_CHANNELS - 1][MAX_OUTPUT_CHANNELS]; -#endif float *interpolator; int16_t interpolator_length; -#ifdef FIX_1044_ISM_REND_MEMORY float gains[MAX_NUM_OBJECTS][MAX_OUTPUT_CHANNELS]; -#else - float gains[MAX_CICP_CHANNELS - 1][MAX_OUTPUT_CHANNELS]; -#endif } ISM_RENDERER_DATA, *ISM_RENDERER_HANDLE; -- GitLab From b8b8063473c997edf7d6387ffa57dc95e2b57799 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 19:46:19 +0200 Subject: [PATCH 04/14] [cleanup] accept FIX_1060_USAN_ARRAY_BOUNDS --- lib_com/options.h | 1 - lib_dec/ivas_dirac_dec.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 735b7ddbd..6a1cab386 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -190,7 +190,6 @@ #define NONBE_FIX_1075 /* FhG: fix segfault for bitrate switching + BINAURAL_ROOM_REVERB output in MC */ #define NON_BE_FIX_1041_USE_OLD_CNG_LSPS_IF_NONSTAB /* FhG: fix bug in TD MDCT-Stereo concealment */ #define NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */ -#define FIX_1060_USAN_ARRAY_BOUNDS /* FhG: issue 1060: USAN array-bounds errors */ #define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ #define NONBE_FIX_1045_ISM_BITRATE_SWITCHING /* Eri: Difference between ROM/File HRTF in ISM bitrate switching */ #define NONBE_FIX_984_OMASA_EXT_OUTPUT /* Nok: issue 1497 - porting OMASA EXT MR */ diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index cc0a8e971..ee4dece36 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2286,14 +2286,8 @@ void ivas_dirac_dec_render_sf( for ( l = 0; l < hSpatParamRendCom->num_freq_bands; l++ ) { -#ifdef FIX_1060_USAN_ARRAY_BOUNDS Cldfb_RealBuffer[j2][k][l] += g * *( tc_re++ ); Cldfb_ImagBuffer[j2][k][l] += g * *( tc_im++ ); -#else - - Cldfb_RealBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += g * *( tc_re++ ); - Cldfb_ImagBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += g * *( tc_im++ ); -#endif } w1 += hSpatParamRendCom->num_freq_bands; } -- GitLab From 31ddfe67c02d0ef3c3f0e0861939fe1bac790d7b Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 19:48:00 +0200 Subject: [PATCH 05/14] [cleanup] accept NON_BE_FIX_1041_USE_OLD_CNG_LSPS_IF_NONSTAB --- lib_com/options.h | 1 - lib_dec/er_dec_tcx.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 6a1cab386..eeede3692 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -188,7 +188,6 @@ #define NON_BE_FIX_EVS_USAN_ERR_IN_WAVEADJUST /* FhG: address issue 1037 */ #define NONBE_FIX_1056_ISM_RATE_SWITCH /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */ #define NONBE_FIX_1075 /* FhG: fix segfault for bitrate switching + BINAURAL_ROOM_REVERB output in MC */ -#define NON_BE_FIX_1041_USE_OLD_CNG_LSPS_IF_NONSTAB /* FhG: fix bug in TD MDCT-Stereo concealment */ #define NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */ #define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ #define NONBE_FIX_1045_ISM_BITRATE_SWITCHING /* Eri: Difference between ROM/File HRTF in ISM bitrate switching */ diff --git a/lib_dec/er_dec_tcx.c b/lib_dec/er_dec_tcx.c index 0e0f3f469..18e0fb96e 100644 --- a/lib_dec/er_dec_tcx.c +++ b/lib_dec/er_dec_tcx.c @@ -567,11 +567,7 @@ void con_tcx( alpha_inv = 1.0f - alpha_delayed; -#ifdef NON_BE_FIX_1041_USE_OLD_CNG_LSPS_IF_NONSTAB a2lsp_stab( A_local, lsp_local, st->lspold_cng ); -#else - a2lsp_stab( A_local, lsp_local, lsp_local ); -#endif for ( i = 0; i < M; i++ ) { -- GitLab From 949815b26cd39659546db60be0140424b88ac569 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 19:49:21 +0200 Subject: [PATCH 06/14] [cleanup] accept NONBE_FIX_1075 --- lib_com/options.h | 1 - lib_dec/ivas_init_dec.c | 4 ---- lib_dec/ivas_mct_dec.c | 2 -- lib_dec/ivas_omasa_dec.c | 2 -- lib_dec/ivas_sba_dec.c | 2 -- 5 files changed, 11 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index eeede3692..a4512092c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -187,7 +187,6 @@ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ #define NON_BE_FIX_EVS_USAN_ERR_IN_WAVEADJUST /* FhG: address issue 1037 */ #define NONBE_FIX_1056_ISM_RATE_SWITCH /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */ -#define NONBE_FIX_1075 /* FhG: fix segfault for bitrate switching + BINAURAL_ROOM_REVERB output in MC */ #define NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */ #define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ #define NONBE_FIX_1045_ISM_BITRATE_SWITCHING /* Eri: Difference between ROM/File HRTF in ISM bitrate switching */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 0036ac355..cf23062c8 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2038,7 +2038,6 @@ ivas_error ivas_init_decoder( { return error; } -#ifdef NONBE_FIX_1075 if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) @@ -2046,7 +2045,6 @@ ivas_error ivas_init_decoder( return error; } } -#endif /* Allocate 'hIsmRendererData' handle and memory for delay buffer within 'hMasaIsmData' */ if ( ( error = ivas_omasa_separate_object_renderer_open( st_ivas ) ) != IVAS_ERR_OK ) @@ -2117,7 +2115,6 @@ ivas_error ivas_init_decoder( { return error; } -#ifdef NONBE_FIX_1075 if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) @@ -2126,7 +2123,6 @@ ivas_error ivas_init_decoder( } } -#endif } } diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 1e66b5fd8..b85311db2 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1231,7 +1231,6 @@ static ivas_error ivas_mc_dec_reconfig( { return error; } -#ifdef NONBE_FIX_1075 if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) @@ -1239,7 +1238,6 @@ static ivas_error ivas_mc_dec_reconfig( return error; } } -#endif if ( st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { diff --git a/lib_dec/ivas_omasa_dec.c b/lib_dec/ivas_omasa_dec.c index 103851f1f..e2a4e56f6 100644 --- a/lib_dec/ivas_omasa_dec.c +++ b/lib_dec/ivas_omasa_dec.c @@ -437,7 +437,6 @@ ivas_error ivas_omasa_dec_config( { return error; } -#ifdef NONBE_FIX_1075 if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) @@ -445,7 +444,6 @@ ivas_error ivas_omasa_dec_config( return error; } } -#endif } /* Allocate 'hIsmRendererData' handle and memory for delay buffer within 'hMasaIsmData' */ diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index f28e8df97..263ea8cd8 100644 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -486,7 +486,6 @@ ivas_error ivas_sba_dec_reconfigure( return error; } } -#ifdef NONBE_FIX_1075 if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) @@ -494,7 +493,6 @@ ivas_error ivas_sba_dec_reconfigure( return error; } } -#endif } /* Allocate memory for OSBA delay buffer */ -- GitLab From 5e5c5e2f2c5870ddfcc6e78eab7c2edfcbaa4653 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 19:50:44 +0200 Subject: [PATCH 07/14] [cleanup] accept NON_BE_FIX_EVS_USAN_ERR_IN_WAVEADJUST --- lib_com/options.h | 1 - lib_dec/waveadjust_fec_dec.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index a4512092c..e558ede61 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -185,7 +185,6 @@ #define FIX_WARNING_RENDER_CONFIG /* Orange: fix warning on windows build */ #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on )*/ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ -#define NON_BE_FIX_EVS_USAN_ERR_IN_WAVEADJUST /* FhG: address issue 1037 */ #define NONBE_FIX_1056_ISM_RATE_SWITCH /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */ #define NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */ #define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ diff --git a/lib_dec/waveadjust_fec_dec.c b/lib_dec/waveadjust_fec_dec.c index 9d41dab6d..1edae90e4 100644 --- a/lib_dec/waveadjust_fec_dec.c +++ b/lib_dec/waveadjust_fec_dec.c @@ -743,13 +743,9 @@ void concealment_decode( for ( i = 0; i < hPlcInfo->L_frameTCX; i++ ) { -#ifdef NON_BE_FIX_EVS_USAN_ERR_IN_WAVEADJUST int16_t rnd; rnd = own_random( seed ); sign = ( rnd >= 0 ) - ( rnd < 0 ); -#else - sign = ( ( own_random( seed ) >> 15 ) << 1 ) + 1; -#endif invkoef[i] *= sign; } } -- GitLab From e35bb52e350b278af0d16c68a5524e39348c60fd Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 19:53:33 +0200 Subject: [PATCH 08/14] [cleanup] accept NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM --- lib_com/options.h | 3 --- lib_dec/ivas_binRenderer_internal.c | 10 ---------- 2 files changed, 13 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index e558ede61..7d179bd1c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -177,9 +177,6 @@ /* #################### Start BASOP porting switches ############################ */ -#define NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM /* FhG: issue 1058: do not initialize EFAP when IntSetup is HOA3 */ -#ifdef NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM -#endif #define USE_NEW_HRTF_BINARY_FILE_FORMAT /* Orange: to activate when decided to change the hrtf binary file format */ #define FIX_WARNING_RENDER_CONFIG /* Orange: fix warning on windows build */ diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 2c8468317..fd7c313db 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -1209,9 +1209,7 @@ ivas_error ivas_binRenderer_open( } } } -#ifdef NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM if ( hBinRenderer->nInChannels != HOA3_CHANNELS ) -#endif { for ( chIdx = 0; chIdx < BINAURAL_CHANNELS; chIdx++ ) { @@ -1230,17 +1228,9 @@ ivas_error ivas_binRenderer_open( hBinRenderer->hEFAPdata = NULL; -#ifdef NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM if ( hBinRenderer->hReverb != NULL && hBinRenderer->nInChannels != HOA3_CHANNELS ) -#else - if ( hBinRenderer->hReverb != NULL ) -#endif { -#ifdef NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM if ( hBinRenderer->hInputSetup->is_loudspeaker_setup == 0 ) -#else - if ( hBinRenderer->hInputSetup->is_loudspeaker_setup == 0 && hBinRenderer->nInChannels != HOA3_CHANNELS ) -#endif { for ( k = 0; k < 11; k++ ) { -- GitLab From 6b4bbc3c251f6cb8855f18ac65145cda70a27ad7 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 19:54:54 +0200 Subject: [PATCH 09/14] [cleanup] accept NONBE_FIX_1056_ISM_RATE_SWITCH --- lib_com/options.h | 1 - lib_dec/ivas_ism_dec.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 7d179bd1c..6f37cdd2f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -182,7 +182,6 @@ #define FIX_WARNING_RENDER_CONFIG /* Orange: fix warning on windows build */ #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on )*/ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ -#define NONBE_FIX_1056_ISM_RATE_SWITCH /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */ #define NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */ #define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ #define NONBE_FIX_1045_ISM_BITRATE_SWITCHING /* Eri: Difference between ROM/File HRTF in ISM bitrate switching */ diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 91babeda3..743700f48 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -126,12 +126,8 @@ static ivas_error ivas_ism_bitrate_switching_dec( { /* transfer subframe info from DirAC or ParamMC to central tc buffer */ -#ifdef NONBE_FIX_1056_ISM_RATE_SWITCH /* only do this if we are not having done everything already in the TC decoding part and having only played out from the TC buffer */ if ( last_ism_mode == ISM_MODE_PARAM && st_ivas->hSpatParamRendCom != NULL && st_ivas->hTcBuffer->tc_buffer_mode != TC_BUFFER_MODE_BUFFER ) -#else - if ( last_ism_mode == ISM_MODE_PARAM && st_ivas->hSpatParamRendCom != NULL && ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE ) ) -#endif { st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpatParamRendCom->nb_subframes; st_ivas->hTcBuffer->subframes_rendered = st_ivas->hSpatParamRendCom->subframes_rendered; -- GitLab From 1fcc67631b9544b435da6edaf3d3834d633da9a8 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 20:01:45 +0200 Subject: [PATCH 10/14] [cleanup] accept NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG --- lib_com/options.h | 1 - lib_enc/ivas_stereo_dft_enc_itd.c | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 6f37cdd2f..9a1aa92ab 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -182,7 +182,6 @@ #define FIX_WARNING_RENDER_CONFIG /* Orange: fix warning on windows build */ #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on )*/ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ -#define NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */ #define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ #define NONBE_FIX_1045_ISM_BITRATE_SWITCHING /* Eri: Difference between ROM/File HRTF in ISM bitrate switching */ #define NONBE_FIX_984_OMASA_EXT_OUTPUT /* Nok: issue 1497 - porting OMASA EXT MR */ diff --git a/lib_enc/ivas_stereo_dft_enc_itd.c b/lib_enc/ivas_stereo_dft_enc_itd.c index 980a46554..ba3db0f5c 100644 --- a/lib_enc/ivas_stereo_dft_enc_itd.c +++ b/lib_enc/ivas_stereo_dft_enc_itd.c @@ -643,9 +643,7 @@ void stereo_dft_enc_compute_itd( const float *dft_trigo32k; float trigo_enc[STEREO_DFT_N_32k_ENC / 2 + 1]; float cng_xcorr_filt; -#ifdef NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG float sum_nrg_delta; -#endif int16_t prev_itd_max; int16_t itd_max_flip; @@ -731,11 +729,6 @@ void stereo_dft_enc_compute_itd( grand_dot_prod_img += xcorr[2 * i + 1]; xcorr_abs[i] = sqrtf( xcorr[2 * i] * xcorr[2 * i] + xcorr[2 * i + 1] * xcorr[2 * i + 1] ); -#ifndef NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG - /* VM: prod_LL tends to overflow, better to replace with sum(log(prod_L)) and retrain the classifier */ - prod_LL = prod_L; - prod_RR = prod_R; -#endif if ( j == SFM_PROD_GRP || i == NFFT_mid - 1 ) { prod_L = max( FLT_MIN, prod_L ); @@ -789,7 +782,6 @@ void stereo_dft_enc_compute_itd( hStereoClassif->unclr_fv[E_gainIPD] = g_IPD; hStereoClassif->xtalk_fv[E_gainIPD] = g_IPD; -#ifdef NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG if ( sum_nrg_L >= sum_nrg_R ) { sum_nrg_delta = max( sum_nrg_L - sum_nrg_R, 1.0f ); @@ -799,9 +791,6 @@ void stereo_dft_enc_compute_itd( sum_nrg_delta = min( sum_nrg_L - sum_nrg_R, -1.0f ); } angle_rot = fabsf( atanf( 2.0f * ( grand_dot_prod_real ) / sum_nrg_delta ) ); -#else - angle_rot = fabsf( atanf( 2.0f * ( grand_dot_prod_real ) / ( sum_nrg_L - sum_nrg_R + 1.0f ) ) ); -#endif hStereoClassif->unclr_fv[E_angle_rot] = angle_rot; hStereoClassif->xtalk_fv[E_angle_rot] = angle_rot; -- GitLab From 131210c863f7f05116086304f41eb8fb5ce46903 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 20:05:04 +0200 Subject: [PATCH 11/14] [cleanup] accept NONBE_FIX_1045_ISM_BITRATE_SWITCHING --- lib_com/options.h | 1 - lib_dec/ivas_ism_dec.c | 13 ------------- lib_dec/ivas_mct_dec.c | 8 -------- lib_dec/ivas_omasa_dec.c | 9 --------- lib_dec/ivas_sba_dec.c | 8 -------- 5 files changed, 39 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 9a1aa92ab..45f10d405 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -183,7 +183,6 @@ #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on )*/ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ #define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ -#define NONBE_FIX_1045_ISM_BITRATE_SWITCHING /* Eri: Difference between ROM/File HRTF in ISM bitrate switching */ #define NONBE_FIX_984_OMASA_EXT_OUTPUT /* Nok: issue 1497 - porting OMASA EXT MR */ #define NONBE_FIX_1065_ISM_MD_HANDLE /* VA: issue 1065: Allocate only the necessary number of ISM MD decoder handles. */ #define NONBE_FIX_1028_1DB_TCX_LEVEL_DROP /* VA: Harmonize the logic setting LP weighting factor between TCX encoder and TCX decoder */ diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 743700f48..1646206fa 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -247,25 +247,12 @@ static ivas_error ivas_ism_bitrate_switching_dec( } /* Close the TD Binaural renderer */ -#ifdef NONBE_FIX_1045_ISM_BITRATE_SWITCHING ivas_td_binaural_close( &st_ivas->hBinRendererTd ); if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { ivas_reverb_close( &st_ivas->hReverb ); } -#else - if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE ) - { - ivas_td_binaural_close( &st_ivas->hBinRendererTd ); - st_ivas->hHrtfTD = NULL; - - if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) - { - ivas_reverb_close( &st_ivas->hReverb ); - } - } -#endif } else { diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index b85311db2..40cb9e496 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1198,15 +1198,7 @@ static ivas_error ivas_mc_dec_reconfig( if ( st_ivas->hBinRendererTd != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD ) ) { -#ifdef NONBE_FIX_1045_ISM_BITRATE_SWITCHING ivas_td_binaural_close( &st_ivas->hBinRendererTd ); -#else - if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE ) - { - ivas_td_binaural_close( &st_ivas->hBinRendererTd ); - st_ivas->hHrtfTD = NULL; - } -#endif } if ( st_ivas->hDiracDecBin[0] != NULL ) diff --git a/lib_dec/ivas_omasa_dec.c b/lib_dec/ivas_omasa_dec.c index e2a4e56f6..16b06396e 100644 --- a/lib_dec/ivas_omasa_dec.c +++ b/lib_dec/ivas_omasa_dec.c @@ -454,20 +454,11 @@ ivas_error ivas_omasa_dec_config( } else { -#ifdef NONBE_FIX_1045_ISM_BITRATE_SWITCHING if ( st_ivas->hBinRendererTd != NULL ) { /* TD renderer handle */ ivas_td_binaural_close( &st_ivas->hBinRendererTd ); } -#else - if ( st_ivas->hBinRendererTd != NULL && st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE ) - { - /* TD renderer handle */ - ivas_td_binaural_close( &st_ivas->hBinRendererTd ); - st_ivas->hHrtfTD = NULL; - } -#endif /* ISM renderer handle + ISM data handle */ ivas_omasa_separate_object_renderer_close( st_ivas ); } diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 263ea8cd8..75c97527b 100644 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -513,15 +513,7 @@ ivas_error ivas_sba_dec_reconfigure( /* Time Domain binaural renderer handle */ if ( st_ivas->hBinRendererTd != NULL ) { -#ifdef NONBE_FIX_1045_ISM_BITRATE_SWITCHING ivas_td_binaural_close( &st_ivas->hBinRendererTd ); -#else - if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE ) - { - ivas_td_binaural_close( &st_ivas->hBinRendererTd ); - st_ivas->hHrtfTD = NULL; - } -#endif } nchan_transport_old += st_ivas->nchan_ism; st_ivas->ism_mode = ISM_MODE_NONE; -- GitLab From 4e7b6b6bc4cd530ecc37eb7a1ea1bbcad6be4bb2 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 20:08:49 +0200 Subject: [PATCH 12/14] [cleanup] accept NONBE_FIX_1065_ISM_MD_HANDLE --- lib_com/ivas_prot.h | 6 ------ lib_com/options.h | 1 - lib_dec/ivas_init_dec.c | 8 -------- lib_dec/ivas_ism_metadata_dec.c | 36 --------------------------------- lib_dec/ivas_omasa_dec.c | 17 ---------------- 5 files changed, 68 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 012ba3fb2..2886480ff 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -999,20 +999,14 @@ ivas_error ivas_ism_metadata_enc_create( ivas_error ivas_ism_metadata_dec_create( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE const int16_t n_ISms, /* i : number of separately coded objects */ -#else - const int16_t n_ISms, /* i : number of objects */ -#endif int32_t element_brate_tmp[] /* o : element bitrate per object */ ); -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE void ivas_ism_reset_metadata_handle_dec( ISM_METADATA_HANDLE hIsmMeta /* i/o: ISM metadata handle */ ); -#endif ivas_error ivas_ism_enc( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ float *data[], /* i : input signal [channels][samples] */ diff --git a/lib_com/options.h b/lib_com/options.h index 45f10d405..f7b1dcc5b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -184,7 +184,6 @@ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ #define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ #define NONBE_FIX_984_OMASA_EXT_OUTPUT /* Nok: issue 1497 - porting OMASA EXT MR */ -#define NONBE_FIX_1065_ISM_MD_HANDLE /* VA: issue 1065: Allocate only the necessary number of ISM MD decoder handles. */ #define NONBE_FIX_1028_1DB_TCX_LEVEL_DROP /* VA: Harmonize the logic setting LP weighting factor between TCX encoder and TCX decoder */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index cf23062c8..eb0d92218 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1272,11 +1272,7 @@ ivas_error ivas_init_decoder( } } -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE if ( ( error = ivas_ism_metadata_dec_create( st_ivas, st_ivas->nchan_ism, element_brate_tmp ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_ism_metadata_dec_create( st_ivas, st_ivas->nSCE, element_brate_tmp ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -1607,7 +1603,6 @@ ivas_error ivas_init_decoder( } reset_indices_dec( st_ivas->hSCE[0]->hCoreCoder[0] ); -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE if ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { if ( ( error = ivas_ism_metadata_dec_create( st_ivas, st_ivas->nchan_ism, NULL ) ) != IVAS_ERR_OK ) @@ -1617,14 +1612,11 @@ ivas_error ivas_init_decoder( } else { -#endif if ( ( error = ivas_ism_metadata_dec_create( st_ivas, 1, NULL ) ) != IVAS_ERR_OK ) { return error; } -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE } -#endif } else if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC ) { diff --git a/lib_dec/ivas_ism_metadata_dec.c b/lib_dec/ivas_ism_metadata_dec.c index 6331b191d..5e7e97d8c 100644 --- a/lib_dec/ivas_ism_metadata_dec.c +++ b/lib_dec/ivas_ism_metadata_dec.c @@ -642,7 +642,6 @@ ivas_error ivas_ism_metadata_dec( return IVAS_ERR_OK; } -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE /*-------------------------------------------------------------------* * ivas_ism_reset_metadata_handle_dec() @@ -675,7 +674,6 @@ void ivas_ism_reset_metadata_handle_dec( return; } -#endif /*------------------------------------------------------------------------- * ivas_ism_metadata_dec_create() @@ -685,11 +683,7 @@ void ivas_ism_reset_metadata_handle_dec( ivas_error ivas_ism_metadata_dec_create( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE const int16_t n_ISms, /* i : number of separately coded objects */ -#else - const int16_t n_ISms, /* i : number of objects */ -#endif int32_t element_brate_tmp[] /* o : element bitrate per object */ ) { @@ -697,48 +691,19 @@ ivas_error ivas_ism_metadata_dec_create( ivas_error error; /* allocate ISM metadata handles */ -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE for ( ch = 0; ch < n_ISms; ch++ ) -#else - for ( ch = 0; ch < MAX_NUM_OBJECTS; ch++ ) -#endif { -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE if ( st_ivas->hIsmMetaData[ch] == NULL ) /* note: the handle can be allocated in OMASA bitrate switching from ISM_MASA_MODE_xxx_ONE_OBJ to ISM_MASA_MODE_DISC mode for 'ch==0' */ { -#endif if ( ( st_ivas->hIsmMetaData[ch] = (ISM_METADATA_HANDLE) malloc( sizeof( ISM_METADATA_FRAME ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ISM MetaData\n" ) ); } -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE } -#endif -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE ivas_ism_reset_metadata_handle_dec( st_ivas->hIsmMetaData[ch] ); -#else - st_ivas->hIsmMetaData[ch]->last_ism_metadata_flag = 0; - st_ivas->hIsmMetaData[ch]->position_angle.last_angle1_idx = 0; - st_ivas->hIsmMetaData[ch]->position_angle.last_angle2_idx = 1 << ( ISM_ELEVATION_NBITS - 1 ); - st_ivas->hIsmMetaData[ch]->orientation_angle.last_angle1_idx = 0; - st_ivas->hIsmMetaData[ch]->orientation_angle.last_angle2_idx = 1 << ( ISM_ELEVATION_NBITS - 1 ); - st_ivas->hIsmMetaData[ch]->last_radius_idx = 8; /* Init to radius 1.0 */ - - st_ivas->hIsmMetaData[ch]->last_true_azimuth = 0; - st_ivas->hIsmMetaData[ch]->last_true_elevation = 0; - st_ivas->hIsmMetaData[ch]->last_azimuth = 0; - st_ivas->hIsmMetaData[ch]->last_elevation = 0; - - st_ivas->hIsmMetaData[ch]->ism_imp = -1; - st_ivas->hIsmMetaData[ch]->ism_md_null_flag = 0; - st_ivas->hIsmMetaData[ch]->ism_md_lowrate_flag = 0; - - ivas_ism_reset_metadata( st_ivas->hIsmMetaData[ch] ); -#endif } -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE /* sanity freeing - it can happen only in reconfiguration when a smaller number of handles than before is requested */ for ( ; ch < MAX_NUM_OBJECTS; ch++ ) { @@ -749,7 +714,6 @@ ivas_error ivas_ism_metadata_dec_create( } } -#endif if ( element_brate_tmp != NULL ) { if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, n_ISms, n_ISms, NULL, 0, NULL, NULL, element_brate_tmp, NULL, NULL, 0 ) ) != IVAS_ERR_OK ) diff --git a/lib_dec/ivas_omasa_dec.c b/lib_dec/ivas_omasa_dec.c index 16b06396e..8ea139fa8 100644 --- a/lib_dec/ivas_omasa_dec.c +++ b/lib_dec/ivas_omasa_dec.c @@ -297,7 +297,6 @@ ivas_error ivas_omasa_dec_config( if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { /* the full number of hIsmMetaData are needed for EXT output */ -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE if ( st_ivas->hIsmMetaData[0] == NULL ) { if ( ( error = ivas_ism_metadata_dec_create( st_ivas, st_ivas->nchan_ism, NULL ) ) != IVAS_ERR_OK ) @@ -312,16 +311,6 @@ ivas_error ivas_omasa_dec_config( ivas_ism_reset_metadata_handle_dec( st_ivas->hIsmMetaData[k] ); } } -#else - n_MD = st_ivas->nchan_ism; - ivas_ism_metadata_close( st_ivas->hIsmMetaData, 0 ); - if ( ( error = ivas_ism_metadata_dec_create( st_ivas, st_ivas->nchan_ism, NULL ) ) != IVAS_ERR_OK ) - { - return error; - } - - ivas_ism_metadata_close( st_ivas->hIsmMetaData, n_MD ); -#endif } else { @@ -336,21 +325,15 @@ ivas_error ivas_omasa_dec_config( return error; } } -#ifdef NONBE_FIX_1065_ISM_MD_HANDLE else { ivas_ism_reset_metadata_handle_dec( st_ivas->hIsmMetaData[0] ); } -#endif } else if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC ) { n_MD = st_ivas->nchan_ism; -#ifndef NONBE_FIX_1065_ISM_MD_HANDLE - - ivas_ism_metadata_close( st_ivas->hIsmMetaData, 0 ); -#endif if ( ( error = ivas_ism_metadata_dec_create( st_ivas, st_ivas->nchan_ism, NULL ) ) != IVAS_ERR_OK ) { return error; -- GitLab From 18da377ba4c58a096029e7ac44a24e9c19c589df Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 20:13:55 +0200 Subject: [PATCH 13/14] [cleanup] remove leftovers from SPLIT_REND_WITH_HEAD_ROT --- lib_dec/lib_dec.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index ae2c8b512..388a59254 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2295,17 +2295,9 @@ ivas_error IVAS_DEC_GetDelay( st_ivas = hIvasDec->st_ivas; hDecoderConfig = st_ivas->hDecoderConfig; #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT -#ifdef SPLIT_REND_WITH_HEAD_ROT nSamples[1] = NS2SA( hDecoderConfig->output_Fs, get_delay( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbSynDec[0], hDecoderConfig->output_config ) ); #else - nSamples[1] = NS2SA( hDecoderConfig->output_Fs, get_delay( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbSynDec[0], hDecoderConfig->output_config ) ); -#endif -#else -#ifdef SPLIT_REND_WITH_HEAD_ROT nSamples[1] = NS2SA( hDecoderConfig->output_Fs, get_delay( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbAnaDec[0], hDecoderConfig->output_config ) ); -#else - nSamples[1] = NS2SA( hDecoderConfig->output_Fs, get_delay( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbAnaDec[0], hDecoderConfig->output_config ) ); -#endif #endif nSamples[2] = (int16_t) roundf( (float) st_ivas->binaural_latency_ns * hDecoderConfig->output_Fs / 1000000000.f ); nSamples[0] = nSamples[1] + nSamples[2]; -- GitLab From ab44319d982eb340a5045fb60faa1129e7a4a865 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 4 Aug 2025 20:17:56 +0200 Subject: [PATCH 14/14] formatting --- lib_com/options.h | 1 - lib_dec/ivas_init_dec.c | 1 - lib_dec/ivas_ism_dec.c | 2 +- lib_dec/ivas_ism_metadata_dec.c | 4 ++-- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index f7b1dcc5b..0c00d7504 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -177,7 +177,6 @@ /* #################### Start BASOP porting switches ############################ */ - #define USE_NEW_HRTF_BINARY_FILE_FORMAT /* Orange: to activate when decided to change the hrtf binary file format */ #define FIX_WARNING_RENDER_CONFIG /* Orange: fix warning on windows build */ #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on )*/ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index eb0d92218..a03acffe1 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2114,7 +2114,6 @@ ivas_error ivas_init_decoder( return error; } } - } } diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 1646206fa..269dba638 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -125,7 +125,7 @@ static ivas_error ivas_ism_bitrate_switching_dec( } { -/* transfer subframe info from DirAC or ParamMC to central tc buffer */ + /* transfer subframe info from DirAC or ParamMC to central tc buffer */ /* only do this if we are not having done everything already in the TC decoding part and having only played out from the TC buffer */ if ( last_ism_mode == ISM_MODE_PARAM && st_ivas->hSpatParamRendCom != NULL && st_ivas->hTcBuffer->tc_buffer_mode != TC_BUFFER_MODE_BUFFER ) { diff --git a/lib_dec/ivas_ism_metadata_dec.c b/lib_dec/ivas_ism_metadata_dec.c index 5e7e97d8c..5a540f626 100644 --- a/lib_dec/ivas_ism_metadata_dec.c +++ b/lib_dec/ivas_ism_metadata_dec.c @@ -682,8 +682,8 @@ void ivas_ism_reset_metadata_handle_dec( *-------------------------------------------------------------------------*/ ivas_error ivas_ism_metadata_dec_create( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - const int16_t n_ISms, /* i : number of separately coded objects */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const int16_t n_ISms, /* i : number of separately coded objects */ int32_t element_brate_tmp[] /* o : element bitrate per object */ ) { -- GitLab