BASOP Asserts for BINAURAL_ROOM_REVERB output on main-pc
Basic info
- Encoder and Decoder (main-pc): b4d3594a
Bug description
In ivas-codec-pc/ivas-codec!2176 (closed) some previously deactivated testcases are activated again for main-pc/float-pc. A pipeline run for main-pc revealed that some of these cases with BINAURAL_ROOM_REVERB output trigger a BASOP Assert:
The triggering code is in ivas_binaural_obtain_DMX_fx()
:
FOR( bandIdx = 0; bandIdx < hBinRenderer->conv_band; bandIdx++ )
{
P_out_fx = 0;
move32();
FOR( k = 0; k < numTimeSlots; k++ )
{
temp1_fx = realDMX[chOutIdx][k][bandIdx];
move32();
temp2_fx = imagDMX[chOutIdx][k][bandIdx];
move32();
P_out_fx = L_add( P_out_fx, L_add( Mpy_32_32( temp1_fx, temp1_fx ), Mpy_32_32( temp2_fx, temp2_fx ) ) ); // Q31-2*Q_in
}
test();
IF( ( P_in_fx[bandIdx] <= 0 ) || ( P_out_fx <= 0 ) )
{
factEQ_fx = 0x40000000; // 1.0f in Q30
move32();
}
ELSE
{
Word16 div = divide3232( P_in_fx[bandIdx], P_out_fx );
Word16 exp = norm_l( div );
factEQ_fx = Sqrt32( L_shl( div, Q16 ), &exp );
factEQ_fx = L_shl( factEQ_fx, sub( exp, 1 ) ); // Q30 // <--------------------- Assert happens in here
}
if ( factEQ_fx <= 0 )
{
factEQ_fx = 0x40000000; // 1.0f in Q30
move32();
}
Ways to reproduce
See here for the failed testcases. One example below
/IVAS_cod_main-pc -mc 7_1_4 160000 48 scripts/testv/stv714MC48c.wav bit
./IVAS_dec_main-pc BINAURAL_ROOM_REVERB 48 bit out.wav