Commit 30ad81d6 authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING

parent e9d17711
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -163,7 +163,6 @@
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_856_TCX_LTP_SYNTH_FILTER                    /* FhG: issue 856: correct filtering length for tcx-ltp synth filtering*/
#define NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING            /* FhG: fix handling of common and differing noise seeds in SCEs for ISM DTX */
#define NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION               /* VA/Nok: issue 913: Resolve "Crash in OMASA encoder - DFT-Stereo bit-budget violated" */
#define NONBE_FIX_855_JBM_FLUSH_OFFSET                        /* FhG: issue #855: add missing switch here for the code in JBM flushing                 */
#define NONBE_FIX_926_OSBA_DECODER_CRASH_PLANAR_SBA           /* FhG: issue 926: crash in OSBA decoding with planar FOA */
+0 −11
Original line number Diff line number Diff line
@@ -1104,17 +1104,10 @@ void generate_comfort_noise_dec(
    c2 = (float) sqrt( 1 - hFdCngCom->coherence );

    seed2 = &( hFdCngCom->seed2 );
#ifdef NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING
    if ( st->element_mode == IVAS_CPE_MDCT && st->idchan == 1 )
    {
        seed2 = &( hFdCngCom->seed3 );
    }
#else
    if ( ( st->element_mode == IVAS_CPE_MDCT && st->idchan == 1 ) || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) )
    {
        seed2 = &( hFdCngCom->seed3 );
    }
#endif

    /* Generate Gaussian random noise in real and imaginary parts of the FFT bins
      Amplitudes are adjusted to the estimated noise level cngNoiseLevel in each bin */
@@ -1366,11 +1359,7 @@ void generate_comfort_noise_dec_hf(

    if ( cng_coh_flag )
    {
#ifdef NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING
        seed2 = &( hFdCngCom->seed2 );
#else
        seed2 = &( hFdCngCom->seed3 );
#endif

        c1 = (float) sqrt( hFdCngCom->coherence );
        c2 = (float) sqrt( 1 - hFdCngCom->coherence );
+0 −7
Original line number Diff line number Diff line
@@ -1324,7 +1324,6 @@ ivas_error ivas_init_decoder(

        st_ivas->hISMDTX.sce_id_dtx = 0;

#ifdef NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING
        if ( st_ivas->ism_mode == ISM_MODE_PARAM )
        {
            st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed2 = st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed3;
@@ -1336,12 +1335,6 @@ ivas_error ivas_init_decoder(
                st_ivas->hSCE[sce_id]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed2 = 2 + sce_id;
            }
        }
#else
        if ( st_ivas->ism_mode == ISM_MODE_PARAM )
        {
            st_ivas->hSCE[1]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed3 = st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed2;
        }
#endif
    }
    else if ( st_ivas->ivas_format == SBA_FORMAT )
    {
+0 −2
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@ void ivas_ism_dtx_dec(
        }
    }

#ifdef NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING
    /* synch common seed between SCEs */
    if ( st_ivas->ism_mode == ISM_MODE_DISC )
    {
@@ -109,7 +108,6 @@ void ivas_ism_dtx_dec(
            st_ivas->hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed = st_ivas->hSCE[st_ivas->hISMDTX.sce_id_dtx]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed;
        }
    }
#endif

    update_last_metadata( nchan_ism, st_ivas->hIsmMetaData, md_diff_flag );