diff --git a/lib_com/options.h b/lib_com/options.h index 0edcb809916e50d6446a232f6dcad31713645102..8f651acb987ee687372cad294edde72fdc17abfe 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -118,6 +118,7 @@ #define FIX_2352_COPY_AQ_IN_TCX /* FhG: basop issue 2352: prevent copying uninitialized values from Aq_fx[][] to Aq_fx_32[][] in TCX */ #define FIX_2353_PTR_INIT /* FhG: basop issue 2353: initialize prm_sqQ-pointer, to prevent being uninitialized in case of bfi == 1 */ #define FIX_2356_GET_CHAN_ENERGIES /* FhG: basop issue 2356: correctly initialize exponents in getChannelEnergies_fx() */ +#define FIX_2355_IGF_EXP_POWERSPEC /* FhG: basop issue 2355: make sure exp_pPowerSpectrumParameter_fx is initialized in all cases */ /* #################### End BE switches ################################## */ diff --git a/lib_enc/igf_enc_fx.c b/lib_enc/igf_enc_fx.c index 0adf23debdbcb6caa2b023afbd30a7090b1e6f70..1037fb6c4c565e5ea365550b61a63f236b3c5f9f 100755 --- a/lib_enc/igf_enc_fx.c +++ b/lib_enc/igf_enc_fx.c @@ -3320,9 +3320,13 @@ static void IGF_Whitening_ivas_fx( FOR( sb = hGrid->tile[p]; sb < hGrid->tile[p + 1]; sb++ ) { IF( LT_32( powerSpectrum[sb], 1 ) ) - hPrivateData->logSpec[sb] = 0; /* max(0,FLT_MIN_EXP=-125 )*/ + { + hPrivateData->logSpec[sb] = 0; /* max(0,FLT_MIN_EXP=-125 )*/ + } ELSE + { hPrivateData->logSpec[sb] = extract_l( L_max( 0, L_shr( L_add( BASOP_Util_Log2( powerSpectrum[sb] ), L_shl( powerSpectrum_e[sb], Q25 ) ), Q25 ) ) ); + } move16(); } } @@ -4271,6 +4275,10 @@ void IGFEncApplyStereo_fx( { pPowerSpectrumParameter_fx[0] = NULL; pPowerSpectrumParameter_fx[1] = NULL; +#ifdef FIX_2355_IGF_EXP_POWERSPEC + exp_pPowerSpectrumParameter_fx[0] = NULL; + exp_pPowerSpectrumParameter_fx[1] = NULL; +#endif pPowerSpectrumParameterMsInv_fx[0] = NULL; pPowerSpectrumParameterMsInv_fx[1] = NULL; q_pPowerSpectrumParameterMsInv_fx[0] = NULL; @@ -4293,6 +4301,9 @@ void IGFEncApplyStereo_fx( ELSE { pPowerSpectrumParameter_fx[ch] = NULL; +#ifdef FIX_2355_IGF_EXP_POWERSPEC + exp_pPowerSpectrumParameter_fx[ch] = NULL; +#endif } IGF_Whitening_ivas_fx( hIGFEnc[ch], pPowerSpectrumParameter_fx[ch], exp_pPowerSpectrumParameter_fx[ch], igfGridIdx, sts[ch]->hTranDet->transientDetector.bIsAttackPresent, last_core_acelp, ( sts[0]->hTcxEnc->fUseTns[frameno] || sts[1]->hTcxEnc->fUseTns[frameno] ), sp_aud_decision0, element_brate, sts[ch]->element_mode );