From e7f7ad971b1975bbf859b593720f3920d161fa1f Mon Sep 17 00:00:00 2001 From: Adriana Vasilache Date: Fri, 12 Jul 2024 11:28:55 +0300 Subject: [PATCH] fix 807 --- lib_com/options.h | 1 + lib_dec/acelp_core_dec.c | 4 ++++ lib_enc/acelp_core_enc.c | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 47e6a2721..f22725772 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -72,6 +72,7 @@ #define NONBE_MDCT_ST_PLC_DO_NOT_SCALE_OLD_OUT_IF_FIRST_GOOD_IS_SID /* FhG: issue 1133: in TCX PLC, don't scale hHQ_core->old_out after applying fade to noise in burst frame error */ #define NON_BE_FIX_1137_GSC_IVAS_FXFLT_DECODING /* VA: Add fix point bit allocation for special GSC mode such that float and fixed point have the same final bit allocation */ +#define NON_BE_FIX_807_MASA_DTX_BRSW /* Nokia: adds fix to check existence of DTX encoder for secondary channel in TD mode */ /* #################### End FIXES switches ############################ */ #define BASOP_NOGLOB /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */ diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index 5218f6010..9a1554910 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -228,7 +228,11 @@ ivas_error acelp_core_dec( st->hGSCDec->Last_frame_ener = (float) MAX_32; } +#ifdef NON_BE_FIX_807_MASA_DTX_BRSW + if ( st->hFdCngDec != NULL && ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD ) && ( st->last_core_brate == SID_2k40 || st->last_core_brate == FRAME_NO_DATA ) ) +#else if ( ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD ) && ( st->last_core_brate == SID_2k40 || st->last_core_brate == FRAME_NO_DATA ) ) +#endif { set_zero( st->hFdCngDec->hFdCngCom->olapBufferSynth2, FFTLEN ); set_zero( hStereoCng->olapBufferSynth22, FFTLEN ); diff --git a/lib_enc/acelp_core_enc.c b/lib_enc/acelp_core_enc.c index 7162bdeea..747710020 100644 --- a/lib_enc/acelp_core_enc.c +++ b/lib_enc/acelp_core_enc.c @@ -371,8 +371,11 @@ ivas_error acelp_core_enc( /*-----------------------------------------------------------------* * After inactive period, use the most up-to-date ISPs *-----------------------------------------------------------------*/ - +#ifdef NON_BE_FIX_807_MASA_DTX_BRSW + if ( st->hDtxEnc != NULL && ( st->last_core_brate == FRAME_NO_DATA || st->last_core_brate == SID_2k40 )) +#else if ( st->last_core_brate == FRAME_NO_DATA || st->last_core_brate == SID_2k40 ) +#endif { mvr2r( st->hDtxEnc->lspCNG, st->lsp_old, M ); lsp2lsf( st->hDtxEnc->lspCNG, st->lsf_old, M, int_fs ); -- GitLab