From b04222cff396b8f824e8d49e97bdbf574a5aebec Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 22 May 2025 10:15:20 +0900 Subject: [PATCH] Add NONBE_FIX_978_MC_TDREND_REVERB to enable reverb for TD rend with MC --- lib_com/options.h | 1 + lib_dec/ivas_init_dec.c | 4 ++++ lib_dec/ivas_ism_dec.c | 4 ++++ lib_dec/ivas_objectRenderer_internal.c | 8 ++++++++ 4 files changed, 17 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 23bacc0d5..783b8e51b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -219,6 +219,7 @@ #define FIX_ACCESS_WITHIN_NULL_STRUCT_MC_BW_SWITCHING /* FhG: fix usan error in MCT with bw swicthing */ #define NONBE_FIX_986_MC_BW_SWITCHING /* FhG: fix crash in bw and br switching with MC */ +#define NONBE_FIX_978_MC_TDREND_REVERB /* Eri : activate reverb for TDREND with headtracking */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 6cdbd760a..741a99c2a 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1940,7 +1940,11 @@ ivas_error ivas_init_decoder( return error; } +#ifdef NONBE_FIX_978_MC_TDREND_REVERB + if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#endif { if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_config, NULL, st_ivas->hBinRendererTd->HrFiltSet_p->lr_energy_and_iac, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 0a424c24c..15f5b22d5 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -199,7 +199,11 @@ static ivas_error ivas_ism_bitrate_switching_dec( { return error; } +#ifdef NONBE_FIX_978_MC_TDREND_REVERB + if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#endif { if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_config, NULL, st_ivas->hBinRendererTd->HrFiltSet_p->lr_energy_and_iac, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index a0e747afa..118edba2b 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -188,7 +188,11 @@ ivas_error ivas_td_binaural_renderer_sf( return error; } +#ifdef NONBE_FIX_978_MC_TDREND_REVERB + if ( st_ivas->hRenderConfig != NULL && st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( st_ivas->hRenderConfig != NULL && st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#endif { if ( ( error = ivas_reverb_process( st_ivas->hReverb, st_ivas->transport_config, 0, tc_local, p_reverb_signal, 0 ) ) != IVAS_ERR_OK ) { @@ -204,7 +208,11 @@ ivas_error ivas_td_binaural_renderer_sf( return error; } +#ifdef NONBE_FIX_978_MC_TDREND_REVERB + if ( st_ivas->hRenderConfig != NULL && st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( st_ivas->hRenderConfig != NULL && st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#endif { /* add reverb to rendered signals */ v_add( reverb_signal[0], output_f_local[0], output_f_local[0], output_frame ); -- GitLab