From d8cc69435de4ace38bc8e2d35a901ae7364b23f1 Mon Sep 17 00:00:00 2001 From: Tommy Date: Tue, 12 May 2026 14:15:34 -0400 Subject: [PATCH 1/2] proposed fix to 2588, adding possible missing condition --- lib_com/options.h | 2 +- lib_dec/lsf_dec_fx.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 7a91529dc..9b2413347 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -137,7 +137,7 @@ #define NONBE_FIX_2575 /* Fhg: Fix issue 2575, precision loss in FD CNG */ #define FIX_2584_TD_SM_ISSUE /* VA: Fix inconsistencies in the SM part of the TD stereo */ #define FIX_2556_ALIGN_CONDITIONS /* VA: Fix different conditions that were not exact between float and fix, BE on self-test */ - +#define FIX_2588_MISSING_CONDITIONS /* VA: Proposed fix to 2588, addition of a condition in lsf_dec */ /* ##################### End NON-BE switches ########################### */ /* ################## End MAINTENANCE switches ######################### */ diff --git a/lib_dec/lsf_dec_fx.c b/lib_dec/lsf_dec_fx.c index b44441aaa..02f0915cc 100644 --- a/lib_dec/lsf_dec_fx.c +++ b/lib_dec/lsf_dec_fx.c @@ -409,7 +409,11 @@ void lsf_end_dec_fx( test(); test(); +#ifndef FIX_2588_MISSING_CONDITIONS IF( ( EQ_16( coder_type_org, GENERIC ) ) && ( EQ_32( st->sr_core, INT_FS_16k ) ) && ( mode2_flag == 0 ) ) +#else + IF( ( EQ_16( coder_type_org, GENERIC ) ) && ( EQ_32( st->sr_core, INT_FS_16k ) ) && ( mode2_flag == 0 ) && st->idchan == 0 ) +#endif { /* this bit is used only for primary channel or mono */ coder_type = (Word16) get_next_indice_fx( st, 1 ); /* Q0 */ -- GitLab From b011f88b7339bcc8a37764f2ad8664aef7417067 Mon Sep 17 00:00:00 2001 From: Tommy Date: Tue, 12 May 2026 14:19:51 -0400 Subject: [PATCH 2/2] fix clang --- lib_dec/lsf_dec_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/lsf_dec_fx.c b/lib_dec/lsf_dec_fx.c index 02f0915cc..dcb8ce109 100644 --- a/lib_dec/lsf_dec_fx.c +++ b/lib_dec/lsf_dec_fx.c @@ -409,7 +409,7 @@ void lsf_end_dec_fx( test(); test(); -#ifndef FIX_2588_MISSING_CONDITIONS +#ifndef FIX_2588_MISSING_CONDITIONS IF( ( EQ_16( coder_type_org, GENERIC ) ) && ( EQ_32( st->sr_core, INT_FS_16k ) ) && ( mode2_flag == 0 ) ) #else IF( ( EQ_16( coder_type_org, GENERIC ) ) && ( EQ_32( st->sr_core, INT_FS_16k ) ) && ( mode2_flag == 0 ) && st->idchan == 0 ) -- GitLab