From b5d895ed6207791e4f65db895fd95740717c595e Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 27 Jul 2023 13:16:21 +0200 Subject: [PATCH 1/2] Add draft fix for issue 639 under CR_FIX_639_HQ_ACELP_TRANSITION --- lib_com/options.h | 2 +- lib_dec/acelp_core_dec.c | 11 +++++++++++ lib_enc/acelp_core_enc.c | 11 +++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index c2bc0b866b..f11c758a9a 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -217,7 +217,7 @@ /* any switch which is non-be wrt operation points tested in selection */ /* all switches in this category should start with "CR_" */ #define CR_FIX_585_MASA_2TC_DTX_EXT /* Nokia: issue 585: fixes transition artifacts in MASA 2TC DTX by applying correct condition */ - +#define CR_FIX_639_HQ_ACELP_TRANSITION /* Ericsson: Issue 639: Wrong sampling rate of SWB TBE excitation memory in 16 kHz core for DFT Stereo@32 kbps */ /* ##################### End NON-BE CR switches ########################### */ diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index 8d5e9de34d..84210a18f4 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -707,7 +707,18 @@ ivas_error acelp_core_dec( if ( st->last_core != ACELP_CORE && st->element_mode > EVS_MONO ) { /* Prepare ACB memory of old_bwe_exc */ +#ifdef CR_FIX_639_HQ_ACELP_TRANSITION + if (st->L_frame == L_FRAME ) + { + lerp( old_exc, old_bwe_exc, L_EXC_MEM_DEC * HIBND_ACB_L_FAC, L_EXC_MEM_DEC ); + } + else + { + lerp( old_exc, old_bwe_exc, L_EXC_MEM_DEC * 2, L_EXC_MEM_DEC ); + } +#else lerp( old_exc, old_bwe_exc, L_EXC_MEM_DEC * HIBND_ACB_L_FAC, L_EXC_MEM_DEC ); +#endif } /*-----------------------------------------------------------------* diff --git a/lib_enc/acelp_core_enc.c b/lib_enc/acelp_core_enc.c index d78f9bf258..ac6c820fa1 100644 --- a/lib_enc/acelp_core_enc.c +++ b/lib_enc/acelp_core_enc.c @@ -461,7 +461,18 @@ ivas_error acelp_core_enc( if ( st->last_core != ACELP_CORE && st->element_mode > EVS_MONO ) { /* Prepare ACB memory of old_bwe_exc */ +#ifdef CR_FIX_639_HQ_ACELP_TRANSITION + if ( st->L_frame == L_FRAME ) + { + lerp( old_exc, old_bwe_exc, L_EXC_MEM_DEC * HIBND_ACB_L_FAC, L_EXC_MEM_DEC ); + } + else + { + lerp( old_exc, old_bwe_exc, L_EXC_MEM_DEC * 2, L_EXC_MEM_DEC ); + } +#else lerp( old_exc, old_bwe_exc, L_EXC_MEM_DEC * HIBND_ACB_L_FAC, L_EXC_MEM_DEC ); +#endif } -- GitLab From 5b4d0bb04b8c5a7fb9353fa867047a4c6342bade Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 2 Aug 2023 18:24:57 +0200 Subject: [PATCH 2/2] formatting --- lib_com/options.h | 1 + lib_dec/acelp_core_dec.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 9cba1b5eda..74d5e4b4cc 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -225,6 +225,7 @@ /* all switches in this category should start with "CR_" */ #define CR_FIX_585_MASA_2TC_DTX_EXT /* Nokia: issue 585: fixes transition artifacts in MASA 2TC DTX by applying correct condition */ #define CR_FIX_639_HQ_ACELP_TRANSITION /* Ericsson: Issue 639: Wrong sampling rate of SWB TBE excitation memory in 16 kHz core for DFT Stereo@32 kbps */ + /* ##################### End NON-BE CR switches ########################### */ diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index 84210a18f4..1a909ac037 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -708,7 +708,7 @@ ivas_error acelp_core_dec( { /* Prepare ACB memory of old_bwe_exc */ #ifdef CR_FIX_639_HQ_ACELP_TRANSITION - if (st->L_frame == L_FRAME ) + if ( st->L_frame == L_FRAME ) { lerp( old_exc, old_bwe_exc, L_EXC_MEM_DEC * HIBND_ACB_L_FAC, L_EXC_MEM_DEC ); } -- GitLab