From c8dcc6d69ad9f19b4e70904ad882461034f3f46a Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 22 May 2025 10:27:06 +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_fx.c | 4 ++++ lib_dec/ivas_objectRenderer_internal_fx.c | 8 ++++++++ 4 files changed, 17 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 3e4dae0d5..33574099d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -128,6 +128,7 @@ #ifdef NONBE_FIX_947_STEREO_DMX_EVS_PHA #define NONBE_FIX_947_STEREO_DMX_FADOPT /* Orange: Fading optimisation */ #endif +#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 b4af0ed06..69eed516c 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2272,7 +2272,11 @@ ivas_error ivas_init_decoder_fx( move16(); } +#ifdef NONBE_FIX_978_MC_TDREND_REVERB + IF( EQ_32( st_ivas->hOutSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) +#else IF( EQ_32( st_ivas->hIntSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) +#endif { IF( NE_32( ( error = ivas_reverb_open_fx( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_config, NULL, st_ivas->hBinRendererTd->HrFiltSet_p->lr_energy_and_iac_fx, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ), IVAS_ERR_OK ) ) { diff --git a/lib_dec/ivas_ism_dec_fx.c b/lib_dec/ivas_ism_dec_fx.c index 18c6953f2..18b054759 100644 --- a/lib_dec/ivas_ism_dec_fx.c +++ b/lib_dec/ivas_ism_dec_fx.c @@ -218,7 +218,11 @@ static ivas_error ivas_ism_bitrate_switching_dec_fx( { return error; } +#ifdef NONBE_FIX_978_MC_TDREND_REVERB + IF( EQ_32( st_ivas->hOutSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) +#else IF( EQ_32( st_ivas->hIntSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) +#endif { IF( NE_32( ( error = ivas_reverb_open_fx( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_config, NULL, st_ivas->hBinRendererTd->HrFiltSet_p->lr_energy_and_iac_fx, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ), IVAS_ERR_OK ) ) { diff --git a/lib_dec/ivas_objectRenderer_internal_fx.c b/lib_dec/ivas_objectRenderer_internal_fx.c index 71b16a6c6..48cbd21c7 100644 --- a/lib_dec/ivas_objectRenderer_internal_fx.c +++ b/lib_dec/ivas_objectRenderer_internal_fx.c @@ -237,7 +237,11 @@ ivas_error ivas_td_binaural_renderer_sf_fx( } test(); +#ifdef NONBE_FIX_978_MC_TDREND_REVERB + IF( st_ivas->hRenderConfig != NULL && EQ_32( st_ivas->hOutSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) +#else IF( st_ivas->hRenderConfig != NULL && EQ_32( st_ivas->hIntSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) +#endif { FOR( i = 0; i < nchan_ism_internal; ++i ) { @@ -269,7 +273,11 @@ ivas_error ivas_td_binaural_renderer_sf_fx( } test(); +#ifdef NONBE_FIX_978_MC_TDREND_REVERB + IF( st_ivas->hRenderConfig != NULL && EQ_32( st_ivas->hOutSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) +#else IF( st_ivas->hRenderConfig != NULL && EQ_32( st_ivas->hIntSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) +#endif { /* add reverb to rendered signals */ v_add_32( reverb_signal_fx[0], output_fx_local[0], output_fx_local[0], output_frame ); // Q11 -- GitLab