Commit 3541dabb authored by reutelhuber's avatar reutelhuber
Browse files

fix IGF noise repetition by properly updating IGF noise seed in cases where noise filling is off

parent 5e5e2ec5
Loading
Loading
Loading
Loading

lib_com/options.h

100644 → 100755
+1 −0
Original line number Diff line number Diff line
@@ -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 ######################### */

lib_dec/dec_tcx.c

100644 → 100755
+11 −0
Original line number Diff line number Diff line
@@ -1317,8 +1317,19 @@ 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
        }
    }

    return;