Commit 4e63c604 authored by malenovsky's avatar malenovsky
Browse files

Merge branch '1055-usan-nan-value-in-ism2-bitrate-switching' into 'main'

[non-BE] Resolve "USAN: NaN value in ISM2 bitrate switching"

See merge request !1495
parents 592fb28d 2ff60b7c
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -166,6 +166,8 @@
/* any switch which is non-be wrt selection floating point code */
/* all switches in this category should start with "NONBE_" */

#define NON_BE_1055_RESET_LP_MEMORIES                   /* VA: issue 1055: Correctly reset LP filter MA and AR memories in bitrate switching */


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

+4 −0
Original line number Diff line number Diff line
@@ -521,7 +521,11 @@ void updt_dec_common(
        st->stab_fac_smooth_lt = ENV_SMOOTH_FAC * st->stab_fac + ( 1.0f - ENV_SMOOTH_FAC ) * st->stab_fac_smooth_lt;
    }

#ifdef NON_BE_1055_RESET_LP_MEMORIES
    if ( ( st->core_brate <= SID_2k40 && st->cng_type == FD_CNG ) || ( st->tcxonly && ( st->codec_mode == MODE2 || st->element_mode > EVS_MONO ) ) )
#else
    if ( ( st->core_brate <= SID_2k40 && st->cng_type == FD_CNG ) || ( st->tcxonly && st->codec_mode == MODE2 ) )
#endif
    {
        /* reset LP memories */
        set_zero( st->mem_MA, M );
+4 −0
Original line number Diff line number Diff line
@@ -92,7 +92,11 @@ void core_encode_update(
        }
    }

#ifdef NON_BE_1055_RESET_LP_MEMORIES
    if ( ( st->Opt_DTX_ON && st->core_brate <= SID_2k40 && st->cng_type == FD_CNG ) || ( st->tcxonly && ( st->codec_mode == MODE2 || st->element_mode > EVS_MONO ) ) )
#else
    if ( ( st->Opt_DTX_ON && st->core_brate <= SID_2k40 && st->cng_type == FD_CNG ) || ( st->tcxonly && st->codec_mode == MODE2 ) )
#endif
    {
        /* reset LP memories */
        set_zero( st->mem_MA, M );