From 89a12fbd22924072bed9fb8c86f66bfa9ccafb2b Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 11 Aug 2025 13:06:43 +0200 Subject: [PATCH 1/4] [cleanup] accept NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT --- lib_com/options.h | 1 - lib_dec/dec_tcx.c | 8 -------- 2 files changed, 9 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 3943d1577d..2df8c52626 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -173,7 +173,6 @@ #define NONBE_1244_FIX_SWB_BWE_MEMORY /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ -#define NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT /* FhG: apply correct TCX5 grouping/interleaving when input_fs != output_fs */ #define NONBE_1339_FIXOSBA_EXT_LOUDNESS /* FhG: issue 1339: apply scaling with EXT output in OSBA high-BR mode */ #define NONBE_1352_HARMONIZE_OSBA_LOUDNESS /* FhG: do not scale OSBA inputs by 0.5 any more */ #define NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Nokia: issue 1339: Apply scaling to the object-part of OMASA for binaural rendering in IVAS_rend. */ diff --git a/lib_dec/dec_tcx.c b/lib_dec/dec_tcx.c index 0fb28ddb2d..23dd28556d 100644 --- a/lib_dec/dec_tcx.c +++ b/lib_dec/dec_tcx.c @@ -1506,11 +1506,7 @@ void decoder_tcx_tns( hTcxCfg->tcx_last_overlap_mode = hTcxCfg->tcx_curr_overlap_mode; } -#ifdef NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT if ( ( hTcxCfg->fIsTNSAllowed && fUseTns != 0 && bfi != 1 && whitenedDomain ) || ( L_spec > L_frameTCX ) ) -#else - if ( ( hTcxCfg->fIsTNSAllowed && fUseTns != 0 && bfi != 1 ) || ( L_spec > L_frameTCX ) ) -#endif { L = L_spec; } @@ -1552,11 +1548,7 @@ void decoder_tcx_tns( if ( ( L_frame == st->L_frame >> 1 ) && st->tcxonly && isTCX5 ) { -#ifdef NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT if ( st->element_mode == EVS_MONO || ( L_spec < L_frameTCX && !whitenedDomain ) ) /* todo: this is temporary to maintain EVS BE, this is a bug and should be fixed also for EVS (see issue 13) */ -#else - if ( st->element_mode == EVS_MONO || L_spec < L_frameTCX ) /* todo: this is temporary to maintain EVS BE, this is a bug and should be fixed also for EVS (see issue 13) */ -#endif { tcx5TnsUngrouping( L_frameTCX >> 1, hTcxCfg->tnsConfig[0][0].iFilterBorders[0] >> 1, x, DEC ); } -- GitLab From 097c0626744a4913d4d68cbe7c01cc03c69a0c88 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 11 Aug 2025 13:07:47 +0200 Subject: [PATCH 2/4] [cleanup] accept NONBE_1352_HARMONIZE_OSBA_LOUDNESS --- apps/renderer.c | 11 ----------- lib_com/options.h | 1 - lib_dec/ivas_jbm_dec.c | 10 ---------- lib_dec/ivas_osba_dec.c | 23 ----------------------- 4 files changed, 45 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 27d19d7adf..bb4ea21271 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -3514,20 +3514,9 @@ static void parseCombinedFormatInput( inConfig->numAmbisonicsBuses = 1; inConfig->ambisonicsBuses[0].audioConfig = audioConfig; inConfig->ambisonicsBuses[0].inputChannelIndex = inConfig->numAudioObjects; -#ifdef NONBE_1352_HARMONIZE_OSBA_LOUDNESS inConfig->ambisonicsBuses[0].gain_dB = 0.f; -#else - inConfig->ambisonicsBuses[0].gain_dB = -6.f; -#endif *configString += 4; -#ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS - /* Modify input gain for objects too */ - for ( int16_t i = 0; i < inConfig->numAudioObjects; ++i ) - { - inConfig->audioObjects[i].gain_dB = -6.f; - } -#endif } else if ( audioConfig == IVAS_AUDIO_CONFIG_MASA1 || audioConfig == IVAS_AUDIO_CONFIG_MASA2 ) { diff --git a/lib_com/options.h b/lib_com/options.h index 2df8c52626..50ad2ca73c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -174,7 +174,6 @@ #define NONBE_1244_FIX_SWB_BWE_MEMORY /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ #define NONBE_1339_FIXOSBA_EXT_LOUDNESS /* FhG: issue 1339: apply scaling with EXT output in OSBA high-BR mode */ -#define NONBE_1352_HARMONIZE_OSBA_LOUDNESS /* FhG: do not scale OSBA inputs by 0.5 any more */ #define NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Nokia: issue 1339: Apply scaling to the object-part of OMASA for binaural rendering in IVAS_rend. */ #define NONBE_1362_FIX_OMASA_TO_MASA1_RENDERING /* Nokia: Fix OMASA to MASA1 rendering in IVAS_rend */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 317bb0057d..3caeb11603 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1110,12 +1110,6 @@ ivas_error ivas_jbm_dec_render( { mvr2r( p_tc[n], p_output[n], *nSamplesRendered ); } -#if defined( NONBE_1339_FIXOSBA_EXT_LOUDNESS ) && !defined( NONBE_1352_HARMONIZE_OSBA_LOUDNESS ) - for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ ) - { - v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered ); - } -#endif } else { @@ -1128,12 +1122,10 @@ ivas_error ivas_jbm_dec_render( else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); -#ifdef NONBE_1352_HARMONIZE_OSBA_LOUDNESS for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ ) { v_multc( p_output[n], 2.0f, p_output[n], *nSamplesRendered ); } -#endif } else { @@ -1156,12 +1148,10 @@ ivas_error ivas_jbm_dec_render( set_zero( p_output[n], *nSamplesRendered ); } } -#ifdef NONBE_1352_HARMONIZE_OSBA_LOUDNESS for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ ) { v_multc( p_output[n], 2.0f, p_output[n], *nSamplesRendered ); } -#endif } } else if ( st_ivas->ivas_format == MC_FORMAT ) diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index ab1b378ab6..4bb560f581 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -183,21 +183,11 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( for ( b = 0; b < num_cldfb_bands; b++ ) { st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] = -#ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS - ( 0.5f * st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] ) + - ( 0.5f * Cldfb_RealBuffer[b] ); -#else st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] + Cldfb_RealBuffer[b]; -#endif st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] = -#ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS - ( 0.5f * st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] ) + - ( 0.5f * Cldfb_ImagBuffer[b] ); -#else st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] + Cldfb_ImagBuffer[b]; -#endif } } } @@ -214,11 +204,7 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( int16_t i; for ( i = 0; i < nSamplesAsked; i++ ) { -#ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS - output_f[n][i] = 0.5f * output_f[channel_offset + n][i] + 0.5f * p_sepobj[n][i]; -#else output_f[n][i] = output_f[channel_offset + n][i] + p_sepobj[n][i]; -#endif } } } @@ -308,9 +294,6 @@ ivas_error ivas_osba_render_sf( v_add( p_output[n], p_output_ism[n], p_output[n], *nSamplesRendered ); } -#ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS - v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered ); -#endif } return IVAS_ERR_OK; @@ -353,12 +336,6 @@ void ivas_osba_stereo_add_channels( } } -#ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS - for ( n = 0; n < nchan_out; n++ ) - { - v_multc( output_f[n], 0.5f, output_f[n], n_samples_to_render ); - } -#endif return; } -- GitLab From fafafdef50a120c08274902166b6d82aa3575a7b Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 11 Aug 2025 13:09:12 +0200 Subject: [PATCH 3/4] [cleanup] accept remnants of NONBE_1339_FIXOSBA_EXT_LOUDNESS --- lib_com/options.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 50ad2ca73c..597cbad5ce 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -173,7 +173,6 @@ #define NONBE_1244_FIX_SWB_BWE_MEMORY /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ -#define NONBE_1339_FIXOSBA_EXT_LOUDNESS /* FhG: issue 1339: apply scaling with EXT output in OSBA high-BR mode */ #define NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Nokia: issue 1339: Apply scaling to the object-part of OMASA for binaural rendering in IVAS_rend. */ #define NONBE_1362_FIX_OMASA_TO_MASA1_RENDERING /* Nokia: Fix OMASA to MASA1 rendering in IVAS_rend */ -- GitLab From d90d0cdff5038b4fe0ffd2039821c6f09e495fae Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 11 Aug 2025 13:11:29 +0200 Subject: [PATCH 4/4] formatting --- apps/renderer.c | 1 - lib_dec/ivas_osba_dec.c | 1 - 2 files changed, 2 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index bb4ea21271..5ad0f8eecc 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -3516,7 +3516,6 @@ static void parseCombinedFormatInput( inConfig->ambisonicsBuses[0].inputChannelIndex = inConfig->numAudioObjects; inConfig->ambisonicsBuses[0].gain_dB = 0.f; *configString += 4; - } else if ( audioConfig == IVAS_AUDIO_CONFIG_MASA1 || audioConfig == IVAS_AUDIO_CONFIG_MASA2 ) { diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 4bb560f581..17d0845204 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -293,7 +293,6 @@ ivas_error ivas_osba_render_sf( { v_add( p_output[n], p_output_ism[n], p_output[n], *nSamplesRendered ); } - } return IVAS_ERR_OK; -- GitLab