Loading lib_enc/ivas_mct_enc_mct_fx.c +5 −12 Original line number Diff line number Diff line Loading @@ -88,31 +88,24 @@ void getChannelEnergies_fx( gb = find_guarded_bits_fx( (Word32) L_subframe ); #ifndef FIX_2356_GET_CHAN_ENERGIES sum2_e = st->hTcxEnc->spectrum_e[0]; move16(); #endif nrg[ch] = 0; move32(); #ifdef FIX_2356_GET_CHAN_ENERGIES /* move first loop iteration outside of loop - we need a proper initialization of nrg_e[ch] based on sum2_e, which is calculated in first loop iteration */ sum2 = sum2_32_exp_fx( st->hTcxEnc->spectrum_fx[0], L_subframe, &sum2_e, gb ); // 31 - sum2_e nrg_e[ch] = sum2_e; /* only needed in first iteration */ nrg_e[ch] = 0; /* if the mantissa is 0, the exponent gets set to sum2_e inside BASOP_Util_Add_Mant32Exp() */ move16(); #endif nrg[ch] = BASOP_Util_Add_Mant32Exp( nrg[ch], nrg_e[ch], sum2, sum2_e, &nrg_e[ch] ); move32(); FOR( n = 1; n < nSubframes; n++ ) #else FOR( n = 0; n < nSubframes; n++ ) #endif { #ifdef FIX_2356_GET_CHAN_ENERGIES sum2_e = st->hTcxEnc->spectrum_e[n]; move16(); #endif #endif sum2 = sum2_32_exp_fx( st->hTcxEnc->spectrum_fx[n], L_subframe, &sum2_e, gb ); // 31 - sum2_e nrg[ch] = BASOP_Util_Add_Mant32Exp( nrg[ch], nrg_e[ch], sum2, sum2_e, &nrg_e[ch] ); Loading Loading
lib_enc/ivas_mct_enc_mct_fx.c +5 −12 Original line number Diff line number Diff line Loading @@ -88,31 +88,24 @@ void getChannelEnergies_fx( gb = find_guarded_bits_fx( (Word32) L_subframe ); #ifndef FIX_2356_GET_CHAN_ENERGIES sum2_e = st->hTcxEnc->spectrum_e[0]; move16(); #endif nrg[ch] = 0; move32(); #ifdef FIX_2356_GET_CHAN_ENERGIES /* move first loop iteration outside of loop - we need a proper initialization of nrg_e[ch] based on sum2_e, which is calculated in first loop iteration */ sum2 = sum2_32_exp_fx( st->hTcxEnc->spectrum_fx[0], L_subframe, &sum2_e, gb ); // 31 - sum2_e nrg_e[ch] = sum2_e; /* only needed in first iteration */ nrg_e[ch] = 0; /* if the mantissa is 0, the exponent gets set to sum2_e inside BASOP_Util_Add_Mant32Exp() */ move16(); #endif nrg[ch] = BASOP_Util_Add_Mant32Exp( nrg[ch], nrg_e[ch], sum2, sum2_e, &nrg_e[ch] ); move32(); FOR( n = 1; n < nSubframes; n++ ) #else FOR( n = 0; n < nSubframes; n++ ) #endif { #ifdef FIX_2356_GET_CHAN_ENERGIES sum2_e = st->hTcxEnc->spectrum_e[n]; move16(); #endif #endif sum2 = sum2_32_exp_fx( st->hTcxEnc->spectrum_fx[n], L_subframe, &sum2_e, gb ); // 31 - sum2_e nrg[ch] = BASOP_Util_Add_Mant32Exp( nrg[ch], nrg_e[ch], sum2, sum2_e, &nrg_e[ch] ); Loading