Commit 28620421 authored by Manuel Jander's avatar Manuel Jander
Browse files

Fix saturation crash in stereo_tcx_core_enc(), pytest on merge fail.

parent 58833616
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -560,8 +560,8 @@ void stereo_tcx_core_enc(
    IF( st->tcxonly == 0 )
    {
#ifdef NONBE_FIX_ISSUE_2206
        s = s_min( s, add( norm_s( st->wspeech_enc[st->L_frame - 1] ), sub( sub( Q15, st->exp_buf_wspeech_enc ), Q_new ) ) );
        /* st->wspeech_enc[st->L_frame - 1] needs to be at the same scale as st->synth, Q0, inside tcx_encoder_memory_update_ivas_fx() */
        s = s_min( s, add( norm_s( st->wspeech_enc[st->L_frame - 1] ), sub( Q15, st->exp_buf_wspeech_enc ) ) );
        /* st->wspeech_enc[st->L_frame - 1] needs to be at the same scale as st->synth, st->Q_syn = 0 + s, inside tcx_encoder_memory_update_ivas_fx() */
        wspeech_backup = st->wspeech_enc[st->L_frame - 1];
        move16();
        st->wspeech_enc[st->L_frame - 1] = shl( st->wspeech_enc[st->L_frame - 1], sub( s, sub( Q15, st->exp_buf_wspeech_enc ) ) );