Skip to content

Audible "plop" at 16.4 kbps stereo likely due to ipd difference between float and fixed point

The difference appeared at frame 204 in the left channel. In order on the figure, 1- left channel float synthesis 2- left channel fixed synthesis
3- difference between the 2 synthesis 4- pgIpd fixed point (unscaled to float) 5- pgIpd floating point 6- difference between both Ipd

image

Currently the fixed point ipd is computed in W32Q13. The current decoded value is constructed with

idp = ind * delta - EVS_PI ; where the ind is a 4 bit indice and delta == pi/8. ( function stereo_dft_dequantize_ipd() )

In our case, at frame 204, the decode ind == 0, hence idp0 == -EVS_PI .

Then we enter the function stereo_dft_dec_smooth_parameters_fx() where we can find this code (file ivas_sereo_dft_dec_fx.c Ln1088):

        pgIpd = hStereoDft->gipd + ( k + k_offset );
        diff_ipd = pgIpd[0] - pgIpd[-hStereoDft->prm_res[k + k_offset]];
        if ( diff_ipd < -EVS_PI )
        {
            pgIpd[0] += PI2;
        }
        else if ( diff_ipd > EVS_PI )
        {
            pgIpd[0] -= PI2;
        }

below is the floating point and fixed point gipd mem

- hStereoDft->gipd float[3]
    [0]	3.21794287e-05	float
    [1]	6.43588573e-05	float
    [2]	-3.14159274	float

- hStereoDft->gipd_fx int[3]
    [0]	0	int
    [1]	0	int
    [2]	-25736	int

diff_ipd represents the difference in ipd from one of the previous value. In fixed point, the previous value used was 0 while in floating point it is a very small one (but not 0). Thus, the floating point verifies the condition

if ( diff_ipd < -EVS_PI )

but not the fixed point ( in fixed point diff_ipd == (-EVS_PI - 0) ) leading to a phase inversion that can be heard as a plop .

Given Word32 are used anyway for this part of the code, my suggestion would be to increase the precision, otherwise we might have to consider limiting the precision on the floating point version.

Here is the bitstream used : WalkF002_-stereo_16400_32.bit

and the command line :

IVAS_dec STEREO 32 WalkF002_-stereo_16400_32.bit syn.wav

Version: aa0d22c1