diff --git a/lib_com/options.h b/lib_com/options.h index 0e313e5e932308543712e411f43df271b62bdf79..532d57e4e56feb6033015680ad3e82c692d3fd9a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -112,6 +112,7 @@ #define FIX_2250_LARGE_DIFFERENCES_BETWEEN_BASOP_AND_FLOAT /* Dolby: Issue 2250: random vector generation in GenShapedSHBExcitation() */ #define FIX_2338_HARM_GSC_GAIN_COMP /* VA: basop issue 2338: harmonization of band gain computation for both EVS and IVAS */ #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: float issue 1283: fix for critical issue with DFT stereo core coder */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/cod_tcx_fx.c b/lib_enc/cod_tcx_fx.c index 6c2f6100be95d2cf7bc54cab31aedf746ad3690d..922ae177a6f313b5f11331b8dbf9e42be1537856 100644 --- a/lib_enc/cod_tcx_fx.c +++ b/lib_enc/cod_tcx_fx.c @@ -621,7 +621,13 @@ void ShapeSpectrum_ivas_fx( } test(); + test(); + test(); +#ifndef FIX_1283_STEREO_DFT_COLLAPSE IF( LE_32( total_brate, ACELP_13k20 ) && EQ_16( st->bwidth, SWB ) ) +#else + IF( ( LE_32( total_brate, ACELP_13k20 ) || ( LE_32( st->element_brate, IVAS_16k4 ) && EQ_16( st->element_mode, IVAS_CPE_DFT ) ) ) && EQ_16( st->bwidth, SWB ) ) +#endif { max_low_pre = 0; move32(); @@ -697,7 +703,13 @@ void ShapeSpectrum_ivas_fx( /* reduce the peaks in the IGF region, to make life of the core-coder easier... */ test(); + test(); + test(); +#ifndef FIX_1283_STEREO_DFT_COLLAPSE IF( LE_32( total_brate, ACELP_13k20 ) && EQ_16( st->bwidth, SWB ) ) +#else + IF( ( LE_32( total_brate, ACELP_13k20 ) || ( LE_32( st->element_brate, IVAS_16k4 ) && EQ_16( st->element_mode, IVAS_CPE_DFT ) ) ) && EQ_16( st->bwidth, SWB ) ) +#endif { Word16 sf_width; Word16 dist_low, dist_high; diff --git a/lib_enc/ivas_sce_enc_fx.c b/lib_enc/ivas_sce_enc_fx.c index ec539b738321d0cedd7b19d0d0ae80c5347b74ba..3e62c720eab51e3a7fce1bd9a0da5055c5c06482 100644 --- a/lib_enc/ivas_sce_enc_fx.c +++ b/lib_enc/ivas_sce_enc_fx.c @@ -473,6 +473,10 @@ ivas_error create_sce_enc_fx( } 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; + move32(); +#endif st->mct_chan_mode = MCT_CHAN_MODE_REGULAR; move32(); move32();