diff --git a/lib_com/mslvq_com.c b/lib_com/mslvq_com.c index 6872642c1be78a9c87e7d353468b7376d71782c5..282741fb0feddf97fc8252554e0309d9856e2a2f 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 872740aa8ccedaf3a0ce72da4822915bba80fc2c..66bf87943c2bbf7cd2d572e64a674dca2b733f49 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -171,6 +171,7 @@ #define NONBE_FIX_1056_ISM_RATE_SWITCH /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */ #define NON_BE_FIX_1048_THRESHOLD_COH_BASOP /* Nokia: Fix 1048 replace comparison with 0 with comparison to threshold, to align with BASOP*/ +#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 ########################### */