Commit f03f2c70 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch '738-sanitizer-issue-in-igf-with-bitrate-switch-in-sba-encoding-mode' into 'main'

[Non-BE] Resolve "Sanitizer issue in IGF with bitrate switch in SBA encoding mode"

See merge request !1014
parents 9b8da097 e73e58e7
Loading
Loading
Loading
Loading
Loading

lib_com/options.h

100644 → 100755
+1 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@
#define NONBE_FIX_752_OSBA_MISCONFIG_MCT                      /* FhG: issue 752: misconfiguration of MCT causes crashes for coding with sampling rate under 48kHz at 256kbps*/
#define NONBE_FIX_780_ISM_STARTS_WITH_SID                     /* VA: issue 780: fix Crash in ISM decoding when bitstream starts with an SID and output_config is not EXT */
#define NONBE_FIX_ISM_DTX_INFINITE_CNG_ON_TRAILING_SILENCE    /* FhG: fix for cng in ISM DTX on sudden silence periods - JBM addon (issue 552) */
#define NONBE_FIX_738_SBA_BR_SW_ASAN                       /* FhG: issue 738: fixes bug when switching to an MCT bitrate and previous frame was ACELP */

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

lib_enc/ivas_mct_core_enc.c

100644 → 100755
+14 −0
Original line number Diff line number Diff line
@@ -337,6 +337,13 @@ void ivas_mct_core_enc(
        }
        nSubframes = ( sts[ch]->hTcxEnc->tcxMode == TCX_20 ) ? 1 : NB_DIV;
        L_subframeTCX = sts[ch]->hTcxEnc->L_frameTCX / nSubframes;
#ifdef NONBE_FIX_738_SBA_BR_SW_ASAN
        /* in MCT only relevant for bitrate switching from non-MCT bitrates */
        if ( sts[ch]->last_core == ACELP_CORE )
        {
            L_subframeTCX += L_subframeTCX / 4;
        }
#endif

        for ( n = 0; n < nSubframes; n++ )
        {
@@ -387,6 +394,13 @@ void ivas_mct_core_enc(
        }
        nSubframes = ( st->hTcxEnc->tcxMode == TCX_20 ) ? 1 : NB_DIV;
        L_subframeTCX = st->hTcxEnc->L_frameTCX / nSubframes;
#ifdef NONBE_FIX_738_SBA_BR_SW_ASAN
        /* in MCT only relevant for bitrate switching from non-MCT bitrates */
        if ( st->last_core == ACELP_CORE )
        {
            L_subframeTCX += L_subframeTCX / 4;
        }
#endif

        if ( ( st->hTcxEnc->tcxMode == TCX_20 ) && ( st->total_brate < HQ_96k || st->igf ) )
        {