Commit 0c87adf0 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_2356_GET_CHAN_ENERGIES

parent f1e73e7f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_1904_HARM_GSC_ENC                           /* VA: #1904 Harmonization of EVS and IVAS GSC code */
#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 */
#define FIX_2319_CLDFB_INIT_FLAGS                       /* FhG: basop issue 2319: init hs->flags during openCldfb(), to avoid reading of uninitialized memory */
#define FIX_BASOP_2357_OBJECT_EDIT_MSAN                 /* Nokia: basop issue 2357: initialize missing exponents in object edit */
+0 −12
Original line number Diff line number Diff line
@@ -88,33 +88,21 @@ 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
            nrg_e[ch] = 0; /* if the mantissa is 0, the exponent gets set to sum2_e inside BASOP_Util_Add_Mant32Exp() */
            move16();
#endif

            FOR( n = 0; n < nSubframes; n++ )
            {
#ifdef FIX_2356_GET_CHAN_ENERGIES
                sum2_e = st->hTcxEnc->spectrum_e[n];
                move16();

#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] );
                move32();

#ifndef FIX_2356_GET_CHAN_ENERGIES
                sum2_e = st->hTcxEnc->spectrum_e[0];
                move16();
#endif
            }

            nrg[ch] = Sqrt32( nrg[ch], &nrg_e[ch] ); // nrg_e