Review stereo_dft_quantize_itd()

Bug description

The function stereo_dft_quantize_itd() contains imho a statement which does in practice nothing:

static void stereo_dft_quantize_itd(
    const int16_t in,
    float *out,
    const int32_t input_Fs,
    int16_t *ind )
{
    int16_t itd;

    itd = (int16_t) ( sign( in ) * 0.5f + in );

The input ITD value in is a integer value (int16_t). Dependent on the sign, 0.5f is added or subtracted. However, the following type conversion to int16_t removes the fractional part again.

The C-spec says:

When a finite value of standard floating type is converted to an integer type other than bool, the fractional part is discarded (i.e. the value is truncated toward zero). If the value of the integral part cannot be represented by the integer type, the behavior is undefined.

Edited by multrus