Commit 6d4cebdf authored by vaclav's avatar vaclav
Browse files

Merge branch '1440-missing-amr-wb-io-memory-reset' into 'main'

Fix missing AMR-WB IO memory reset

See merge request !2385
parents 75599327 d6414eb8
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -205,6 +205,7 @@


#define FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING    /* Orange: Fix for basop issue 2184 - to prevent one channel from becoming inaudible in the mono downmix output */
#define FIX_1440_AMR_WB_RESET                           /* VA: issue 1440: Fix missing AMR-WB IO memory reset (applicable to float only) */

/* ##################### End NON-BE switches ########################### */

+11 −0
Original line number Diff line number Diff line
@@ -295,6 +295,17 @@ ivas_error amr_wb_dec(
        st->bfi_pitch_frame = L_FRAME;
    }

#ifdef FIX_1440_AMR_WB_RESET
    if ( st->last_core != AMR_WB_CORE )
    {
        /* reset the unvoiced/audio signal improvement memories */
        isp2a( st->lsp_old, st->hAmrwb_IO->old_Aq, M );
        mvr2r( st->hAmrwb_IO->old_Aq, st->hAmrwb_IO->old_Aq + ( M + 1 ), M + 1 );
        mvr2r( st->hAmrwb_IO->old_Aq, st->hAmrwb_IO->old_Aq + 2 * ( M + 1 ), M + 1 );
        mvr2r( st->hAmrwb_IO->old_Aq, st->hAmrwb_IO->old_Aq + 3 * ( M + 1 ), M + 1 );
    }

#endif
    if ( st->last_bwidth == NB && st->ini_frame != 0 )
    {
        st->rate_switching_reset = 1;