Commit 64c4f7b1 authored by premathasara's avatar premathasara
Browse files

Encapsulate fix in a compilation flag

parent dcbb024d
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -836,7 +836,9 @@ typedef enum {
#define SBA_MIN_BRATE_HOA                       IVAS_256k
#define SBA_NHARM_HOA3                          16
#define SBA_T_DESIGN_11_SIZE                    70
#ifdef FIX_SBA_DTX_DECODE_ERROR
#define SBA_DTX_BITRATE_THRESHOLD               IVAS_80k
#endif

typedef enum 
{
+1 −0
Original line number Diff line number Diff line
@@ -150,6 +150,7 @@
#define AGC_ENABLE_FOR_LBR                              /* Issue 168: Enable AGC for low bit rate (1 TC) */
#endif
#define FIX_TCX_DEC_RECONF_BFI
#define FIX_SBA_DTX_DECODE_ERROR                        /* Issue 176: SBA decoder error with DTX at 80kbps SWB, Issue 21: SBA front-VAD threshold (203) */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+4 −0
Original line number Diff line number Diff line
@@ -396,7 +396,11 @@ ivas_error front_vad_spar(
    hFrontVad = hSpar->hFrontVad;
    st = hSpar->hCoreCoderVAD;

#ifdef FIX_SBA_DTX_DECODE_ERROR
    if ( hEncoderConfig->Opt_DTX_ON && hEncoderConfig->ivas_total_brate <= SBA_DTX_BITRATE_THRESHOLD )
#else
    if ( hEncoderConfig->Opt_DTX_ON && hEncoderConfig->ivas_total_brate <= IVAS_80k )
#endif
    {
        /*------------------------------------------------------------------*
         * Initialization
+5 −0
Original line number Diff line number Diff line
@@ -310,8 +310,13 @@ ivas_error ivas_spar_enc(

    *nb_bits_metadata = hMetaData->nb_bits_tot;

#ifdef FIX_SBA_DTX_DECODE_ERROR
    /* Force IVAS front pre-proc decision for higher bitrates */
    if ( hEncoderConfig->ivas_total_brate > SBA_DTX_BITRATE_THRESHOLD || hEncoderConfig->Opt_DTX_ON == 0 )
#else
    /* temp hack to not force IVAS front pre-proc decision for higher bitrates */
    if ( hEncoderConfig->ivas_total_brate > IVAS_64k || hEncoderConfig->Opt_DTX_ON == 0 )
#endif
    {
        st_ivas->hSpar->front_vad_flag = 0;
    }