Skip to content

decoder crash for low-level signal

with c7b43a06 and this bitstream :

P800-3-c1d_-stereo_16400_48.zip

the decoder crashes at frame 2877 in the function ivas_wb_tbe_dec_fx() (Ln972 of swb_tbe_dec_fx.c)

        Lscale = root_a_over_b_fx( curr_pow, shl_r( Q_bwe_exc_ext, 1 ), prev_pow,
                                   shl_r( sub( st_fx->prev_Q_bwe_exc, 16 ), 1 ), &exp );

        FOR( i = 0; i < L_SHB_LAHEAD / 4 - 1; i++ )
        {
            L_tmp = Mult_32_16( Lscale, shaped_wb_excitation[i] );     /* Q(16-exp+Q_bwe_exc_ext) */
   -->>     shaped_wb_excitation[i] = round_fx( L_shl( L_tmp, exp ) ); /* Q_bwe_exc_ext */
            move16();
        }

Using saturation for the L_shl and rounding solves it, but to me it seems a bit strange given the signal amplitude at that frame is around ± 16, so very low