Skip to content
Commits on Source (16)
......@@ -799,13 +799,22 @@ cleanup:
destroy_SetOfHRTF( hSetOfHRTF );
}
IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics );
destroy_hrtf_statistics();
destroy_hrtf_statistics( hHrtfStatistics );
#endif
}
#ifdef FIX_1990_SANITIZER_IN_REVERB_LOAD
/* This free differs from float version and is done always. This should be safe to do even though we leave a return
* value as not handled. This is needed as HRTF statistics from ROM are currently converted from float values. */
#ifdef FIX_CREND_SIMPLIFY_CODE
IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfBinary.hHrtfStatistics );
destroy_hrtf_statistics( hHrtfBinary.hHrtfStatistics );
#else
IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics );
destroy_hrtf_statistics( hHrtfStatistics );
#endif
#endif
IVAS_DEC_Close( &hIvasDec );
CustomLsReader_close( &hLsCustomReader );
hrtfFileReader_close( &hrtfReader );
......
......@@ -87,6 +87,9 @@
#define FIX_1987_CRASH_OMASA_ENERGY /* FhG: Replace cldfbAnalysis_ts_fx_fix_q() with cldfbAnalysis_ts_fx_var_q() to avoid assertion error */
#define FIX_1985_SBA_714_HF_LOSS /* Dlb: Fix for issue 1985, improved dirac ref pow precision*/
#define FIX_1819_EIGENVALUE_ERROR /* FhG: Workaround for zero eigenvalue: replace with epsilon if det != 0*/
#define FIX_1990_SANITIZER_IN_REVERB_LOAD /* Nokia: Fix issue part of issue 1990 by introducing missing free of structure. */
#define FIX_1995_REVERB_INIT /* VA/Nokia: issue 1995: Fix use-of-uninitialized-value in ivas_binaural_reverb_init() */
/* #################### Start BASOP porting switches ############################ */
#define NONBE_1244_FIX_SWB_BWE_MEMORY /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */
......
This diff is collapsed.
......@@ -989,8 +989,7 @@ ivas_error ivas_binaural_reverb_init(
const IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics, /* i/o: room acoustics parameters */
const Word32 sampling_rate, /* i : sampling rate */
const Word32 *defaultTimes, /* i : default reverberation times */
const Word32 *defaultEne /* i : default reverberation energies */
,
const Word32 *defaultEne, /* i : default reverberation energies */
Word32 *earlyEne /* i/o: Early part energies to be modified */
);
......@@ -1018,6 +1017,7 @@ ivas_error ivas_reverb_open_fx(
void ivas_reverb_close(
REVERB_HANDLE *hReverb /* i/o: Reverberator handle */
);
ivas_error ivas_reverb_process_fx(
const REVERB_HANDLE hReverb, /* i : Reverberator handle */
const AUDIO_CONFIG input_audio_config, /* i : reverb. input audio configuration */
......@@ -1033,8 +1033,9 @@ void ivas_rev_delay_line_init(
const UWord16 delay, /* i : the delay */
const UWord16 maxdelay /* i : maximum delay to be supported */
);
/*! r: sample gotten out of delay line, and amplified by set gain */
Word32 ivas_rev_delay_line_get_sample_fx( /* Q11 */
/*! r: sample gotten out of delay line, and amplified by set gain, Q11 */
Word32 ivas_rev_delay_line_get_sample_fx(
ivas_rev_delay_line_t *pDelay /* i/o: the delay line */
);
......@@ -1054,18 +1055,19 @@ void ivas_rev_delay_line_feed_sample_blk_fx(
const UWord16 blk_size, /* i : number of samples in the input data block */
Word32 *input /* i : the samples to feed Q11 */
);
void ivas_reverb_iir_filt_init(
ivas_rev_iir_filter_t *iirFilter, /* o : IIR filter */
const UWord16 maxTaps /* i : maximum number of filter taps */
);
void ivas_reverb_iir_filt_set(
ivas_rev_iir_filter_t *iirFilter, /* i/o: IIR filter */
UWord16 nr_taps, /* i : number of IIR filter taps */
const Word16 *coefA, /* i : A filter coefficients to set */
const Word16 *coefB /* i : the B filter coefficients to set */
);
void ivas_reverb_iir_filt_2taps_feed_blk_fx(
ivas_rev_iir_filter_t *iirFilter, /* i/o: IIR filter */
const UWord16 blk_size, /* i : size */
......@@ -1076,6 +1078,7 @@ void ivas_reverb_iir_filt_2taps_feed_blk_fx(
UWord16 int_log2(
UWord32 powerOf2
);
Word16 ivas_reverb_t2f_f2t_init(
ivas_reverb_t2f_f2t_t *t2f_f2t,
const Word16 fft_size,
......@@ -1085,6 +1088,7 @@ Word16 ivas_reverb_t2f_f2t_init(
void ivas_reverb_t2f_f2t_ClearHistory(
ivas_reverb_t2f_f2t_t *t2f_f2t
);
void ivas_reverb_t2f_f2t_in_fx(
ivas_reverb_t2f_f2t_t *t2f_f2t,
Word32 *input_L, // i: Qx
......@@ -1100,6 +1104,7 @@ void ivas_reverb_t2f_f2t_out_fx(
Word32 *output_L, // i/o: Qx
Word32 *output_R // i/o: Qx
);
Word16 ivas_reverb_fft_filter_init(
ivas_reverb_fft_filter_t *fft_filter,
const Word16 fft_size
......@@ -1109,6 +1114,7 @@ void ivas_reverb_fft_filter_ComplexMul_fx(
ivas_reverb_fft_filter_t *fft_filter, /* i */
Word32 *buffer /* i/o: Qx */
);
void ivas_reverb_fft_filter_CrossMix_fx(
Word32 *buffer0, // i/o: Qx
Word32 *buffer1, // i/o: Qx
......@@ -1118,7 +1124,9 @@ void ivas_reverb_fft_filter_CrossMix_fx(
void ivas_reverb_fft_filter_ConvertFFTWF_2_FFTR_fx(
rv_fftwf_type_complex_fx *spectrum, // i: Qx
Word32 *fft_real, // o: Qx
const Word16 fft_size);
const Word16 fft_size
);
void ivas_reverb_define_window_fft_fx(
Word32 *pWindow, //output in Q31
const Word16 transitionStart,
......@@ -1135,6 +1143,7 @@ Word16 ivas_reverb_calc_color_filters_fx(
Word16 *q_pBeqL,
Word16 *q_pBeqR
);
Word16 ivas_reverb_calc_correl_filters_fx(
Word32 *pTargetICC, //input in Q30
const Word32 *pWindow, //input in Q30
......@@ -1144,6 +1153,7 @@ Word16 ivas_reverb_calc_correl_filters_fx(
Word16 *q_pU, //Output q
Word16 *q_pV //output q
);
void ivas_reverb_calc_color_levels_fx(
const Word32 output_Fs,
const Word16 freq_count,
......@@ -1155,14 +1165,16 @@ void ivas_reverb_calc_color_levels_fx(
const Word16 *pLoop_delays,
const Word32 *pT60_filter_coeff, //input in Q31
Word32 *pTarget_color_L, //output in Q30
Word32 *pTarget_color_R); //output in Q30
Word32 *pTarget_color_R //output in Q30
);
ivas_error ivas_reverb_prepare_cldfb_params(
const IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pInput_params,
const HRTFS_STATISTICS_HANDLE hHrtfStatistics,
const Word32 output_Fs,
Word32 *pOutput_t60,
Word32 *pOutput_ene );
Word32 *pOutput_ene
);
void ivas_reverb_interp_on_freq_grid_fx(
const Word16 input_table_size,
......@@ -1172,6 +1184,8 @@ void ivas_reverb_interp_on_freq_grid_fx(
const Word32 *pOutput_fc,
Word32 *pOutput_grid //output in the same Q-format as input
);
/*---------------------------------------------------------------------------------*
* Shoebox Prototypes
*-----------------------------------------------------------------------------------*/
......
This diff is collapsed.
......@@ -775,7 +775,7 @@ static ivas_error TDREND_LoadBSplineBinary(
fread( (Word32 *) model->EL_dyn_fx, sizeof( Word32 ), model->AlphaN * HRTF_MODEL_N_SECTIONS, f_hrtf );
for ( j = 0; j < model->AlphaN * HRTF_MODEL_N_SECTIONS; j++ )
{
model->EL_dyn_fx[j] = L_shl_r( model->EL_dyn_fx[j], sub( Q30, factor_Q ) );
model->EL_dyn_fx[j] = L_shl_r( model->EL_dyn_fx[j], sub( Q28, factor_Q ) );
}
model->ER_dyn_fx = (Word32 *) malloc( model->AlphaN * HRTF_MODEL_N_SECTIONS * sizeof( Word32 ) );
......@@ -786,7 +786,7 @@ static ivas_error TDREND_LoadBSplineBinary(
fread( (Word32 *) model->ER_dyn_fx, sizeof( Word32 ), model->AlphaN * HRTF_MODEL_N_SECTIONS, f_hrtf );
for ( j = 0; j < model->AlphaN * HRTF_MODEL_N_SECTIONS; j++ )
{
model->ER_dyn_fx[j] = L_shl_r( model->ER_dyn_fx[j], sub( Q30, factor_Q ) );
model->ER_dyn_fx[j] = L_shl_r( model->ER_dyn_fx[j], sub( Q28, factor_Q ) );
}
/* Set const pointers */
......