From 3592574f5f22d99793f777805dee150745bc1a48 Mon Sep 17 00:00:00 2001 From: Adriana Vasilache Date: Wed, 3 Apr 2024 11:11:55 +0300 Subject: [PATCH] fix 1054 --- lib_com/mslvq_com.c | 4 ++++ lib_com/options.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_com/mslvq_com.c b/lib_com/mslvq_com.c index 6872642c1b..282741fb0f 100644 --- a/lib_com/mslvq_com.c +++ b/lib_com/mslvq_com.c @@ -828,7 +828,11 @@ void deindex_lvq_SHB( /* find idx_leader */ i = 1; +#ifdef NONBE_FIX_1054_NEGATIVE_LVQ_INDEX + while ( index > table_no_cv[i] ) +#else while ( index >= table_no_cv[i] ) +#endif { i++; } diff --git a/lib_com/options.h b/lib_com/options.h index 34c6f7410a..26792dd376 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -165,7 +165,7 @@ /* #################### Start NON-BE switches ############################ */ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ - +#define NONBE_FIX_1054_NEGATIVE_LVQ_INDEX /* Nokia: issue 1054: Input to decode_comb in deindex_lvq_SHB should be positive */ /* ##################### End NON-BE switches ########################### */ -- GitLab