From 1c354de46a1dc7964ba49943b0b376f4b7e8b82b Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Wed, 7 Feb 2024 11:44:40 +0100 Subject: [PATCH 1/4] fix #975, only check for a partial copy in EVS decoding mode --- lib_com/options.h | 1 + lib_dec/lib_dec.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index cd786074fa..de5f2451ae 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,6 +160,7 @@ #define FIX_959_MASA_LINEAR_REND /* VA: issue 959: remove unused calling of ivas_sba_linear_renderer() in MASA rendering */ #define FIX_963_USAN_ERROR /* Eri: Issue 963: USAN error in Stereo CNG, division by zero */ #define FIX_971_LOG2_IDX_GAIN_0 /* VA: prevent -Inf due to log2(ratio==0) */ +#define FIX_975_JBM_USAN /* #################### End BE switches ################################## */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 405a7bf997..0b51709cdf 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2365,8 +2365,18 @@ 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 FIX_975_JBM_USAN + partialCopyFrameType = 0; + partialCopyOffset = 0; + + if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) + { +#endif + /* check if frame contains a partial copy and get its offset */ + evs_dec_previewFrame( au, auSize, &partialCopyFrameType, &partialCopyOffset ); +#ifdef FIX_975_JBM_USAN + } +#endif /* create data unit for primary copy in the frame */ dataUnit = JB4_AllocDataUnit( hIvasDec->hVoIP->hJBM ); -- GitLab From b8d04610e0dd1c0829b3d026a38dd3032004c12a Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Wed, 7 Feb 2024 16:01:38 +0100 Subject: [PATCH 2/4] fix for #975, move fix to the NONBE section --- lib_com/options.h | 4 ++-- lib_dec/lib_dec.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index de5f2451ae..62234af86c 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,7 +160,6 @@ #define FIX_959_MASA_LINEAR_REND /* VA: issue 959: remove unused calling of ivas_sba_linear_renderer() in MASA rendering */ #define FIX_963_USAN_ERROR /* Eri: Issue 963: USAN error in Stereo CNG, division by zero */ #define FIX_971_LOG2_IDX_GAIN_0 /* VA: prevent -Inf due to log2(ratio==0) */ -#define FIX_975_JBM_USAN /* #################### End BE switches ################################## */ @@ -183,7 +182,8 @@ #define BE_FIX_567_DOUBLE_STEREO_DMX /* NTT: Fix formal issues */ #define NONBE_FIX_567_DOUBLE_STEREO_DMX /* Orange: Double-precision replaced by single-precision */ #define NONBE_FIX_947_STEREO_DMX_EVS_POC /* Orange: Fix clicks on POC */ -#define NONBE_FIX_947_STEREO_DMX_EVS_PHA /* Orange: Fix issues on PHA */ +#define NONBE_FIX_947_STEREO_DMX_EVS_PHA /* Orange: Fix issues on PHA */ +#define NONBE_FIX_975_JBM_USAN /* FhG: Fix issue #975, USAN in JBM decoding ad 13.2kbps */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 0b51709cdf..b9f7a0d4f9 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2365,7 +2365,7 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( return IVAS_ERR_INVALID_BITSTREAM; } -#ifdef FIX_975_JBM_USAN +#ifdef NONBE_FIX_975_JBM_USAN partialCopyFrameType = 0; partialCopyOffset = 0; -- GitLab From d2b7b793c465c4c4edf8bbed0fbee1818e94502d Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Wed, 7 Feb 2024 16:28:49 +0100 Subject: [PATCH 3/4] fix for #975, do a missing renaming of the occurence of the switch --- lib_dec/lib_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index b9f7a0d4f9..dc589b2314 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2374,7 +2374,7 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( #endif /* check if frame contains a partial copy and get its offset */ evs_dec_previewFrame( au, auSize, &partialCopyFrameType, &partialCopyOffset ); -#ifdef FIX_975_JBM_USAN +#ifdef NONBE_FIX_975_JBM_USAN } #endif -- GitLab From 597f9fb4561819f8462a7713fcf935f44e12ee56 Mon Sep 17 00:00:00 2001 From: knj Date: Thu, 8 Feb 2024 16:48:47 +0100 Subject: [PATCH 4/4] dummy commit to trigger ci -- GitLab