diff --git a/lib_com/cnst.h b/lib_com/cnst.h index 3787d63b81896cd24fd22e9c82e909a3b24b154a..d267362628989bb04ae1b46718b671c07f14750a 100644 --- a/lib_com/cnst.h +++ b/lib_com/cnst.h @@ -742,6 +742,10 @@ 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 */ #define STEP_AMR_WB_SID 2.625f /* CNG & DTX - CNG energy quantization step */ diff --git a/lib_enc/dtx.c b/lib_enc/dtx.c index 4efa8e1f63c553a92f113e7b0e8697b1a514e485..15b1412d1c01b53277780c2119037fe9fc478d46 100644 --- a/lib_enc/dtx.c +++ b/lib_enc/dtx.c @@ -68,10 +68,8 @@ #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 -#define DTX_THR 5 /* lp_noise threshold for DTX at higher bitrates */ #endif - /*-------------------------------------------------------------------* * Local function prototypes *-------------------------------------------------------------------*/ diff --git a/lib_enc/ivas_ism_dtx_enc.c b/lib_enc/ivas_ism_dtx_enc.c index f253e335fc0197e221d469c4b12486a3450c0b0c..094c8dbbe9b7fd79520d53a1dfbbab9fdcb30c57 100644 --- a/lib_enc/ivas_ism_dtx_enc.c +++ b/lib_enc/ivas_ism_dtx_enc.c @@ -155,7 +155,11 @@ 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; }