Commit 85d724e8 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

rename macro FIX_1981_MAXIMUM_EXP_FX_2, clean up

parent 0408a3a0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@

#define FIX_1978_SAT_MISSING_IN_GAIN_ENC                     /* VA:  Fix add saturation missing that lead to a crash in P800-10 */
#define FIX_1981_MAXIMUM_EXP_FX                              /* FhG: Fix bug in function to find maximum value in vector */
#define FIX_1981_MAXIMUM_EXP_FX_2                            /* FhG: Fix bug in function to find maximum value in vector:zero-mantissa */
#define FIX_1981_MAXIMUM_EXP_FX_ZEROMANTISSA                 /* FhG: Fix bug in function to find maximum value in vector:zero-mantissa fix*/

#define FIX_1979_SAT_MISSING_IN_LSF_ENC                      /* VA: Proposal to fix 1979, saturation in lsf_enc, NOkia to review */
#define FIX_1946_CRASH_JBM_PROCESSING                        /* FhG: Increased guard bits of DFT_fx */
+2 −12
Original line number Diff line number Diff line
@@ -2169,30 +2169,20 @@ Word16 maximum_exp_fx(

    FOR( j = 1; j < lvec_fx; j++ )
    {
#ifdef FIX_1981_MAXIMUM_EXP_FX_2
        Word16 scale = sub( exp_vec[j], exp_vec[ind] );

#ifdef FIX_1981_MAXIMUM_EXP_FX_ZEROMANTISSA
        test();
        if ( vec_fx[j] == 0 || vec_fx[ind] == 0 )
        {
            scale = 0;
            move16();
        }

        if ( L_mac0_sat( L_shl_sat( L_deposit_l( vec_fx[j] ), scale ), vec_fx[ind], -0x0001 ) > 0 )
        {
            ind = j;
            move16();
        }
#else
        Word16 scale = sub( exp_vec[j], exp_vec[ind] );

#endif
        if ( L_mac0_sat( L_shl_sat( L_deposit_l( vec_fx[j] ), scale ), vec_fx[ind], -0x0001 ) > 0 )
        {
            ind = j;
            move16();
        }
#endif
    }
    return ind;
}