Seemingly debug "assert(0)" in initDiffuseResponses_fx

Basic info

  • Fixed point:

Bug description

There is a bit weird piece of code in initDiffuseResponses_fx(), see below

                /* Diffuse only to horizontal plane IF enough loudspeakers */
                IF( GT_16( num_horizontal_speakers, 2 ) )
                {
                    exp_var1 = 15;
                    move16();
                    Word16 num_horizontal_speakers_isq = ISqrt16( num_horizontal_speakers, &exp_var1 );   // q15-exp_var1
                    num_horizontal_speakers_isq = shr( num_horizontal_speakers_isq, negate( exp_var1 ) ); // q15
                    assert( 0 );
                    /*No stream hitting*/
                    FOR( i = 0; i < num_channels; i++ )
                    {
                        diffuse_response_function_fx[i] = mult( diffuse_response_function_fx[i], num_horizontal_speakers_isq ); // q15
                        move16();
                    }
                }

This is a pretty rare special case of custom loudspeaker output when transported signal is from horizontal loudspeaker layout and output has enough horizontal speakers present. Regardless, this is very easy to reproduce.

Ways to reproduce

./IVAS_cod -mc 5_1 32000 48 scripts/testv/stv51MC48c.wav debug.bit
./IVAS_dec scripts/ls_layouts/16ch_8+4+4.txt 48 debug.bit out.wav