From d920f1ddb703057e8711d899fc95dac1988f934c Mon Sep 17 00:00:00 2001 From: Eleni Fotopoulou Date: Fri, 16 Jan 2026 17:05:19 +0100 Subject: [PATCH 1/3] fix for issue 1283 --- lib_com/options.h | 1 + lib_enc/cod_tcx.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 08c4d0f8f9..a2092e453f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -195,6 +195,7 @@ #define FIX_2252_LP_CNG_STARTS_SID /* VA: issues 2251 and 2252: fix LP CNG uninitialized value in bitstream that starts with an SID */ #define FIX_1381_BWD /* VA: issue 1381: apply no hysteresis in BWD at higher bitrates also in mono MASA and OMASA */ #define FIX_2285_CODE_DECODER_INIT_BW /* VA: basop issue 2285: fix core-decoder initialization bandwidth */ +#define FIX_1283_STEREO_DFT_COLLAPSE /* FhG: issue 1283: fix for critical issue with DFT stereo core coder */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/cod_tcx.c b/lib_enc/cod_tcx.c index 87e703d160..9daa8094dd 100644 --- a/lib_enc/cod_tcx.c +++ b/lib_enc/cod_tcx.c @@ -728,7 +728,11 @@ void ShapeSpectrum( hTcxCfg->SFM2 = SFM_Cal( spectrum, min( 200, L_frame ) ); } +#ifndef FIX_1283_STEREO_DFT_COLLAPSE if ( ( total_brate <= ACELP_13k20 && st->bwidth == SWB ) ) +#else + if ( ( total_brate <= ACELP_13k20 && st->bwidth == SWB ) || ( st->element_brate <= IVAS_16k4 && st->element_mode == IVAS_CPE_DFT && st->bwidth == SWB ) ) +#endif { max_low_pre = 0.f; for ( i = 0; i < L_frame; i++ ) @@ -772,8 +776,12 @@ void ShapeSpectrum( v_multc( spectrum + L_frame, 1.f / gainlpc[FDNS_NPTS - 1], spectrum + L_frame, L_spec - L_frame ); } - /* reduce the peaks in the IGF region, to make life of the core-coder easier... */ +/* reduce the peaks in the IGF region, to make life of the core-coder easier... */ +#ifndef FIX_1283_STEREO_DFT_COLLAPSE if ( total_brate <= ACELP_13k20 && st->bwidth == SWB ) +#else + if ( ( total_brate <= ACELP_13k20 && st->bwidth == SWB ) || ( st->element_brate <= IVAS_16k4 && st->element_mode == IVAS_CPE_DFT && st->bwidth == SWB ) ) +#endif { int16_t dist_low, dist_high; float max_fac; -- GitLab From ad0e5b9ba2ef9b943c01c05285293168e6fa7a86 Mon Sep 17 00:00:00 2001 From: Eleni Fotopoulou Date: Fri, 16 Jan 2026 17:09:14 +0100 Subject: [PATCH 2/3] fix conflict --- lib_com/options.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_com/options.h b/lib_com/options.h index be5c979b1b..04cfac4a4f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -177,6 +177,7 @@ /* any switch which is non-be wrt. TS 26.258 V3.0 */ #define FIX_1283_STEREO_DFT_COLLAPSE /* FhG: issue 1283: fix for critical issue with DFT stereo core coder */ + /* ##################### End NON-BE switches ########################### */ /* ################## End MAINTENANCE switches ######################### */ -- GitLab From 30931ca7b41807e9e8ec6ef196d269dda22ee6c6 Mon Sep 17 00:00:00 2001 From: Eleni Fotopoulou Date: Mon, 19 Jan 2026 17:12:24 +0100 Subject: [PATCH 3/3] fix for MSAN error for StereoDMXEvs --- lib_enc/lib_enc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c index 603463b23c..569be1b8ca 100644 --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -1315,6 +1315,9 @@ ivas_error IVAS_ENC_EncodeFrameToSerial( if ( hEncoderConfig->ivas_format == MONO_FORMAT ) /* EVS mono */ { hCoreCoder->total_brate = hEncoderConfig->ivas_total_brate; /* needed in case of bitrate switching */ +#ifdef FIX_1283_STEREO_DFT_COLLAPSE + hCoreCoder->element_brate = hEncoderConfig->ivas_total_brate; /* needed in checks in core-coder functions other than mono*/ +#endif #ifdef DEBUGGING hCoreCoder->id_element = 0; #endif -- GitLab