Commit 2fd43ece authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

TCX bitrate limitation only when DEBUGGING is active

parent 7e298182
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -153,8 +153,8 @@
#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 */
#define FIX_572_LFE_LPF_ENC                             /* FhG: issue 572: always apply the low pass filter to the LFE channel */

#define FIX_QMETA_SID_5k2                               /* Nokia: Issue 137: enable using full 5.2k bitrate in MASA SID */
#define FIX_TCX_LOWRATE_LIMITATION                      /* VA: issue 577: TCX bitrate limitation only when DEBUGGING is active */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+26 −9
Original line number Diff line number Diff line
@@ -219,7 +219,9 @@ void ivas_decision_matrix_enc(
        {
            st->core = HQ_CORE;
        }
    }

#ifndef FIX_TCX_LOWRATE_LIMITATION
    /* TCX not available at low bitrates -> replace it by GSC */
    if ( st->core == TCX_20_CORE && st->total_brate < STEREO_TCX_MIN_RATE )
    {
@@ -232,6 +234,21 @@ void ivas_decision_matrix_enc(
            st->coder_type = INACTIVE;
        }
    }
#endif
#endif

#ifdef FIX_TCX_LOWRATE_LIMITATION
    /* TCX not available at low bitrates -> replace it by GSC */
    if ( st->core == TCX_20_CORE && st->total_brate < STEREO_TCX_MIN_RATE )
    {
        st->core = ACELP_CORE;
        st->coder_type = AUDIO;
        st->sp_aud_decision2 = 0;

        if ( st->low_rate_mode )
        {
            st->coder_type = INACTIVE;
        }
    }
#endif