Commit a49644a9 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

added temporary macro and draft solution

parent 6cf87ab2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@
#define FIX_1942_ASSERTION_LOWSHELF                          /* FhG: Modified the target_gains_db_fx calculation in compute_t60_coeffs_fx() */
#define FIX_1944_CRASH_FOR_STEREO                            /* FhG: improve TonalMDCTConceal_InsertNoise calculation precision */
#define FIX_1970_SBA_CRASH                                   /* Dlb: Fix for issue 1970, SBA crash */
#define FIX_maximum_exp_fx /*issue needed*/

#define FIX_1946_CRASH_JBM_PROCESSING                        /* FhG: Increased guard bits of DFT_fx */
/* #################### Start BASOP porting switches ############################ */
+12 −0
Original line number Diff line number Diff line
@@ -1224,13 +1224,24 @@ Word16 maximum_exp_fx( /* o : index of the maximum value
    Word16 tmp, exp;
    ind = 0;
    move16();
#ifndef FIX_maximum_exp_fx
    tmp = vec_fx[0];
    move16();
    exp = exp_vec[0];
    move16();
#endif

    FOR( j = 1; j < lvec_fx; j++ )
    {
#ifdef FIX_maximum_exp_fx
        exp = sub(norm_s( vec_fx[j] ), 1);
        tmp = shl( vec_fx[j], exp );
        if( LT_16( vec_fx[ind], shr_sat( tmp, sub( exp_vec[ind], sub(exp_vec[j], exp) ) ) ) )
        {
            ind = j;
            move16();
        }
#else
        IF( LT_16( tmp, shr_sat( vec_fx[j], sub( exp, exp_vec[j] ) ) ) )
        {
            ind = j;
@@ -1240,6 +1251,7 @@ Word16 maximum_exp_fx( /* o : index of the maximum value
            exp = exp_vec[j];
            move16();
        }
#endif
    }

    return ind;