Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ #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 Loading lib_dec/fd_cng_dec_fx.c +33 −0 Original line number Diff line number Diff line Loading @@ -1500,6 +1500,9 @@ 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; Loading @@ -1508,6 +1511,10 @@ 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*/ Loading Loading @@ -1706,12 +1713,38 @@ 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 ) ) { check = 1; move16(); BREAK; } } IF( check == 0 ) { hFdCngDec->msPeriodog_exp = 14; /* msPeriodog buffer will have minimum value as 1e-5f */ move16(); } #endif } /* calculate total energy (short-term and long-term) */ Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ #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 Loading
lib_dec/fd_cng_dec_fx.c +33 −0 Original line number Diff line number Diff line Loading @@ -1500,6 +1500,9 @@ 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; Loading @@ -1508,6 +1511,10 @@ 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*/ Loading Loading @@ -1706,12 +1713,38 @@ 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 ) ) { check = 1; move16(); BREAK; } } IF( check == 0 ) { hFdCngDec->msPeriodog_exp = 14; /* msPeriodog buffer will have minimum value as 1e-5f */ move16(); } #endif } /* calculate total energy (short-term and long-term) */ Loading