Skip to content

Crash in Stereo 16.4 kbps

in 6aad3441, there is a saturation in the BWE that causes a crash at 16.4 kbps for the following bitstream (created with the floating point encoder)

stereo_16400_32.zip

Once unzipped, the command line is: IVAS_DEC STEREO 32 stereo_16400_32.bit syn

The problem is located in swb_bwe_dec_fx.c around line 727 and here is the proposed solution :

#ifdef BASOP_NOGLOB
        quant_tmp[1] = add_sat( shr( add_sat( quant_tmp[0], quant_tmp[2] ), 1 ), Env_TR_Cdbk2_fx[tmp] );
        /* To prevent an unnecessary saturation, it would be better to write the code as below, but might have an impact on EVS bit exactness */
        /* quant_tmp[1] = add( extract_h( L_mac( L_mult( quant_tmp[0], 16384 ), quant_tmp[2], 16384 ) ), Env_TR_Cdbk2_fx[tmp] ); */
#else
        quant_tmp[1] = add( shr( add( quant_tmp[0], quant_tmp[2] ), 1 ), Env_TR_Cdbk2_fx[tmp] );
#endif        

*** causes also an issue at 13.2kbps

Edited by vaillancour