From 3654fbd70c43568c27eb479c8cebba1f2554eb3d Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Fri, 17 Nov 2023 15:49:50 -0600 Subject: [PATCH] Adding NONBE_FIX_878_RS_FEC_STEREO_CNG to address issue 878 --- lib_com/options.h | 1 + lib_dec/ivas_cpe_dec.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index d738ad025f..5e959bb660 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -163,6 +163,7 @@ #define NONBE_UNIFIED_DECODING_PATHS /* FhG: unify decoding paths */ #define NONBE_FIX_874_OMASA_BRSW_2TD /* Nokia: issue 874: Fixes the crashes with the long test vectors that prompted switching to TD*/ #define NONBE_FIX_225_MASA_EXT_REND /* Nokia: Resolve #225: Complete MASA external renderer implementation */ +#define NONBE_FIX_878_RS_FEC_STEREO_CNG /* Eri: Frame loss and Unified Stereo CNG may cause false BER detection which results in corrupt bitstream decoding */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_cpe_dec.c b/lib_dec/ivas_cpe_dec.c index d8b5ec4713..083ed0eb1b 100644 --- a/lib_dec/ivas_cpe_dec.c +++ b/lib_dec/ivas_cpe_dec.c @@ -248,6 +248,10 @@ ivas_error ivas_cpe_dec( { nb_bits -= SID_FORMAT_NBITS; sts[1]->bit_stream -= SID_FORMAT_NBITS; +#ifdef NONBE_FIX_878_RS_FEC_STEREO_CNG + /* set total bitrate of Stereo CNG parameters for BER detection */ + sts[1]->total_brate = IVAS_SID_5k2 - SID_2k40; +#endif } if ( ( ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE ) || ( st_ivas->ivas_format == MASA_ISM_FORMAT && cpe_brate < MASA_STEREO_MIN_BITRATE ) ) && ivas_total_brate > IVAS_SID_5k2 ) -- GitLab