Commit 2728e20f authored by multrus's avatar multrus
Browse files

accept FIX_732_MS_PERIODOG_FLOOR

parent 2908621c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -70,7 +70,6 @@
#ifndef BASOP_NOGLOB_DEV_USE_GLOBALS
#define BASOP_NOGLOB_DECLARE_LOCAL
#endif
#define FIX_732_MS_PERIODOG_FLOOR                /* Eri: Issue-732: Dynamic range of msPeriodog leads to minimum value 1e-5 being truncated to zero. This uses the smallest non-zero value instead. */

#define FIX_867_CLDFB_NRG_SCALE
#define FIX_1737_FIX_867_CLDFB_NRG_SCALE
+0 −15
Original line number Diff line number Diff line
@@ -1500,9 +1500,7 @@ void perform_noise_estimation_dec_ivas_fx(
    Word32 enr, enr_tot, enr_tot0;
    Word16 enr_e, enr_ratio, alpha;
    Word32 *msPeriodog;
#ifdef FIX_732_MS_PERIODOG_FLOOR
    Word32 msPeriodog_floor;
#endif
    Word32 *msNoiseEst;
    Word32 *reIter;
    Word32 rescale_fac = 0;
@@ -1511,10 +1509,8 @@ void perform_noise_estimation_dec_ivas_fx(
    Word16 q_shift;
    Word32 max_l;
    Word16 norm_shift;
#ifdef FIX_732_MS_PERIODOG_FLOOR
    Word16 check = 0;
    move16();
#endif

    /* pointer initialization */
    periodog = hFdCngDec->hFdCngCom->periodog;   /*Q31 - hFdCngDec->hFdCngCom->periodog_exp*/
@@ -1713,23 +1709,13 @@ void perform_noise_estimation_dec_ivas_fx(
                msPeriodog[p] = L_add( msPeriodog[p], L_tmp ); /*Q31 - hFdCngDec->msPeriodog_exp*/
                move32();

#ifdef FIX_732_MS_PERIODOG_FLOOR
                msPeriodog_floor = L_max( 1, L_shr( 21474 /*Q31*/, hFdCngDec->msPeriodog_exp ) ); /*Q31 - hFdCngDec->msPeriodog_exp*/
                IF( LT_32( msPeriodog[p], msPeriodog_floor ) )
#else
                IF( LT_32( msPeriodog[p], L_shr( 21474 /*Q31*/, hFdCngDec->msPeriodog_exp ) ) )
#endif
                {
#ifdef FIX_732_MS_PERIODOG_FLOOR
                    msPeriodog[p] = msPeriodog_floor;
                    move32();
#else
                    msPeriodog[p] = L_shr( 21474 /*Q31*/, hFdCngDec->msPeriodog_exp ); /*Q31 - hFdCngDec->msPeriodog_exp*/
                    move32();
#endif
                }
            }
#ifdef FIX_732_MS_PERIODOG_FLOOR
            FOR( p = 0; p < npart; p++ )
            {
                IF( GT_32( msPeriodog[p], 1 ) )
@@ -1744,7 +1730,6 @@ void perform_noise_estimation_dec_ivas_fx(
                hFdCngDec->msPeriodog_exp = 14; /* msPeriodog buffer will have minimum value as 1e-5f */
                move16();
            }
#endif
        }

        /* calculate total energy (short-term and long-term) */