From 2da810880dd61d45b84d824ad2b8f942ee2ee726 Mon Sep 17 00:00:00 2001 From: Fredrik Jansson Date: Fri, 24 Feb 2023 14:40:50 +0100 Subject: [PATCH] Fix for issue 357 under separate define FIX_357_DTX_32K --- lib_com/options.h | 2 +- lib_enc/dtx.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 6b22caab02..6e14066811 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,7 +160,7 @@ #define SMOOTH_WITH_TRANS_DET #endif - +#define FIX_357_DTX_32K /* Eri: issue 357 - Forced LP-CNG at 32k */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_enc/dtx.c b/lib_enc/dtx.c index c99a8faf28..bb477fbd9f 100644 --- a/lib_enc/dtx.c +++ b/lib_enc/dtx.c @@ -238,7 +238,11 @@ void dtx( } else { +#ifdef FIX_357_DTX_32K + if ( ( st->cng_type == FD_CNG && ( st->total_brate <= MAX_BRATE_DTX_EVS || ( st->element_mode != EVS_MONO && ivas_total_brate <= MAX_BRATE_DTX_IVAS ) ) ) || ( st->element_mode == IVAS_CPE_MDCT ) ) /* at highest bitrates, use exclusively LP_CNG */ +#else if ( ( st->cng_type == FD_CNG && ( st->total_brate <= MAX_BRATE_DTX_EVS || ( st->element_mode == IVAS_SCE && ivas_total_brate <= MAX_BRATE_DTX_IVAS ) ) ) || ( st->element_mode == IVAS_CPE_MDCT ) ) /* at highest bitrates, use exclusively LP_CNG */ +#endif { if ( st->element_mode == EVS_MONO && ( st->total_brate == ACELP_9k60 || st->total_brate == ACELP_16k40 || st->total_brate == ACELP_24k40 ) ) { -- GitLab