Loading lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -154,7 +154,7 @@ #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) */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading lib_rend/ivas_objectRenderer_hrFilt.c +8 −0 Original line number Diff line number Diff line Loading @@ -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 ); Loading lib_rend/ivas_objectRenderer_sfx.c +29 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,9 @@ #include "ivas_rom_rend.h" #include "prot.h" #include "wmc_auto.h" #ifdef FIX_379_GAININTP #include "ivas_rom_com.h" #endif /*---------------------------------------------------------------------* Loading Loading @@ -236,7 +239,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 ) { float buffer[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1 + L_SUBFRAME5MS_48k]; Loading @@ -245,6 +253,18 @@ void TDREND_firfilt( float *p_filter; float tmp; int16_t i, j; #ifdef FIX_379_GAININTP float gain_tmp, gain_delta; const float *pcos; int16_t step; float cos_tmp; /* Setup pointer for cosine gain transition curve */ gain_delta = Gain - prevGain; pcos = ivas_mdft_coeff_cos_twid_960; /* ivas_mdft_coeff_cos_twid_960 */ step = 960 / subframe_length; gain_tmp = prevGain; #endif /* Handle memory */ p_signal = buffer + filterlength - 1; Loading @@ -262,7 +282,15 @@ void TDREND_firfilt( { tmp += ( *p_filter++ ) * ( *p_tmp-- ); } #ifdef FIX_379_GAININTP /* Apply cosine gain curve in case of abrupt gain changes */ cos_tmp = *pcos; pcos += step; gain_tmp = prevGain + gain_delta * ( 1 - cos_tmp * cos_tmp ); signal[i] = tmp * gain_tmp; #else signal[i] = tmp * Gain; #endif if ( i < intp_count ) { Loading lib_rend/ivas_prot_rend.h +5 −0 Original line number Diff line number Diff line Loading @@ -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 ); Loading lib_rend/ivas_stat_rend.h +3 −0 Original line number Diff line number Diff line Loading @@ -600,6 +600,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 */ Loading Loading
lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -154,7 +154,7 @@ #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) */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading
lib_rend/ivas_objectRenderer_hrFilt.c +8 −0 Original line number Diff line number Diff line Loading @@ -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 ); Loading
lib_rend/ivas_objectRenderer_sfx.c +29 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,9 @@ #include "ivas_rom_rend.h" #include "prot.h" #include "wmc_auto.h" #ifdef FIX_379_GAININTP #include "ivas_rom_com.h" #endif /*---------------------------------------------------------------------* Loading Loading @@ -236,7 +239,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 ) { float buffer[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1 + L_SUBFRAME5MS_48k]; Loading @@ -245,6 +253,18 @@ void TDREND_firfilt( float *p_filter; float tmp; int16_t i, j; #ifdef FIX_379_GAININTP float gain_tmp, gain_delta; const float *pcos; int16_t step; float cos_tmp; /* Setup pointer for cosine gain transition curve */ gain_delta = Gain - prevGain; pcos = ivas_mdft_coeff_cos_twid_960; /* ivas_mdft_coeff_cos_twid_960 */ step = 960 / subframe_length; gain_tmp = prevGain; #endif /* Handle memory */ p_signal = buffer + filterlength - 1; Loading @@ -262,7 +282,15 @@ void TDREND_firfilt( { tmp += ( *p_filter++ ) * ( *p_tmp-- ); } #ifdef FIX_379_GAININTP /* Apply cosine gain curve in case of abrupt gain changes */ cos_tmp = *pcos; pcos += step; gain_tmp = prevGain + gain_delta * ( 1 - cos_tmp * cos_tmp ); signal[i] = tmp * gain_tmp; #else signal[i] = tmp * Gain; #endif if ( i < intp_count ) { Loading
lib_rend/ivas_prot_rend.h +5 −0 Original line number Diff line number Diff line Loading @@ -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 ); Loading
lib_rend/ivas_stat_rend.h +3 −0 Original line number Diff line number Diff line Loading @@ -600,6 +600,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 */ Loading