From eca9c8b17d905e43f8ba3df0786dae51b4145767 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Fri, 8 Aug 2025 09:18:35 +0300 Subject: [PATCH] Port float MR1709 to float reference --- lib_com/options.h | 1 + lib_rend/ivas_dirac_dec_binaural_functions.c | 11 +++++++++++ lib_rend/lib_rend.c | 11 +++++++++++ 3 files changed, 23 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 31f712963..8d4b95a86 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -198,6 +198,7 @@ #define FIX_1082_INSTRUM_FAILED_LC3PLUS /* VoiceAge: issue 1082: fix ambiguous syntax in LC3Plus code leading to fails of instrumented builds */ #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.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 875d7a1ef..9c92a9d3d 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -231,7 +231,18 @@ ivas_error ivas_dirac_dec_init_binaural_data( else if ( 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 ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) + { + mvr2r( ( *phHrtfParambin )->parametricEarlyPartEneCorrection, hDiracDecBin->earlyPartEneCorrection, nBins ); + } + else + { + set_f( hDiracDecBin->earlyPartEneCorrection, 1.0f, CLDFB_NO_CHANNELS_MAX ); + } +#else mvr2r( ( *phHrtfParambin )->parametricEarlyPartEneCorrection, hDiracDecBin->earlyPartEneCorrection, nBins ); +#endif #else mvr2r( hHrtfParambin->parametricEarlyPartEneCorrection, hDiracDecBin->earlyPartEneCorrection, nBins ); #endif diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 3fae93971..e5f94fc2f 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -8359,7 +8359,18 @@ static ivas_error ivas_masa_ext_rend_parambin_init( else if ( 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 ( *inputMasa->base.ctx.pOutConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) + { + mvr2r( ( *phHrtfParambin )->parametricEarlyPartEneCorrection, hDiracDecBin->earlyPartEneCorrection, nBins ); + } + else + { + set_f( hDiracDecBin->earlyPartEneCorrection, 1.0f, CLDFB_NO_CHANNELS_MAX ); + } +#else mvr2r( ( *phHrtfParambin )->parametricEarlyPartEneCorrection, hDiracDecBin->earlyPartEneCorrection, nBins ); +#endif #else mvr2r( hHrtfParambin->parametricEarlyPartEneCorrection, hDiracDecBin->earlyPartEneCorrection, nBins ); #endif -- GitLab