diff --git a/lib_com/options.h b/lib_com/options.h index 3cad3e09ff058e7ff120e77bb48cd3d163a8b87e..d670277f4d1dac1fa10c74063457cc4cf738934d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -148,6 +148,25 @@ #define SNS_MSVQ /* FhG: contribution 33 - MSVQ for SNS parameters at stereo mid bitrates */ +#define SBA2MONO /* FhG: Issue 365: Adapt processing of SBA mono output to be in line with stereo output (less delay, lower complexity) */ +#define FIX_379_EXT_METADATA /* Eri: Extended metadata issues */ +#define FIX_379_ANGLE /* Eri: Extended metadata issues related to angle structure */ +#define FIX_379_GAININTP /* Eri: Adds a gain interpolation for directional/distance gain to handle abrupt changes in metadata (Non BE) */ + +#define NOKIA_PARAMBIN_REQULARIZATION /* Nokia: Contribution - Configured reqularization factor for parametric binauralizer. */ +#define NOKIA_ADAPTIVE_BINAURAL_PROTOS /* Nokia: Contribution 28: Adaptive binaural prototypes */ +#define NOKIA_ADAPTIVE_BINAURAL_PROTOS_OPT /* Nokia: enable adaptive binaural prototype complexity optimizations */ + +#define FIX_389_EXT_REND_PCM_SR /* Nokia: Issue 389: Fix assignment of sample rate with PCM input. */ +#define FIX_390_EXT_REND_MASA_META_COPY /* Nokia: Issue 390: Fixes MASA metadata copying to renderer. */ +#define FIX_392_LATE_REVERB /* DLB : Issue 392: keep late reverb by default off when output config is not BINAURAL_ROOM*/ + +#define FIX_ISM_DTX_CLICKS /* FhG: fix for clicks in ISM DTX for inactive to active TCX transitions */ + +#define ISSUE_24_CLEANUP_MCT_LFE /* Issue 24: Cleanup LFE path withing MCT */ + +#define FIX_401_DIRAC_RENDERER_META_READ_INDICES /* Nokia: Issue 401: Fix metadata reading indices in DirAC renderer. */ + #define PARAMMC_SHORT_ENC_MDFT /* FhG: Issue 410: complexity optimization for parametric Multichannel modes */ #define FIX_422 /* FhG: Issue 422: re-introduce fix for noisy speech buffer in ParamISM */ diff --git a/lib_rend/ivas_objectRenderer_hrFilt.c b/lib_rend/ivas_objectRenderer_hrFilt.c index 91b018b1486f9f3538c9d30d6f890fef0a06c732..97d0b68fb8e83c6fb28f6e35b001800be2f9f5ac 100644 --- a/lib_rend/ivas_objectRenderer_hrFilt.c +++ b/lib_rend/ivas_objectRenderer_hrFilt.c @@ -69,13 +69,21 @@ ivas_error TDREND_REND_RenderSourceHRFilt( { float LeftOutputFrame[L_SPATIAL_SUBFR_48k]; float RightOutputFrame[L_SPATIAL_SUBFR_48k]; +#ifndef FIX_379_GAININTP float Gain; Gain = ( *Src_p->SrcRend_p->DirGain_p ) * ( *Src_p->SrcRend_p->DistGain_p ); +#endif TDREND_Apply_ITD( Src_p->InputFrame_p, LeftOutputFrame, RightOutputFrame, &Src_p->previtd, Src_p->itd, Src_p->mem_itd, subframe_length ); +#ifdef FIX_379_GAININTP + TDREND_firfilt( LeftOutputFrame, Src_p->hrf_left_prev, hrf_left_delta, intp_count, Src_p->mem_hrf_left, subframe_length, Src_p->filterlength, Src_p->Gain, Src_p->prevGain ); + TDREND_firfilt( RightOutputFrame, Src_p->hrf_right_prev, hrf_right_delta, intp_count, Src_p->mem_hrf_right, subframe_length, Src_p->filterlength, Src_p->Gain, Src_p->prevGain ); + Src_p->prevGain = Src_p->Gain; +#else TDREND_firfilt( LeftOutputFrame, Src_p->hrf_left_prev, hrf_left_delta, intp_count, Src_p->mem_hrf_left, subframe_length, Src_p->filterlength, Gain ); TDREND_firfilt( RightOutputFrame, Src_p->hrf_right_prev, hrf_right_delta, intp_count, Src_p->mem_hrf_right, subframe_length, Src_p->filterlength, Gain ); +#endif /* Copy to accumulative output frame */ v_add( LeftOutputFrame, output_buf[0], output_buf[0], subframe_length ); diff --git a/lib_rend/ivas_objectRenderer_sfx.c b/lib_rend/ivas_objectRenderer_sfx.c index 98f45a5dd94b7d6542e679fda3d122d3a13faaa1..af3231df613a8717b5e8ada8603bc5fa92f94848 100644 --- a/lib_rend/ivas_objectRenderer_sfx.c +++ b/lib_rend/ivas_objectRenderer_sfx.c @@ -236,7 +236,12 @@ void TDREND_firfilt( float *mem, /* i/o: filter memory */ const int16_t subframe_length, /* i : Length of signal */ const int16_t filterlength, /* i : Filter length */ - const float Gain /* i : Gain */ +#ifdef FIX_379_GAININTP + const float Gain, /* i : Gain */ + const float prevGain /* i : Previous gain */ +#else + const float Gain /* i : Gain */ +#endif ) { float buffer[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1 + L_SUBFRAME5MS_48k]; @@ -245,6 +250,13 @@ void TDREND_firfilt( float *p_filter; float tmp; int16_t i, j; +#ifdef FIX_379_GAININTP + float step, gain_tmp, gain_delta; + + gain_delta = ( Gain - prevGain ); + step = gain_delta / ( subframe_length ); + gain_tmp = prevGain; +#endif /* Handle memory */ p_signal = buffer + filterlength - 1; @@ -262,7 +274,13 @@ void TDREND_firfilt( { tmp += ( *p_filter++ ) * ( *p_tmp-- ); } +#ifdef FIX_379_GAININTP + /* Apply linear gain interpolation in case of abrupt gain changes */ + gain_tmp = gain_tmp + step; + signal[i] = tmp * gain_tmp; +#else signal[i] = tmp * Gain; +#endif if ( i < intp_count ) { diff --git a/lib_rend/ivas_objectRenderer_sources.c b/lib_rend/ivas_objectRenderer_sources.c index 6ed9184786d2b544692c2861dff7ea1cfa6b1dbe..91253748b2eb4ee2554f80c6d8f2782b72c31fe8 100644 --- a/lib_rend/ivas_objectRenderer_sources.c +++ b/lib_rend/ivas_objectRenderer_sources.c @@ -687,7 +687,9 @@ void TDREND_SRC_Init( Src_p->hrf_right_prev[0] = 1; Src_p->azim_prev = 0.0f; Src_p->elev_prev = 0.0f; - +#ifdef FIX_379_GAININTP + Src_p->prevGain = 1.0f; +#endif return; } diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index b810ed09d850529a8d04d8799a391be08c604bda..7713dbe1a3bd56bf1da11703111144f1568d300a 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -462,7 +462,12 @@ void TDREND_firfilt( float *mem, /* i/o: filter memory */ const int16_t subframe_length, /* i : Length of signal */ const int16_t filterlength, /* i : Filter length */ +#ifdef FIX_379_GAININTP + const float Gain, /* i : Gain */ + const float prevGain /* i : Previous gain */ +#else const float Gain /* i : Gain */ +#endif ); diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index fac5781a7e8fa282278ecf628faea4b3a4233384..a3308e23c21e39a73a6ef9554257a9fdf52f7af2 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -604,6 +604,9 @@ typedef struct float mem_hrf_left[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1]; float mem_hrf_right[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1]; float Gain; +#ifdef FIX_379_GAININTP + float prevGain; +#endif } TDREND_SRC_t; /* Top level TD binaural renderer handle */