diff --git a/lib_com/options.h b/lib_com/options.h old mode 100755 new mode 100644 index 3c6e1aa960dd573dfa76276a35479a066c9aff6f..e7249dab4157eddf8ab0700013998d51a62353ad --- a/lib_com/options.h +++ b/lib_com/options.h @@ -141,6 +141,7 @@ #define DISABLE_ADAP_RES_COD_TMP /* temporary fix for IVAS-403, disables adaptive residual coding */ /*#define ITD_WINNER_GAIN_MODIFY */ /* ITD optimization - WORK IN PROGRESS */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ +#define FIX_103_RA_PARAMS_PARAM_BIN_REND /* Issue 103: Digest room acoustics parameters for Parametric Binaural Renderer*/ /*#define SBA_HPF_TUNING_DEC*/ #define FIX_350_MASA_DELAY_COMP /* Nokia: Issue 350: MASA audio/meta delay compensation */ diff --git a/lib_rend/ivas_reverb.c b/lib_rend/ivas_reverb.c index 7dc05cff09b25f29368ce5e69109feaef40e721a..d31d1bd1a6b6359158ea54483cd388d4222aa5c5 100644 --- a/lib_rend/ivas_reverb.c +++ b/lib_rend/ivas_reverb.c @@ -1894,6 +1894,28 @@ ivas_error ivas_binaural_reverb_open( } } + +#ifdef FIX_103_RA_PARAMS_PARAM_BIN_REND + if ( ( roomAcoustics ) && ( roomAcoustics->override ) ) + { + ivas_reverb_prepare_cldfb_params( roomAcoustics, hHrtfFastConv, output_config, roomAcoustics->use_brir, sampling_rate, t60, ene ); + ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, t60, ene ); + ivas_binaural_reverb_setPreDelay( hReverb, (int16_t) roundf( 48000.0f * roomAcoustics->acousticPreDelay / CLDFB_NO_CHANNELS_MAX ) ); + } + else + { + if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfFastConv->fastconvReverberationTimes, hHrtfFastConv->fastconvReverberationEneCorrections ); + ivas_binaural_reverb_setPreDelay( hReverb, 10 ); + } + else + { + ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfParambin->parametricReverberationTimes, hHrtfParambin->parametricReverberationEneCorrections ); + ivas_binaural_reverb_setPreDelay( hReverb, 10 ); + } + } +#else if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { if ( !roomAcoustics->override ) @@ -1914,6 +1936,7 @@ ivas_error ivas_binaural_reverb_open( ivas_binaural_reverb_setPreDelay( hReverb, 10 ); } +#endif return IVAS_ERR_OK; }