From 3541dabbcef7c4cb705f4a8e8d8a87388412aa0c Mon Sep 17 00:00:00 2001 From: rhb Date: Wed, 9 Nov 2022 13:44:35 +0100 Subject: [PATCH 1/3] fix IGF noise repetition by properly updating IGF noise seed in cases where noise filling is off --- lib_com/options.h | 1 + lib_dec/dec_tcx.c | 11 +++++++++++ 2 files changed, 12 insertions(+) mode change 100644 => 100755 lib_com/options.h mode change 100644 => 100755 lib_dec/dec_tcx.c diff --git a/lib_com/options.h b/lib_com/options.h old mode 100644 new mode 100755 index 8e8a24dd2e..c0276554d0 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -149,6 +149,7 @@ #define FIX_MCT_PLC_RECOVERY /* Issue 184: scale the old synthesis part correctly in the first good frame after lost frames in MCT modes - to be activated after previous switch is merged */ #define SBA_BR_SWITCHING /* Issue 114: Changes for sba bit rate switching*/ #define FIX_AGC_WINFUNC_MEMORY /* Issue 62: lower agc_com.winFunc memory consumption */ +#define FIX_IGF_NOISE_REPETITION /* Issue 182: fix repetition of same noise in IGF due */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/dec_tcx.c b/lib_dec/dec_tcx.c old mode 100644 new mode 100755 index 20e4dedbe3..a995ca2295 --- a/lib_dec/dec_tcx.c +++ b/lib_dec/dec_tcx.c @@ -1317,7 +1317,18 @@ void decoder_tcx_noisefilling( } else { +#ifdef FIX_IGF_NOISE_REPETITION + if ( nf_seed == 0 && st->element_mode != EVS_MONO ) + { + *st->hIGFDec->igfData.igfInfo.nfSeed = (int16_t) ( *st->hIGFDec->igfData.igfInfo.nfSeed * 31821L + 13849L ); + } + else + { + *st->hIGFDec->igfData.igfInfo.nfSeed = (int16_t) ( nf_seed * 31821L + 13849L ); + } +#else *st->hIGFDec->igfData.igfInfo.nfSeed = (int16_t) ( nf_seed * 31821L + 13849L ); +#endif } } -- GitLab From 23344eef6f95346582b770d5501a7603bf399238 Mon Sep 17 00:00:00 2001 From: rhb Date: Wed, 9 Nov 2022 14:52:24 +0100 Subject: [PATCH 2/3] some cleanup --- lib_dec/dec_tcx.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/lib_dec/dec_tcx.c b/lib_dec/dec_tcx.c index a995ca2295..5b74ca0f6f 100755 --- a/lib_dec/dec_tcx.c +++ b/lib_dec/dec_tcx.c @@ -1309,27 +1309,34 @@ void decoder_tcx_noisefilling( IGFDecReplicateTCX10State( st->hIGFDec ); } +#ifdef FIX_IGF_NOISE_REPETITION + if ( st->element_mode != EVS_MONO ) + { + if ( bfi ) + { + nf_seed = st->seed_tcx_plc; + } + else if ( nf_seed == 0 ) + { + nf_seed = *st->hIGFDec->igfData.igfInfo.nfSeed; + } + } +#endif + if ( st->igf ) { +#ifdef FIX_IGF_NOISE_REPETITION + *st->hIGFDec->igfData.igfInfo.nfSeed = (int16_t) ( nf_seed * 31821L + 13849L ); +#else if ( bfi && st->element_mode != EVS_MONO ) { *st->hIGFDec->igfData.igfInfo.nfSeed = (int16_t) ( st->seed_tcx_plc * 31821L + 13849L ); } else { -#ifdef FIX_IGF_NOISE_REPETITION - if ( nf_seed == 0 && st->element_mode != EVS_MONO ) - { - *st->hIGFDec->igfData.igfInfo.nfSeed = (int16_t) ( *st->hIGFDec->igfData.igfInfo.nfSeed * 31821L + 13849L ); - } - else - { - *st->hIGFDec->igfData.igfInfo.nfSeed = (int16_t) ( nf_seed * 31821L + 13849L ); - } -#else *st->hIGFDec->igfData.igfInfo.nfSeed = (int16_t) ( nf_seed * 31821L + 13849L ); -#endif } +#endif } return; -- GitLab From 7f5cdf97180d657e410ef80b7e258aa92ba818a4 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Mon, 14 Nov 2022 12:03:06 +0100 Subject: [PATCH 3/3] dummy commit to trigger pipeline -- GitLab