Commit ed7ce757 authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD

parent d7f2126e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -742,9 +742,7 @@ typedef enum
#define GAIN_PRED_ORDER                     4                       /* Gain quantization - prediction order for gain quantizer (only for AMR-WB IO mode) */
#define MEAN_ENER                           30                      /* Gain quantization - average innovation energy */

#ifdef NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD
#define DTX_THR                             5                       /* DTX - lp_noise threshold for DTX at higher bitrates */
#endif

#define DTX_HIST_SIZE                       8                       /* CNG & DTX - number of last signal frames used for CNG averaging */
#define CNG_ISF_FACT                        0.9f                    /* CNG & DTX - CNG spectral envelope smoothing factor */
+0 −2
Original line number Diff line number Diff line
@@ -169,10 +169,8 @@
/* any switch which is non-be wrt selection floating point code */
/* all switches in this category should start with "NONBE_" */

#define NONBE_1279_COUNTER_OVERFLOW                     /* VA: issue 1279: Avoid possible overflow of counter st->Nb_ACELP_frames */
#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ 
#define NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING           /* Ericsson: issue 1180, corrected long term mute loop attnuation after 200ms  in PhECU-PLC  */
#define NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD      /* VA/Eri: issue 1277: Fix Mismatch in DTX high-rate threshold between EVS float and BASOP */

#define NONBE_1231_BASOP_819_THRESHOLD_MASA2TOTAL        /* Nokia: add fix for precision limitation in comparison with masa2total energy ratio threshold to be aligned with BASOP*/
/* ##################### End NON-BE switches ########################### */
+0 −4
Original line number Diff line number Diff line
@@ -167,14 +167,10 @@ ivas_error acelp_core_enc(
    {
        st->Nb_ACELP_frames = 0;
    }
#ifdef NONBE_1279_COUNTER_OVERFLOW
    if ( st->Nb_ACELP_frames < MAX16B )
    {
        st->Nb_ACELP_frames++;
    }
#else
    st->Nb_ACELP_frames++;
#endif

    if ( st->L_frame == L_FRAME )
    {
+0 −16
Original line number Diff line number Diff line
@@ -66,9 +66,7 @@
#define MAX_BRATE_DTX_EVS  ACELP_24k40 /* maximum bitrate to which the default DTX is applied in EVS; otherwise DTX is applied only in silence */
#define MAX_BRATE_DTX_IVAS IVAS_80k    /* maximum bitrate to which the default DTX is applied in IVAS; otherwise DTX is applied only in silence */

#ifdef NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD
#define DTX_THR_EVS 15 /* lp_noise threshold for DTX at higher bitrates in EVS */ // ToDo: to be removed once EVS is CR fixed
#endif

/*-------------------------------------------------------------------*
 * Local function prototypes
@@ -94,7 +92,6 @@ void dtx(
    DTX_ENC_HANDLE hDtxEnc = st->hDtxEnc;
    int16_t last_br_cng_flag, last_br_flag, br_dtx_flag;
    int32_t total_brate_ref;
#ifdef NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD
    int16_t dtx_thr;

    dtx_thr = DTX_THR;
@@ -102,7 +99,6 @@ void dtx(
    {
        dtx_thr = DTX_THR_EVS; // ToDo: to be removed once EVS is CR fixed
    }
#endif

    total_brate_ref = st->total_brate;

@@ -113,18 +109,10 @@ void dtx(
    }
    else
    {
#ifdef NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD
        last_br_cng_flag = st->last_total_brate_cng <= MAX_BRATE_DTX_EVS || st->lp_noise < dtx_thr || ( st->element_mode == IVAS_SCE && st->last_total_brate_cng <= MAX_BRATE_DTX_IVAS );
#else
        last_br_cng_flag = st->last_total_brate_cng <= MAX_BRATE_DTX_EVS || st->lp_noise < 15 || ( st->element_mode == IVAS_SCE && st->last_total_brate_cng <= MAX_BRATE_DTX_IVAS );
#endif
        last_br_flag = ( st->element_mode == EVS_MONO && st->last_total_brate <= MAX_BRATE_DTX_EVS ) ||
                       ( st->element_mode != EVS_MONO && last_ivas_total_brate <= MAX_BRATE_DTX_IVAS ) ||
#ifdef NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD
                       st->lp_noise < dtx_thr;
#else
                       st->lp_noise < 15;
#endif
    }

    /* Initialization */
@@ -203,11 +191,7 @@ void dtx(
    {
        br_dtx_flag = ( st->element_mode == EVS_MONO && st->total_brate <= MAX_BRATE_DTX_EVS ) ||
                      ( st->element_mode != EVS_MONO && ivas_total_brate <= MAX_BRATE_DTX_IVAS ) ||
#ifdef NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD
                      st->lp_noise < dtx_thr;
#else
                      st->lp_noise < 15;
#endif
    }

    if ( st->Opt_DTX_ON && vad == 0 &&
+0 −4
Original line number Diff line number Diff line
@@ -155,11 +155,7 @@ int16_t ivas_ism_dtx_enc(
            ( nchan_ism == 2 && ivas_total_brate <= IVAS_48k ) ||
            ( nchan_ism == 3 && ivas_total_brate <= IVAS_80k ) ||
            ( nchan_ism == 4 && ivas_total_brate <= IVAS_96k ) ||
#ifdef NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD
            lp_noise_max < DTX_THR ) )
#else
            lp_noise_max < 15 ) )
#endif
    {
        dtx_flag = 0;
    }