From fade3468cfb5b0f335bf2f590b10bf7951576f9a Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Fri, 11 Aug 2023 11:14:09 +0200 Subject: [PATCH] Fix for false BER_detect in FIX_685_BER_IN_HVQ --- lib_com/options.h | 1 + lib_dec/peak_vq_dec.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index cd53058025..e8b2dede90 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -241,6 +241,7 @@ #define FIX_657_REMOVE_EDITING /* Nokia: Remove remaining unused coded related to object editing */ #define FIX_634_MASA_JBM_UNUSED_PARAMETER /* Nokia: Fix issue 634 by removing the unnecessary argument. */ #define FIX_675_WB_OMASA /* Nokia: Fix for issue 675 solving the crash in OMASA for WB input */ +#define FIX_685_BER_IN_HVQ /* Eri: Fix for issue 685. Invalid configuration in EVS now happening in IVAS with variable rate core. Remove BER warning for IVAS. */ /* ################## End BE DEVELOPMENT switches ######################### */ diff --git a/lib_dec/peak_vq_dec.c b/lib_dec/peak_vq_dec.c index df238a057f..107f87b852 100644 --- a/lib_dec/peak_vq_dec.c +++ b/lib_dec/peak_vq_dec.c @@ -280,7 +280,11 @@ static void peak_vq_dec( pvq_bands = hvq_pvq_bitalloc( pvq_bits, core_brate, st->bwidth, ynrm, manE_peak, expE_peak, Rk, R, sel_bnds, &n_sel_bnds ); /* safety check in case of bit errors */ +#ifdef FIX_685_BER_IN_HVQ + if ( ( pvq_bands == 0 ) && st->element_mode == EVS_MONO ) /* PVQ bands may be zero for IVAS */ +#else if ( pvq_bands == 0 ) +#endif { st->BER_detect = 1; } -- GitLab