Loading lib_com/cnst.h +1 −0 Original line number Diff line number Diff line Loading @@ -759,6 +759,7 @@ enum #define PIT_FIR_SIZE6_2 ( PIT_UP_SAMP6 * PIT_L_INTERPOL6_2 + 1 ) #define E_MIN 0.0035f /* minimum allowable energy */ #define E_MIN_Q11_FX 7 /* minimum allowable energy in Q11*/ #define E_MIN_Q27_FX 469762 /* minimum allowable energy in Q27*/ #define STEP_DELTA 0.0625f /* quantization step for tilt compensation of gaussian cb. excitation */ #define GAMMA_EV 0.92f /* weighting factor for core synthesis error weighting */ #define FORMANT_SHARPENING_NOISE_THRESHOLD 21.0f /* lp_noise level above which formant sharpening is deactivated */ Loading lib_com/ivas_prot_fx.h +2 −2 Original line number Diff line number Diff line Loading @@ -2960,7 +2960,7 @@ Word16 ivas_acelp_tcx20_switching_fx( Word16 *inp_fx, /* i : new input signal */ Word16 q_inp, /* i : i/p Q */ Word16 *wsp, /* i : input weighted signal */ Word16 non_staX, /* i : unbound non-stationarity for sp/mu clas */ Word32 non_staX, /* i : unbound non-stationarity for sp/mu clas */ Word16 *pitch_fr, /* i : fraction pitch values */ Word16 *voicing_fr, /* i : fractional voicing values */ Word32 currFlatness, /* i : flatness */ Loading Loading @@ -3984,7 +3984,7 @@ Word16 ivas_smc_gmm_fx( const Word16 cor_map_sum_fx, /* i : correlation map sum (from multi-harmonic anal.) Q8 */ const Word32 epsP_fx[M + 1], /* i : LP prediciton error */ const Word32 PS_fx[], /* i : energy spectrum */ const Word16 non_sta_fx, /* i : unbound non-stationarity Q8 */ const Word32 non_sta_fx, /* i : unbound non-stationarity Q20 */ const Word16 relE_fx, /* i : relative frame energy Q8 */ Word16 *high_lpn_flag, /* i/o: sp/mus LPN flag */ const Word16 flag_spitch, /* i : flag to indicate very short stable pitch */ Loading lib_enc/bw_detect_fx.c +12 −1 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ void bw_detect_fx( Flag Overflow = 0; move32(); #endif Word16 lp_noise_fx; bwd_count_wider_bw = BWD_COUNT_WIDER_BW; move16(); Loading Loading @@ -532,7 +533,17 @@ void bw_detect_fx( /*if( localVAD || st->lp_noise > 30 )*/ test(); IF( st->localVAD || GT_16( st->lp_noise_fx, 7680 /*30 in Q8*/ ) ) IF( EQ_16( st->element_mode, EVS_MONO ) ) { lp_noise_fx = st->lp_noise_fx; move16(); } ELSE { lp_noise_fx = extract_h( st->lp_noise_32fx ); } IF( st->localVAD || GT_32( ( lp_noise_fx ), 7680 /*30 in Q8*/ ) ) { /*st->lt_mean_NB_fx = ALPHA_BWD * st->lt_mean_NB_fx + (1-ALPHA_BWD) * mean_NB;*/ L_tmp = L_mult( ALPHA_BWD_FX, st->lt_mean_NB_fx ); /* Q15 * Q11 -> Q27 */ Loading lib_enc/dtx_fx.c +4 −4 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ void dtx_ivas_fx( test(); test(); test(); last_br_cng_flag = LE_32( st_fx->last_total_brate_cng, MAX_BRATE_DTX_EVS ) || LT_16( st_fx->lp_noise_fx, DTX_THR * 256 ) || ( EQ_16( st_fx->element_mode, IVAS_SCE ) && LE_32( st_fx->last_total_brate_cng, MAX_BRATE_DTX_IVAS ) ); last_br_cng_flag = LE_32( st_fx->last_total_brate_cng, MAX_BRATE_DTX_EVS ) || LT_32( ( st_fx->lp_noise_32fx ), DTX_THR * 16777216 ) || ( EQ_16( st_fx->element_mode, IVAS_SCE ) && LE_32( st_fx->last_total_brate_cng, MAX_BRATE_DTX_IVAS ) ); test(); test(); Loading @@ -103,7 +103,7 @@ void dtx_ivas_fx( last_br_flag = ( st_fx->element_mode == EVS_MONO && LE_32( st_fx->last_total_brate, MAX_BRATE_DTX_EVS ) ) || ( st_fx->element_mode != EVS_MONO && LE_32( last_ivas_total_brate, MAX_BRATE_DTX_IVAS ) ) || LT_16( st_fx->lp_noise_fx, DTX_THR * 256 ); LT_32( ( st_fx->lp_noise_32fx ), DTX_THR * 16777216 ); } /* Initialization */ Loading Loading @@ -211,7 +211,7 @@ void dtx_ivas_fx( test(); br_dtx_flag = ( ( st_fx->element_mode == EVS_MONO ) && LE_32( st_fx->total_brate, MAX_BRATE_DTX_EVS ) ) || ( ( st_fx->element_mode != EVS_MONO ) && LE_32( ivas_total_brate, MAX_BRATE_DTX_IVAS ) ) || LT_16( st_fx->lp_noise_fx, DTX_THR * 256 ); LT_16( extract_h( st_fx->lp_noise_32fx ), DTX_THR * 256 ); } test(); test(); Loading Loading @@ -403,7 +403,7 @@ void dtx_ivas_fx( st_fx->cng_type = FD_CNG; move16(); } ELSE IF( EQ_16( st_fx->cng_type, FD_CNG ) && ( LT_32( st_fx->bckr_tilt_lt, fd_thresh ) ) && ( GT_16( st_fx->lp_noise_fx, 512 /* 2 in Q8 */ ) ) ) ELSE IF( EQ_16( st_fx->cng_type, FD_CNG ) && ( LT_32( st_fx->bckr_tilt_lt, fd_thresh ) ) && ( GT_32( st_fx->lp_noise_32fx, 67108864 /* 2 in Q24 */ ) ) ) { st_fx->cng_type = LP_CNG; move16(); Loading lib_enc/fd_cng_enc_fx.c +10 −2 Original line number Diff line number Diff line Loading @@ -447,8 +447,16 @@ void resetFdCngEnc_fx( /* st->totalNoise_fx; Q8 Noise estimator - total noise energy */ /* Detect fast increase of totalNoise */ IF( EQ_16( st->element_mode, EVS_MONO ) ) { totalNoiseIncrease = sub( hNoiseEst->totalNoise_fx, st->last_totalNoise_fx ); // Q8 st->last_totalNoise_fx = hNoiseEst->totalNoise_fx; // Q8 } ELSE { totalNoiseIncrease = sub( extract_h( hNoiseEst->totalNoise_32fx ), st->last_totalNoise_fx ); // Q8 st->last_totalNoise_fx = extract_h( hNoiseEst->totalNoise_32fx ); // Q8 } move16(); IF( totalNoiseIncrease > 0 ) { Loading Loading
lib_com/cnst.h +1 −0 Original line number Diff line number Diff line Loading @@ -759,6 +759,7 @@ enum #define PIT_FIR_SIZE6_2 ( PIT_UP_SAMP6 * PIT_L_INTERPOL6_2 + 1 ) #define E_MIN 0.0035f /* minimum allowable energy */ #define E_MIN_Q11_FX 7 /* minimum allowable energy in Q11*/ #define E_MIN_Q27_FX 469762 /* minimum allowable energy in Q27*/ #define STEP_DELTA 0.0625f /* quantization step for tilt compensation of gaussian cb. excitation */ #define GAMMA_EV 0.92f /* weighting factor for core synthesis error weighting */ #define FORMANT_SHARPENING_NOISE_THRESHOLD 21.0f /* lp_noise level above which formant sharpening is deactivated */ Loading
lib_com/ivas_prot_fx.h +2 −2 Original line number Diff line number Diff line Loading @@ -2960,7 +2960,7 @@ Word16 ivas_acelp_tcx20_switching_fx( Word16 *inp_fx, /* i : new input signal */ Word16 q_inp, /* i : i/p Q */ Word16 *wsp, /* i : input weighted signal */ Word16 non_staX, /* i : unbound non-stationarity for sp/mu clas */ Word32 non_staX, /* i : unbound non-stationarity for sp/mu clas */ Word16 *pitch_fr, /* i : fraction pitch values */ Word16 *voicing_fr, /* i : fractional voicing values */ Word32 currFlatness, /* i : flatness */ Loading Loading @@ -3984,7 +3984,7 @@ Word16 ivas_smc_gmm_fx( const Word16 cor_map_sum_fx, /* i : correlation map sum (from multi-harmonic anal.) Q8 */ const Word32 epsP_fx[M + 1], /* i : LP prediciton error */ const Word32 PS_fx[], /* i : energy spectrum */ const Word16 non_sta_fx, /* i : unbound non-stationarity Q8 */ const Word32 non_sta_fx, /* i : unbound non-stationarity Q20 */ const Word16 relE_fx, /* i : relative frame energy Q8 */ Word16 *high_lpn_flag, /* i/o: sp/mus LPN flag */ const Word16 flag_spitch, /* i : flag to indicate very short stable pitch */ Loading
lib_enc/bw_detect_fx.c +12 −1 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ void bw_detect_fx( Flag Overflow = 0; move32(); #endif Word16 lp_noise_fx; bwd_count_wider_bw = BWD_COUNT_WIDER_BW; move16(); Loading Loading @@ -532,7 +533,17 @@ void bw_detect_fx( /*if( localVAD || st->lp_noise > 30 )*/ test(); IF( st->localVAD || GT_16( st->lp_noise_fx, 7680 /*30 in Q8*/ ) ) IF( EQ_16( st->element_mode, EVS_MONO ) ) { lp_noise_fx = st->lp_noise_fx; move16(); } ELSE { lp_noise_fx = extract_h( st->lp_noise_32fx ); } IF( st->localVAD || GT_32( ( lp_noise_fx ), 7680 /*30 in Q8*/ ) ) { /*st->lt_mean_NB_fx = ALPHA_BWD * st->lt_mean_NB_fx + (1-ALPHA_BWD) * mean_NB;*/ L_tmp = L_mult( ALPHA_BWD_FX, st->lt_mean_NB_fx ); /* Q15 * Q11 -> Q27 */ Loading
lib_enc/dtx_fx.c +4 −4 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ void dtx_ivas_fx( test(); test(); test(); last_br_cng_flag = LE_32( st_fx->last_total_brate_cng, MAX_BRATE_DTX_EVS ) || LT_16( st_fx->lp_noise_fx, DTX_THR * 256 ) || ( EQ_16( st_fx->element_mode, IVAS_SCE ) && LE_32( st_fx->last_total_brate_cng, MAX_BRATE_DTX_IVAS ) ); last_br_cng_flag = LE_32( st_fx->last_total_brate_cng, MAX_BRATE_DTX_EVS ) || LT_32( ( st_fx->lp_noise_32fx ), DTX_THR * 16777216 ) || ( EQ_16( st_fx->element_mode, IVAS_SCE ) && LE_32( st_fx->last_total_brate_cng, MAX_BRATE_DTX_IVAS ) ); test(); test(); Loading @@ -103,7 +103,7 @@ void dtx_ivas_fx( last_br_flag = ( st_fx->element_mode == EVS_MONO && LE_32( st_fx->last_total_brate, MAX_BRATE_DTX_EVS ) ) || ( st_fx->element_mode != EVS_MONO && LE_32( last_ivas_total_brate, MAX_BRATE_DTX_IVAS ) ) || LT_16( st_fx->lp_noise_fx, DTX_THR * 256 ); LT_32( ( st_fx->lp_noise_32fx ), DTX_THR * 16777216 ); } /* Initialization */ Loading Loading @@ -211,7 +211,7 @@ void dtx_ivas_fx( test(); br_dtx_flag = ( ( st_fx->element_mode == EVS_MONO ) && LE_32( st_fx->total_brate, MAX_BRATE_DTX_EVS ) ) || ( ( st_fx->element_mode != EVS_MONO ) && LE_32( ivas_total_brate, MAX_BRATE_DTX_IVAS ) ) || LT_16( st_fx->lp_noise_fx, DTX_THR * 256 ); LT_16( extract_h( st_fx->lp_noise_32fx ), DTX_THR * 256 ); } test(); test(); Loading Loading @@ -403,7 +403,7 @@ void dtx_ivas_fx( st_fx->cng_type = FD_CNG; move16(); } ELSE IF( EQ_16( st_fx->cng_type, FD_CNG ) && ( LT_32( st_fx->bckr_tilt_lt, fd_thresh ) ) && ( GT_16( st_fx->lp_noise_fx, 512 /* 2 in Q8 */ ) ) ) ELSE IF( EQ_16( st_fx->cng_type, FD_CNG ) && ( LT_32( st_fx->bckr_tilt_lt, fd_thresh ) ) && ( GT_32( st_fx->lp_noise_32fx, 67108864 /* 2 in Q24 */ ) ) ) { st_fx->cng_type = LP_CNG; move16(); Loading
lib_enc/fd_cng_enc_fx.c +10 −2 Original line number Diff line number Diff line Loading @@ -447,8 +447,16 @@ void resetFdCngEnc_fx( /* st->totalNoise_fx; Q8 Noise estimator - total noise energy */ /* Detect fast increase of totalNoise */ IF( EQ_16( st->element_mode, EVS_MONO ) ) { totalNoiseIncrease = sub( hNoiseEst->totalNoise_fx, st->last_totalNoise_fx ); // Q8 st->last_totalNoise_fx = hNoiseEst->totalNoise_fx; // Q8 } ELSE { totalNoiseIncrease = sub( extract_h( hNoiseEst->totalNoise_32fx ), st->last_totalNoise_fx ); // Q8 st->last_totalNoise_fx = extract_h( hNoiseEst->totalNoise_32fx ); // Q8 } move16(); IF( totalNoiseIncrease > 0 ) { Loading