From c01a90003e4d137e85de8eb49fe429926d4f3bf4 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Sat, 27 May 2023 21:54:22 +0300 Subject: [PATCH] Fix issue 170 by removing DTX limitation for MASA. --- lib_com/options.h | 1 + lib_enc/lib_enc.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index dccc11cf17..31ece548c6 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -220,6 +220,7 @@ #define FIX_483 /* FhG: fix issue 483, division by zero in nois_est */ #define FIX_483b /* FhG: fix issue 483, uninitialized values in ivas_mct_core_enc */ +#define FIX_170_DTX_MASA /* Nokia: Fix issue 170, relaxing the use of DTX in MASA format */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c index 2e56f384ec..62610838a5 100755 --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -895,11 +895,18 @@ static ivas_error configureEncoder( return IVAS_ERROR( IVAS_ERR_INVALID_SAMPLING_RATE, "8kHz input sampling rate is not supported in IVAS." ); } +#ifdef FIX_170_DTX_MASA + if ( hEncoderConfig->Opt_DTX_ON && hEncoderConfig->ivas_format != MONO_FORMAT && + ( ( hEncoderConfig->ivas_format == SBA_FORMAT && ivas_get_sba_num_TCs( hEncoderConfig->ivas_total_brate, 1 ) > 2 ) || // ToDo: support for 3+ TCs to be done + hEncoderConfig->ivas_format == MC_FORMAT // ToDo: TBD + ) ) +#else if ( hEncoderConfig->Opt_DTX_ON && hEncoderConfig->ivas_format != MONO_FORMAT && ( ( hEncoderConfig->ivas_format == MASA_FORMAT && hEncoderConfig->ivas_total_brate > IVAS_128k ) || // ToDo: remove the bitrate limitation ( hEncoderConfig->ivas_format == SBA_FORMAT && ivas_get_sba_num_TCs( hEncoderConfig->ivas_total_brate, 1 ) > 2 ) || // ToDo: support for 3+ TCs to be done hEncoderConfig->ivas_format == MC_FORMAT // ToDo: TBD ) ) +#endif { return IVAS_ERROR( IVAS_ERR_DTX_NOT_SUPPORTED, "DTX is not supported in this IVAS format and element mode." ); } -- GitLab