From d775b94ff2ef10a04f44a69eef83ced512a0edb0 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Mon, 19 May 2025 16:13:17 +0200 Subject: [PATCH] port MR 1372 from float fix for USAN error in OMASA JBM decoding --- lib_com/options.h | 1 + lib_dec/lib_dec_fx.c | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 53cac6f84..b2fba1dd3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -115,6 +115,7 @@ #define NONBE_FIX_951_MCMASA_5MS_RENDERING /* Nokia: issue #951: Differences for 5ms and 20ms rendering for McMASA at 13.2 kbps to BINAURAL */ #define NONBE_FIX_979_OSBA_STEREO_5MS /* FhG : issue #979 : 5ms and 20ms output different for OSBA and stereo */ #define FIX_983_DISC_ISM_DIGEST_NUM_OBJS /* FhG: issue #983: the discrete ISM digest function uses the wrong number of objects */ +#define NONBE_FIX_975_JBM_USAN /* FhG: Fix issue #975, USAN in JBM decoding ad 13.2kbps */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/lib_dec_fx.c b/lib_dec/lib_dec_fx.c index 63f0ab53f..9cf06bdfb 100644 --- a/lib_dec/lib_dec_fx.c +++ b/lib_dec/lib_dec_fx.c @@ -2998,8 +2998,21 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( return IVAS_ERR_INVALID_BITSTREAM; } - /* check if frame contains a partial copy and get its offset */ - evs_dec_previewFrame( au, auSize, &partialCopyFrameType, &partialCopyOffset ); + +#ifdef NONBE_FIX_975_JBM_USAN + partialCopyFrameType = 0; + move16(); + partialCopyOffset = 0; + move16(); + + IF( EQ_16( hIvasDec->mode, (Word16) IVAS_DEC_MODE_EVS ) ) + { +#endif + /* check if frame contains a partial copy and get its offset */ + evs_dec_previewFrame( au, auSize, &partialCopyFrameType, &partialCopyOffset ); +#ifdef NONBE_FIX_975_JBM_USAN + } +#endif /* create data unit for primary copy in the frame */ dataUnit = JB4_AllocDataUnit( hIvasDec->hVoIP->hJBM ); -- GitLab