From 4c8b226fb4454e3c809f796e7d6d5d73ca4eaf7f Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Fri, 8 Aug 2025 09:42:56 +0300 Subject: [PATCH] Port float MR1709 to BASOP --- lib_com/options.h | 1 + lib_rend/ivas_dirac_dec_binaural_functions_fx.c | 11 +++++++++++ lib_rend/lib_rend_fx.c | 11 +++++++++++ 3 files changed, 23 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index d1e0bcee2..aac90053d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -124,6 +124,7 @@ #define NONBE_FIX_MC_LFE_LPF /* Dlb: Adding the LFE LPF filter back for MC content. */ #define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */ #define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */ +#define NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART /* Nokia: Set default early part energy correction to unity for BINAURAL_ROOM_REVERB */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_rend/ivas_dirac_dec_binaural_functions_fx.c b/lib_rend/ivas_dirac_dec_binaural_functions_fx.c index 648531317..7d2327599 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions_fx.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions_fx.c @@ -297,7 +297,18 @@ ivas_error ivas_dirac_dec_init_binaural_data_fx( ELSE IF( EQ_32( renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) /* Indication of binaural rendering with room effect */ { #ifdef NONBE_FIX_991_PARAMBIN_BINARY_HRTF +#ifdef NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART + IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) ) + { + Copy32( ( *phHrtfParambin )->parametricEarlyPartEneCorrection_fx, hDiracDecBin->earlyPartEneCorrection_fx, nBins ); + } + ELSE + { + set32_fx( hDiracDecBin->earlyPartEneCorrection_fx, ONE_IN_Q28, CLDFB_NO_CHANNELS_MAX ); + } +#else Copy32( ( *phHrtfParambin )->parametricEarlyPartEneCorrection_fx, hDiracDecBin->earlyPartEneCorrection_fx, nBins ); +#endif #else Copy32( hHrtfParambin->parametricEarlyPartEneCorrection_fx, hDiracDecBin->earlyPartEneCorrection_fx, nBins ); #endif diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index ae4b2ef02..96db56e54 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -9780,7 +9780,18 @@ static ivas_error ivas_masa_ext_rend_parambin_init( ELSE IF( EQ_16( renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) /* Indication of binaural rendering with room effect */ { #ifdef NONBE_FIX_991_PARAMBIN_BINARY_HRTF +#ifdef NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART + IF( EQ_32( *inputMasa->base.ctx.pOutConfig, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) ) + { + Copy32( ( *phHrtfParambin )->parametricEarlyPartEneCorrection_fx, hDiracDecBin->earlyPartEneCorrection_fx, nBins ); + } + ELSE + { + set32_fx( hDiracDecBin->earlyPartEneCorrection_fx, ONE_IN_Q28, CLDFB_NO_CHANNELS_MAX ); + } +#else Copy32( ( *phHrtfParambin )->parametricEarlyPartEneCorrection_fx, hDiracDecBin->earlyPartEneCorrection_fx, nBins ); +#endif #else Copy32( hHrtfParambin->parametricEarlyPartEneCorrection_fx, hDiracDecBin->earlyPartEneCorrection_fx, nBins ); #endif -- GitLab