Bug in ITD estimation if input sampling rate is 48 kHz but -max_band is set to WB or SWB

There is a bug in the function calc_mean_E_ratio() in ivas_stereo_dft_enc_itd.c. The code

/*take bands up to 32kHz bandwidth as ITD is always calculated at 32kHz sampling rate*/
nbands -= ( NFFT > STEREO_DFT_N_32k_ENC );

only makes sense if nbands is set to the maximum number of bands in FB mode. However, if the bandwidth was limited via commandline parameter -max_band nbands is already configured correctly. Therefore, subtracting one more band is wrong and leads to different output of the function which can change the entire ITD estimate.

Assignee Loading
Time tracking Loading