Skip to content
Commits on Source (13)
......@@ -736,6 +736,13 @@ cleanup:
}
}
#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. */
IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics );
destroy_hrtf_statistics( hHrtfStatistics );
#endif
IVAS_DEC_Close( &hIvasDec );
CustomLsReader_close( &hLsCustomReader );
hrtfFileReader_close( &hrtfReader );
......
......@@ -88,6 +88,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 */
......
......@@ -1230,6 +1230,11 @@ Word16 maximum_exp_fx( /* o : index of the maximum value
scale = sub( norm_s( vec_fx[ind] ), 1 );
tmp = shl( vec_fx[ind], scale );
exp = sub( exp_vec[ind], scale );
#if 1
static int cnt = 0;
cnt++;
#endif
FOR( j = 1; j < lvec_fx; j++ )
{
......@@ -1243,7 +1248,7 @@ Word16 maximum_exp_fx( /* o : index of the maximum value
}
}
//printf( "\nind = %d", ind );
return ind;
}
#elif 1
......@@ -1251,17 +1256,29 @@ Word16 maximum_exp_fx( /* o : index of the maximum value
Word16 j, ind;
ind = 0;
move16();
#if 1
static int cnt = 0;
cnt++;
#endif
FOR( j = 1; j < lvec_fx; j++ )
{
#if 0
if ( LT_32( L_deposit_l( vec_fx[ind] ), L_shr_sat( L_deposit_l( vec_fx[j] ), sub( exp_vec[ind], exp_vec[j] ) ) ) )
#else
/* if(vec[j] > vec[ind]) //means */
/* if( GT_32( L_shr_sat( L_deposit_l( vec_fx[j] ) ), sub( exp_vec[ind], exp_vec[j] ) , L_deposit_l( vec_fx[ind] ))) //is like */
if ( L_mac0_sat( L_shr_sat( L_mult0( vec_fx[j], 0x0001 ), sub( exp_vec[ind], exp_vec[j] ) ), vec_fx[ind], -0x0001 ) > 0 )
#endif
{
ind = j;
move16();
}
}
}
//printf( "\n%d:ind = %d", cnt, ind );
return ind;
}
#else
......@@ -1288,7 +1305,7 @@ Word16 maximum_exp_fx( /* o : index of the maximum value
}
}
// printf( "\nind = %d", ind );
return ind;
}
#endif
......
......@@ -934,8 +934,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 */
);
......@@ -963,6 +962,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 */
......@@ -978,8 +978,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 */
);
......@@ -999,18 +1000,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 */
......@@ -1021,6 +1023,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,
......@@ -1030,6 +1033,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
......@@ -1045,6 +1049,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
......@@ -1054,6 +1059,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
......@@ -1063,7 +1069,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,
......@@ -1080,6 +1088,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
......@@ -1089,6 +1098,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,
......@@ -1100,14 +1110,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,
......@@ -1117,6 +1129,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.