From 8c633af9e6e2daf376d865b05a7e0a2565623430 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 25 Sep 2023 17:32:24 +0200 Subject: [PATCH] fix wrong expression --- lib_com/options.h | 1 + lib_enc/ivas_tcx_core_enc.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 942b28011d..b54a5314b5 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -180,6 +180,7 @@ #define FIX_796_MCT_MODE_DIFF_JBM /* FhG: Issue 796: fix differences between JBM and non-JBM fOR MC */ #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK /* fix 755 */ #define FIX_803_SCE_MD_HANDLE /* VA: issue 803: Resolve "MD handle needed only for one SCE" */ +#define FIX_790_TCX_INIT /* FhG: issue 790: Fix wrong expression in TCX config */ /* #################### End BE switches ################################## */ diff --git a/lib_enc/ivas_tcx_core_enc.c b/lib_enc/ivas_tcx_core_enc.c index afffd43092..c58e2a3533 100644 --- a/lib_enc/ivas_tcx_core_enc.c +++ b/lib_enc/ivas_tcx_core_enc.c @@ -89,7 +89,11 @@ void stereo_tcx_init_enc( st->L_frame = (int16_t) ( st->sr_core / FRAMES_PER_SEC ); st->hTcxEnc->L_frameTCX = (int16_t) ( st->input_Fs / FRAMES_PER_SEC ); +#ifdef FIX_790_TCX_INIT + if ( ( st->L_frame == L_FRAME16k && ( st->bits_frame_nominal * FRAMES_PER_SEC ) <= MAX_ACELP_BRATE ) || ( st->tcxonly && ( st->sr_core == 2 * INT_FS_16k || st->sr_core == INT_FS_16k ) ) ) +#else if ( ( st->L_frame == L_FRAME16k && ( st->bits_frame_nominal * FRAMES_PER_SEC ) <= MAX_ACELP_BRATE ) || ( st->tcxonly && ( st->sr_core == INT_FS_16k || st->sr_core == INT_FS_16k ) ) ) +#endif { st->nb_subfr = NB_SUBFR16k; } -- GitLab