Commit d920f1dd authored by fotopoulou's avatar fotopoulou
Browse files

fix for issue 1283

parent 14fa671a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -195,6 +195,7 @@
#define FIX_2252_LP_CNG_STARTS_SID                      /* VA: issues 2251 and 2252: fix LP CNG uninitialized value in bitstream that starts with an SID */
#define FIX_1381_BWD                                    /* VA: issue 1381: apply no hysteresis in BWD at higher bitrates also in mono MASA and OMASA */
#define FIX_2285_CODE_DECODER_INIT_BW                   /* VA: basop issue 2285: fix core-decoder initialization bandwidth */
#define FIX_1283_STEREO_DFT_COLLAPSE                    /* FhG: issue 1283: fix for critical issue with DFT stereo core coder */

/* ##################### End NON-BE 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->bwidth == SWB ) || ( 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->bwidth == SWB ) || ( st->element_brate <= IVAS_16k4 && st->element_mode == IVAS_CPE_DFT && st->bwidth == SWB ) )
#endif
    {
        int16_t dist_low, dist_high;
        float max_fac;