Commit a79623e8 authored by vaclav's avatar vaclav
Browse files

Merge branch '559-crash-in-planarsba-bitrate-switching' into 'main'

[non-BE] Resolve "Crash in PlanarSBA bitrate switching"

See merge request !762
parents 78280da0 5e470586
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -171,6 +171,9 @@
#define FIX_562_ISM2_64KBPS                             /* VA: issue 562: fix ISM2 at 64kbps issue */


#define FIX_559_EXTL_IGF_MISMATCH                       /* VA: issue 559: fix mismatch between st->extl and st->igf observed as crash in PlanarSBA bitrate switching */


/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */

+4 −0
Original line number Diff line number Diff line
@@ -367,7 +367,11 @@ ivas_error ivas_core_enc(
        }

        /* SWB TBE encoder */
#ifdef FIX_559_EXTL_IGF_MISMATCH
        if ( st->extl == SWB_TBE || st->extl == FB_TBE )
#else
        if ( st->extl == SWB_TBE || st->extl == FB_TBE || ( st->igf && st->core == ACELP_CORE && st->extl != WB_TBE ) )
#endif
        {
            if ( st->core_brate != FRAME_NO_DATA && st->core_brate != SID_2k40 )
            {
+7 −0
Original line number Diff line number Diff line
@@ -288,6 +288,13 @@ ivas_error pre_proc_ivas(
    else if ( element_brate != last_element_brate )
    {
        SetModeIndex( st, st->bits_frame_nominal * FRAMES_PER_SEC, element_mode, MCT_flag );

#ifdef FIX_559_EXTL_IGF_MISMATCH
        if ( st->extl != -1 && st->extl != IGF_BWE && st->igf == 1 )
        {
            st->igf = 0;
        }
#endif
    }