Commit 2eeee757 authored by fotopoulou's avatar fotopoulou
Browse files

Merge branch 'float-1283-stereo-dft-collapsing-at-16-4-kbps' into 'main'

[non-BE] Resolve "stereo dft collapsing at 16.4 kbps"

See merge request !2493
parents dc86cade 9b8e93ea
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@
/* any switch which is non-be wrt. TS 26.258 V3.0 */
#define FIX_1465_SWB_TBE_RANDOM_VECTOR_CREATION         /* Dolby: issue 1465: Fix constant in create_random_vector() to allow more reliable fixed point port */
#define FIX_BASOP_2317_UNINIT_VALUE_IN_STEREO_CNG       /* Eri: Basop issue 2317: Uninitialized value read in case of DTX and BW switching   */

#define FIX_1283_STEREO_DFT_COLLAPSE                    /* FhG: issue 1283: fix for critical issue with DFT stereo core coder */
/* ##################### End NON-BE switches ########################### */

/* ################## End MAINTENANCE switches ######################### */
+9 −1
Original line number Diff line number Diff line
@@ -728,7 +728,11 @@ void ShapeSpectrum(
        hTcxCfg->SFM2 = SFM_Cal( spectrum, min( 200, L_frame ) );
    }

#ifndef FIX_1283_STEREO_DFT_COLLAPSE
    if ( ( total_brate <= ACELP_13k20 && st->bwidth == SWB ) )
#else
    if ( ( total_brate <= ACELP_13k20 || ( st->element_brate <= IVAS_16k4 && st->element_mode == IVAS_CPE_DFT ) ) && st->bwidth == SWB )
#endif
    {
        max_low_pre = 0.f;
        for ( i = 0; i < L_frame; i++ )
@@ -773,7 +777,11 @@ void ShapeSpectrum(
    }

/* reduce the peaks in the IGF region, to make life of the core-coder easier... */
#ifndef FIX_1283_STEREO_DFT_COLLAPSE
    if ( total_brate <= ACELP_13k20 && st->bwidth == SWB )
#else
    if ( ( total_brate <= ACELP_13k20 || ( st->element_brate <= IVAS_16k4 && st->element_mode == IVAS_CPE_DFT ) ) && st->bwidth == SWB )
#endif
    {
        int16_t dist_low, dist_high;
        float max_fac;
+3 −0
Original line number Diff line number Diff line
@@ -361,6 +361,9 @@ ivas_error create_sce_enc(
    }

    st->total_brate = hSCE->element_brate; /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */
#ifdef FIX_1283_STEREO_DFT_COLLAPSE
    st->element_brate = -1;
#endif
    st->mct_chan_mode = MCT_CHAN_MODE_REGULAR;

    if ( ( error = init_encoder( st, st_ivas, 0, 0, st_ivas->ism_mode, hSCE->element_brate ) ) != IVAS_ERR_OK )