Commit 394140be authored by reutelhuber's avatar reutelhuber
Browse files

Merge branch '182-ism4-with-noise-signal-spectrum-appears-repeated-in-igf-region' into 'main'

[non-BE] #182 ISM4 with noise signal -- Spectrum appears repeated in IGF region

See merge request !250
parents 1772896f 7f5cdf97
Loading
Loading
Loading
Loading
Loading

lib_com/options.h

100644 → 100755
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@
#define FIX_AGC_WINFUNC_MEMORY                          /* Issue 62: lower agc_com.winFunc memory consumption */
#define REMOVE_SID_HARM_LEFTOVERS                       /* Issue 192: remove leftovers from the SID bitrate harmonization */
#define FIX_MCT_UNINIT_MEM                              /* Issue 166: Reading of uninitialized memory in TCX range coder */

#define FIX_IGF_NOISE_REPETITION                        /* Issue 182: fix repetition of same noise in IGF */


/* ################## End DEVELOPMENT switches ######################### */

lib_dec/dec_tcx.c

100644 → 100755
+18 −0
Original line number Diff line number Diff line
@@ -1309,8 +1309,25 @@ 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 );
@@ -1319,6 +1336,7 @@ void decoder_tcx_noisefilling(
        {
            *st->hIGFDec->igfData.igfInfo.nfSeed = (int16_t) ( nf_seed * 31821L + 13849L );
        }
#endif
    }

    return;