Skip to content

Decoder crash in icBWE for low level signal

with c7b43a06 and this bitstream :

P800-7-c1a_-stereo_24400_48.zip

at frame 863 in the function stereo_icBWE_dec_fx() from file stereo_icBWE_dec.c at Ln1424.

            IF( LT_16( tmp, 4096 ) )
            {
                temp1_fx = 0;
                move16();
                temp2_fx = 0;
                move16();
                tmp = shl( tmp, 2 );
                icbweM2Ref_fx = Sqrt16( sub( 16384, tmp ), &temp1_fx );
                icbweM2Ref_fx = BASOP_Util_Divide1616_Scale( icbweM2Ref_fx, sub( 32767, ratio_L_fx ), &temp2_fx );
 --->>>         icbweM2Ref_fx = shl( icbweM2Ref_fx, add( temp2_fx, sub( temp1_fx, 1 ) ) ); // Q14
            }

Here again the problem can be solved by using shl_sat(), if we go this way, I think it should be done at line 1395 as well.