Loading lib_com/fd_cng_com_fx.c +80 −24 Original line number Diff line number Diff line Loading @@ -483,6 +483,54 @@ void expand_range( move16(); } void expand_range_fx( Word32 *in, // Q25 Word32 *out, // exp:out_exp Word16 *out_exp, const Word16 len ) { Word16 i, tmp_e; Word32 maxVal, tmp32; Word16 maxOutExp; const Word32 low_lim = 726940; /* 0.0003385080526823181f in Q31 */ move32(); /* Find max possible output exponent. */ maxVal = 0; move32(); FOR( i = 0; i < len; i++ ) { maxVal = L_max( maxVal, in[i] ); } tmp32 = BASOP_util_Pow2( maxVal, Q31 - Q25, &tmp_e ); maxOutExp = tmp_e; move16(); /* out = (2^(in) - 1) */ FOR( i = 0; i < len; i++ ) { tmp32 = BASOP_util_Pow2( in[i], Q31 - Q25, &tmp_e ); // 2^x tmp32 = L_sub( tmp32, L_shl( 1, sub( 31, tmp_e ) ) ); // 2^x - 1 tmp32 = L_shr( tmp32, sub( maxOutExp, tmp_e ) ); // make exp same as maxExpOut out[i] = tmp32; move32(); Word32 tmp_low_lim = L_shr( low_lim, maxOutExp ); if ( LT_32( out[i], tmp_low_lim ) ) { out[i] = tmp_low_lim; move32(); } } *out_exp = maxOutExp; move16(); return; } /*------------------------------------------------------------------- * expand_range_var_e() * Loading Loading @@ -1145,10 +1193,10 @@ void minimum_statistics( void minimum_statistics_fx( Word16 len, /* i : Total number of partitions (CLDFB or FFT) */ Word16 lenFFT, /* i : Number of FFT partitions */ Word16 *psize, /* i : Partition sizes, fractional */ Word16 *psize, /* i : Partition sizes, fractional Q9*/ Word16 *msPeriodog, /* i : Periodogram (energies) */ Word16 *msNoiseFloor, /* i/o: Noise floors (energies) */ Word16 *msNoiseEst, /* i/o: Noise estimates (energies) */ Word32 *msNoiseFloor, /* i/o: Noise floors (energies) Q25*/ Word32 *msNoiseEst, /* i/o: Noise estimates (energies) Q25*/ Word32 *msAlpha, /* i/o: Forgetting factors */ Word16 *msPsd, /* i/o: Power Spectral Density (smoothed periodogram => energies) */ Word16 *msPsdFirstMoment, /* i/o: PSD statistics of 1st order (energy means) */ Loading Loading @@ -1223,8 +1271,8 @@ void minimum_statistics_fx( IF( LT_16( hFdCngCom->msFrCnt_init_counter, hFdCngCom->msFrCnt_init_thresh ) ) { Copy( msPeriodog, msPsd, len ); /* 6Q9 */ Copy( msPeriodog, msNoiseFloor, len ); /* 6Q9 */ Copy( msPeriodog, msNoiseEst, len ); /* 6Q9 */ Copy_Scale_sig_16_32_no_sat( msPeriodog, msNoiseFloor, len, Q16 ); /* Q25 */ Copy_Scale_sig_16_32_no_sat( msPeriodog, msNoiseEst, len, Q16 ); /* Q25 */ Copy( msPeriodog, msPsdFirstMoment, len ); /* 6Q9 */ set32_fx( msPsdSecondMoment, 0l /*0.0 Q31*/, len ); Loading Loading @@ -1335,7 +1383,16 @@ void minimum_statistics_fx( /* Compute SNR */ /* msPeriodogSum[cnt] with format 16Q15 */ snr = dotp_s_fx( msNoiseFloor + start, psize + start, current_len, CNG_HS ); Word16 msNoiseFloor16tmp[NPART_SHAPING]; IF( enc_dec == ENC ) { Copy_Scale_sig32_16( msNoiseFloor, msNoiseFloor16tmp, NPART, 0 ); } ELSE { Copy_Scale_sig32_16( msNoiseFloor, msNoiseFloor16tmp, NPART_SHAPING, 0 ); } snr = dotp_s_fx( &msNoiseFloor16tmp[start], psize + start, current_len, CNG_HS ); IF( GT_32( L_shr( Mpy_32_16_1( msPsdSum[cnt], 18431 /*0.56246299817 Q15*/ ), 13 ), snr ) ) { Loading Loading @@ -1366,16 +1423,16 @@ void minimum_statistics_fx( /* calculate scalar2 with normalized msNoiseFloor[j], exponent -2*s1 */ s1 = WORD16_BITS - 1; move16(); if ( msNoiseFloor[j] != 0 ) if ( msNoiseFloor16tmp[j] != 0 ) { s1 = norm_s( msNoiseFloor[j] ); s1 = norm_s( msNoiseFloor16tmp[j] ); } msNoiseFloor16 = shl( msNoiseFloor[j], s1 ); msNoiseFloor16 = shl( msNoiseFloor16tmp[j], s1 ); scalar2 = L_mult( msNoiseFloor16, msNoiseFloor16 ); /* calculate difference, both elements in 6Q9 format, use absolute value to avoid -1.0 x -1.0 multiplications later */ scalar316 = abs_s( sub( msPsd[j], msNoiseFloor[j] ) ); scalar316 = abs_s( sub( msPsd[j], msNoiseFloor16tmp[j] ) ); s2 = WORD16_BITS - 1; move16(); Loading Loading @@ -1475,7 +1532,7 @@ void minimum_statistics_fx( IF( msNoiseFloor[j] != 0 /*0.0 Q15*/ ) { tmp = L_mult( msNoiseFloor[j], msNoiseFloor[j] ); tmp = Mpy_32_32( msNoiseFloor[j], msNoiseFloor[j] ); tmp16 = BASOP_Util_Divide3232_uu_1616_Scale( msPsdSecondMoment[j], tmp, &s ); /* consider factor of 2 */ s = s_min( s_max( sub( s, 1 ), -( WORD16_BITS - 1 ) ), ( WORD16_BITS - 1 ) ); Loading Loading @@ -1586,7 +1643,7 @@ void minimum_statistics_fx( } } /* Get the current noise floor */ Copy_Scale_sig_32_16( msCurrentMinOut, msNoiseFloor, len, -16 ); Copy32( msCurrentMinOut, msNoiseFloor, len ); } ELSE /* sub window complete */ { Loading Loading @@ -1644,7 +1701,7 @@ void minimum_statistics_fx( set32_fx( msCurrentMin, 2147483647l /*1.0 Q31*/, len ); /* Get the current noise floor */ Copy_Scale_sig_32_16( msCurrentMinOut, msNoiseFloor, len, -16 ); Copy32( msCurrentMinOut, msNoiseFloor, len ); } } Loading Loading @@ -1701,18 +1758,19 @@ void minimum_statistics_fx( hFdCngCom->msFrCnt = add( hFdCngCom->msFrCnt, 1 ); move16(); } Word64 tmp64; /* Smooth noise estimate during CNG phases */ FOR( j = 0; j < len; j++ ) { msNoiseEst[j] = round_fx( L_mac( L_mult( 31130 /*0.95 Q15*/, msNoiseEst[j] ), 1638 /*0.05 Q15*/, msNoiseFloor[j] ) ); move16(); tmp64 = W_add( W_mult_32_16( msNoiseEst[j], 31130 /*0.95 Q15*/ ), W_mult_32_16( msNoiseFloor[j], 1638 /*0.05 Q15*/ ) ); msNoiseEst[j] = W_extract_h( W_shl( tmp64, 16 ) ); // Q25 move32(); } } IF( EQ_16( enc_dec, DEC ) && EQ_16( element_mode, IVAS_CPE_TD ) ) { // v_multc(msNoiseEst, 1.4125f, msNoiseEst, NPART_SHAPING); v_multc_att( msNoiseEst, 23142, msNoiseEst, NPART_SHAPING ); v_multc_att32( msNoiseEst, 23142, msNoiseEst, NPART_SHAPING ); } /* Collect buffers */ Copy( msPeriodog, msPeriodogBuf + len * ( *msPeriodogBufPtr ), len ); Loading @@ -1734,17 +1792,15 @@ void minimum_statistics_fx( { scalar = L_mac( scalar, msPeriodogBuf[i], 6554 /*1.0/MSBUFLEN Q15*/ ); } scalar16 = round_fx( scalar ); if ( GT_16( msNoiseEst[j], scalar16 ) /*0.0 Q15*/ ) if ( GT_32( msNoiseEst[j], scalar ) /*0.0 Q15*/ ) { msNoiseEst[j] = scalar16; move16(); msNoiseEst[j] = scalar; move32(); } assert( msNoiseEst[j] >= 0 /*0.0 Q15*/ ); } } /*------------------------------------------------------------------- * apply_scale() * Loading lib_com/prot_fx.h +8 −2 Original line number Diff line number Diff line Loading @@ -5163,6 +5163,12 @@ void expand_range( Word16 *out_exp, const Word16 len ); void expand_range_fx( Word32 *in, // Q25 Word32 *out, // exp:out_exp Word16 *out_exp, const Word16 len ); void expand_range_var_exp( Word16 *in, Word16 in_exp, Loading Loading @@ -5198,8 +5204,8 @@ void minimum_statistics_fx( Word16 lenFFT, /* i : Number of FFT partitions */ Word16 *psize, /* i : Partition sizes, fractional */ Word16 *msPeriodog, /* i : Periodogram (energies) */ Word16 *msNoiseFloor, /* i/o: Noise floors (energies) */ Word16 *msNoiseEst, /* i/o: Noise estimates (energies) */ Word32 *msNoiseFloor, /* i/o: Noise floors (energies) Q25*/ Word32 *msNoiseEst, /* i/o: Noise estimates (energies) Q25*/ Word32 *msAlpha, /* i/o: Forgetting factors */ Word16 *msPsd, /* i/o: Power Spectral Density (smoothed periodogram => energies) */ Word16 *msPsdFirstMoment, /* i/o: PSD statistics of 1st order (energy means) */ Loading lib_dec/fd_cng_dec_fx.c +5 −5 Original line number Diff line number Diff line Loading @@ -117,7 +117,7 @@ void initFdCngDec_ivas_fx( set16_fx( hFdCngDec->msPsd, 0, NPART_SHAPING ); set32_fx( hFdCngDec->msPsd_fx, 0, NPART_SHAPING ); set16_fx( hFdCngDec->msNoiseFloor, 0, NPART_SHAPING ); set32_fx( hFdCngDec->msNoiseFloor_32fx, 0, NPART_SHAPING ); set32_fx( hFdCngDec->msNoiseEst, 0, NPART_SHAPING ); set16_fx( &hFdCngDec->msNoiseEst_exp, 0, 1 ); Loading @@ -142,7 +142,7 @@ void initFdCngDec_ivas_fx( move16(); set16_fx( hFdCngDec->msLogPeriodog, 0, NPART_SHAPING ); set16_fx( hFdCngDec->msLogNoiseEst, 0, NPART_SHAPING ); set32_fx( hFdCngDec->msLogNoiseEst_32fx, 0, NPART_SHAPING ); set16_fx( hFdCngDec->psize_shaping, 0, NPART_SHAPING ); hFdCngDec->nFFTpart_shaping = 0; Loading Loading @@ -2231,8 +2231,8 @@ void perform_noise_estimation_dec_ivas_fx( nFFTpart, psize_norm, hFdCngDec->msLogPeriodog, hFdCngDec->msNoiseFloor, hFdCngDec->msLogNoiseEst, hFdCngDec->msNoiseFloor_32fx, hFdCngDec->msLogNoiseEst_32fx, hFdCngDec->msAlpha, hFdCngDec->msPsd, hFdCngDec->msPsdFirstMoment, Loading @@ -2259,7 +2259,7 @@ void perform_noise_estimation_dec_ivas_fx( move16(); /* Expand MS outputs */ expand_range( hFdCngDec->msLogNoiseEst, hFdCngDec->msNoiseEst, &hFdCngDec->msNoiseEst_exp, npart ); expand_range_fx( hFdCngDec->msLogNoiseEst_32fx, hFdCngDec->msNoiseEst, &hFdCngDec->msNoiseEst_exp, npart ); } } Loading lib_dec/stat_dec.h +4 −2 Original line number Diff line number Diff line Loading @@ -95,10 +95,12 @@ typedef struct Word32 msPsdSecondMoment[NPART_SHAPING]; Word16 msNoiseFloor[NPART_SHAPING]; /* Estimated noise floor */ Word32 msNoiseFloor_32fx[NPART_SHAPING]; /* IVAS: Estimated noise floor Q25*/ Word32 msNoiseEst[NPART_SHAPING]; /* Estimated noise level */ Word16 msNoiseEst_exp; Word16 msLogPeriodog[NPART_SHAPING]; Word16 msLogNoiseEst[NPART_SHAPING]; Word32 msLogNoiseEst_32fx[NPART_SHAPING]; /*IVAS: Q25*/ Word16 npart_shaping; /* Number of partitions */ Word16 nFFTpart_shaping; /* Number of hybrid spectral partitions */ Loading lib_enc/enc_uv_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ void encod_unvoiced_ivas_fx( // E_ACELP_innovative_codebook_fx( exc_fx, *pt_pitch_fx, 0, 1, gain_pit_fx, hLPDmem->tilt_code, acelp_cfg, i_subfr, p_Aq_fx, h1_fx, xn_fx, cn_fx, y1, y2_fx, (Word8) st_fx->acelp_autocorr, &prm, code_fx, shift, st_fx->L_frame, st_fx->last_L_frame, st_fx->total_brate, st_fx->element_mode ); inov_encode_ivas_fx( st_fx, st_fx->core_brate, 0, L_FRAME, st_fx->last_L_frame, UNVOICED, st_fx->bwidth, st_fx->sharpFlag, i_subfr, -1, p_Aq_fx, UNVOICED, st_fx->bwidth, 1, i_subfr, -1, p_Aq_fx, gain_pit_fx, cn_fx, exc_fx, h2_fx, hLPDmem->tilt_code, *pt_pitch_fx, xn_fx, code_fx, y2_fx, &unbits_PI, L_SUBFR, shift, Q_new ); E_ACELP_xy2_corr( xn_fx, y1, y2_fx, &g_corr, L_SUBFR, Q_xn ); Loading Loading
lib_com/fd_cng_com_fx.c +80 −24 Original line number Diff line number Diff line Loading @@ -483,6 +483,54 @@ void expand_range( move16(); } void expand_range_fx( Word32 *in, // Q25 Word32 *out, // exp:out_exp Word16 *out_exp, const Word16 len ) { Word16 i, tmp_e; Word32 maxVal, tmp32; Word16 maxOutExp; const Word32 low_lim = 726940; /* 0.0003385080526823181f in Q31 */ move32(); /* Find max possible output exponent. */ maxVal = 0; move32(); FOR( i = 0; i < len; i++ ) { maxVal = L_max( maxVal, in[i] ); } tmp32 = BASOP_util_Pow2( maxVal, Q31 - Q25, &tmp_e ); maxOutExp = tmp_e; move16(); /* out = (2^(in) - 1) */ FOR( i = 0; i < len; i++ ) { tmp32 = BASOP_util_Pow2( in[i], Q31 - Q25, &tmp_e ); // 2^x tmp32 = L_sub( tmp32, L_shl( 1, sub( 31, tmp_e ) ) ); // 2^x - 1 tmp32 = L_shr( tmp32, sub( maxOutExp, tmp_e ) ); // make exp same as maxExpOut out[i] = tmp32; move32(); Word32 tmp_low_lim = L_shr( low_lim, maxOutExp ); if ( LT_32( out[i], tmp_low_lim ) ) { out[i] = tmp_low_lim; move32(); } } *out_exp = maxOutExp; move16(); return; } /*------------------------------------------------------------------- * expand_range_var_e() * Loading Loading @@ -1145,10 +1193,10 @@ void minimum_statistics( void minimum_statistics_fx( Word16 len, /* i : Total number of partitions (CLDFB or FFT) */ Word16 lenFFT, /* i : Number of FFT partitions */ Word16 *psize, /* i : Partition sizes, fractional */ Word16 *psize, /* i : Partition sizes, fractional Q9*/ Word16 *msPeriodog, /* i : Periodogram (energies) */ Word16 *msNoiseFloor, /* i/o: Noise floors (energies) */ Word16 *msNoiseEst, /* i/o: Noise estimates (energies) */ Word32 *msNoiseFloor, /* i/o: Noise floors (energies) Q25*/ Word32 *msNoiseEst, /* i/o: Noise estimates (energies) Q25*/ Word32 *msAlpha, /* i/o: Forgetting factors */ Word16 *msPsd, /* i/o: Power Spectral Density (smoothed periodogram => energies) */ Word16 *msPsdFirstMoment, /* i/o: PSD statistics of 1st order (energy means) */ Loading Loading @@ -1223,8 +1271,8 @@ void minimum_statistics_fx( IF( LT_16( hFdCngCom->msFrCnt_init_counter, hFdCngCom->msFrCnt_init_thresh ) ) { Copy( msPeriodog, msPsd, len ); /* 6Q9 */ Copy( msPeriodog, msNoiseFloor, len ); /* 6Q9 */ Copy( msPeriodog, msNoiseEst, len ); /* 6Q9 */ Copy_Scale_sig_16_32_no_sat( msPeriodog, msNoiseFloor, len, Q16 ); /* Q25 */ Copy_Scale_sig_16_32_no_sat( msPeriodog, msNoiseEst, len, Q16 ); /* Q25 */ Copy( msPeriodog, msPsdFirstMoment, len ); /* 6Q9 */ set32_fx( msPsdSecondMoment, 0l /*0.0 Q31*/, len ); Loading Loading @@ -1335,7 +1383,16 @@ void minimum_statistics_fx( /* Compute SNR */ /* msPeriodogSum[cnt] with format 16Q15 */ snr = dotp_s_fx( msNoiseFloor + start, psize + start, current_len, CNG_HS ); Word16 msNoiseFloor16tmp[NPART_SHAPING]; IF( enc_dec == ENC ) { Copy_Scale_sig32_16( msNoiseFloor, msNoiseFloor16tmp, NPART, 0 ); } ELSE { Copy_Scale_sig32_16( msNoiseFloor, msNoiseFloor16tmp, NPART_SHAPING, 0 ); } snr = dotp_s_fx( &msNoiseFloor16tmp[start], psize + start, current_len, CNG_HS ); IF( GT_32( L_shr( Mpy_32_16_1( msPsdSum[cnt], 18431 /*0.56246299817 Q15*/ ), 13 ), snr ) ) { Loading Loading @@ -1366,16 +1423,16 @@ void minimum_statistics_fx( /* calculate scalar2 with normalized msNoiseFloor[j], exponent -2*s1 */ s1 = WORD16_BITS - 1; move16(); if ( msNoiseFloor[j] != 0 ) if ( msNoiseFloor16tmp[j] != 0 ) { s1 = norm_s( msNoiseFloor[j] ); s1 = norm_s( msNoiseFloor16tmp[j] ); } msNoiseFloor16 = shl( msNoiseFloor[j], s1 ); msNoiseFloor16 = shl( msNoiseFloor16tmp[j], s1 ); scalar2 = L_mult( msNoiseFloor16, msNoiseFloor16 ); /* calculate difference, both elements in 6Q9 format, use absolute value to avoid -1.0 x -1.0 multiplications later */ scalar316 = abs_s( sub( msPsd[j], msNoiseFloor[j] ) ); scalar316 = abs_s( sub( msPsd[j], msNoiseFloor16tmp[j] ) ); s2 = WORD16_BITS - 1; move16(); Loading Loading @@ -1475,7 +1532,7 @@ void minimum_statistics_fx( IF( msNoiseFloor[j] != 0 /*0.0 Q15*/ ) { tmp = L_mult( msNoiseFloor[j], msNoiseFloor[j] ); tmp = Mpy_32_32( msNoiseFloor[j], msNoiseFloor[j] ); tmp16 = BASOP_Util_Divide3232_uu_1616_Scale( msPsdSecondMoment[j], tmp, &s ); /* consider factor of 2 */ s = s_min( s_max( sub( s, 1 ), -( WORD16_BITS - 1 ) ), ( WORD16_BITS - 1 ) ); Loading Loading @@ -1586,7 +1643,7 @@ void minimum_statistics_fx( } } /* Get the current noise floor */ Copy_Scale_sig_32_16( msCurrentMinOut, msNoiseFloor, len, -16 ); Copy32( msCurrentMinOut, msNoiseFloor, len ); } ELSE /* sub window complete */ { Loading Loading @@ -1644,7 +1701,7 @@ void minimum_statistics_fx( set32_fx( msCurrentMin, 2147483647l /*1.0 Q31*/, len ); /* Get the current noise floor */ Copy_Scale_sig_32_16( msCurrentMinOut, msNoiseFloor, len, -16 ); Copy32( msCurrentMinOut, msNoiseFloor, len ); } } Loading Loading @@ -1701,18 +1758,19 @@ void minimum_statistics_fx( hFdCngCom->msFrCnt = add( hFdCngCom->msFrCnt, 1 ); move16(); } Word64 tmp64; /* Smooth noise estimate during CNG phases */ FOR( j = 0; j < len; j++ ) { msNoiseEst[j] = round_fx( L_mac( L_mult( 31130 /*0.95 Q15*/, msNoiseEst[j] ), 1638 /*0.05 Q15*/, msNoiseFloor[j] ) ); move16(); tmp64 = W_add( W_mult_32_16( msNoiseEst[j], 31130 /*0.95 Q15*/ ), W_mult_32_16( msNoiseFloor[j], 1638 /*0.05 Q15*/ ) ); msNoiseEst[j] = W_extract_h( W_shl( tmp64, 16 ) ); // Q25 move32(); } } IF( EQ_16( enc_dec, DEC ) && EQ_16( element_mode, IVAS_CPE_TD ) ) { // v_multc(msNoiseEst, 1.4125f, msNoiseEst, NPART_SHAPING); v_multc_att( msNoiseEst, 23142, msNoiseEst, NPART_SHAPING ); v_multc_att32( msNoiseEst, 23142, msNoiseEst, NPART_SHAPING ); } /* Collect buffers */ Copy( msPeriodog, msPeriodogBuf + len * ( *msPeriodogBufPtr ), len ); Loading @@ -1734,17 +1792,15 @@ void minimum_statistics_fx( { scalar = L_mac( scalar, msPeriodogBuf[i], 6554 /*1.0/MSBUFLEN Q15*/ ); } scalar16 = round_fx( scalar ); if ( GT_16( msNoiseEst[j], scalar16 ) /*0.0 Q15*/ ) if ( GT_32( msNoiseEst[j], scalar ) /*0.0 Q15*/ ) { msNoiseEst[j] = scalar16; move16(); msNoiseEst[j] = scalar; move32(); } assert( msNoiseEst[j] >= 0 /*0.0 Q15*/ ); } } /*------------------------------------------------------------------- * apply_scale() * Loading
lib_com/prot_fx.h +8 −2 Original line number Diff line number Diff line Loading @@ -5163,6 +5163,12 @@ void expand_range( Word16 *out_exp, const Word16 len ); void expand_range_fx( Word32 *in, // Q25 Word32 *out, // exp:out_exp Word16 *out_exp, const Word16 len ); void expand_range_var_exp( Word16 *in, Word16 in_exp, Loading Loading @@ -5198,8 +5204,8 @@ void minimum_statistics_fx( Word16 lenFFT, /* i : Number of FFT partitions */ Word16 *psize, /* i : Partition sizes, fractional */ Word16 *msPeriodog, /* i : Periodogram (energies) */ Word16 *msNoiseFloor, /* i/o: Noise floors (energies) */ Word16 *msNoiseEst, /* i/o: Noise estimates (energies) */ Word32 *msNoiseFloor, /* i/o: Noise floors (energies) Q25*/ Word32 *msNoiseEst, /* i/o: Noise estimates (energies) Q25*/ Word32 *msAlpha, /* i/o: Forgetting factors */ Word16 *msPsd, /* i/o: Power Spectral Density (smoothed periodogram => energies) */ Word16 *msPsdFirstMoment, /* i/o: PSD statistics of 1st order (energy means) */ Loading
lib_dec/fd_cng_dec_fx.c +5 −5 Original line number Diff line number Diff line Loading @@ -117,7 +117,7 @@ void initFdCngDec_ivas_fx( set16_fx( hFdCngDec->msPsd, 0, NPART_SHAPING ); set32_fx( hFdCngDec->msPsd_fx, 0, NPART_SHAPING ); set16_fx( hFdCngDec->msNoiseFloor, 0, NPART_SHAPING ); set32_fx( hFdCngDec->msNoiseFloor_32fx, 0, NPART_SHAPING ); set32_fx( hFdCngDec->msNoiseEst, 0, NPART_SHAPING ); set16_fx( &hFdCngDec->msNoiseEst_exp, 0, 1 ); Loading @@ -142,7 +142,7 @@ void initFdCngDec_ivas_fx( move16(); set16_fx( hFdCngDec->msLogPeriodog, 0, NPART_SHAPING ); set16_fx( hFdCngDec->msLogNoiseEst, 0, NPART_SHAPING ); set32_fx( hFdCngDec->msLogNoiseEst_32fx, 0, NPART_SHAPING ); set16_fx( hFdCngDec->psize_shaping, 0, NPART_SHAPING ); hFdCngDec->nFFTpart_shaping = 0; Loading Loading @@ -2231,8 +2231,8 @@ void perform_noise_estimation_dec_ivas_fx( nFFTpart, psize_norm, hFdCngDec->msLogPeriodog, hFdCngDec->msNoiseFloor, hFdCngDec->msLogNoiseEst, hFdCngDec->msNoiseFloor_32fx, hFdCngDec->msLogNoiseEst_32fx, hFdCngDec->msAlpha, hFdCngDec->msPsd, hFdCngDec->msPsdFirstMoment, Loading @@ -2259,7 +2259,7 @@ void perform_noise_estimation_dec_ivas_fx( move16(); /* Expand MS outputs */ expand_range( hFdCngDec->msLogNoiseEst, hFdCngDec->msNoiseEst, &hFdCngDec->msNoiseEst_exp, npart ); expand_range_fx( hFdCngDec->msLogNoiseEst_32fx, hFdCngDec->msNoiseEst, &hFdCngDec->msNoiseEst_exp, npart ); } } Loading
lib_dec/stat_dec.h +4 −2 Original line number Diff line number Diff line Loading @@ -95,10 +95,12 @@ typedef struct Word32 msPsdSecondMoment[NPART_SHAPING]; Word16 msNoiseFloor[NPART_SHAPING]; /* Estimated noise floor */ Word32 msNoiseFloor_32fx[NPART_SHAPING]; /* IVAS: Estimated noise floor Q25*/ Word32 msNoiseEst[NPART_SHAPING]; /* Estimated noise level */ Word16 msNoiseEst_exp; Word16 msLogPeriodog[NPART_SHAPING]; Word16 msLogNoiseEst[NPART_SHAPING]; Word32 msLogNoiseEst_32fx[NPART_SHAPING]; /*IVAS: Q25*/ Word16 npart_shaping; /* Number of partitions */ Word16 nFFTpart_shaping; /* Number of hybrid spectral partitions */ Loading
lib_enc/enc_uv_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ void encod_unvoiced_ivas_fx( // E_ACELP_innovative_codebook_fx( exc_fx, *pt_pitch_fx, 0, 1, gain_pit_fx, hLPDmem->tilt_code, acelp_cfg, i_subfr, p_Aq_fx, h1_fx, xn_fx, cn_fx, y1, y2_fx, (Word8) st_fx->acelp_autocorr, &prm, code_fx, shift, st_fx->L_frame, st_fx->last_L_frame, st_fx->total_brate, st_fx->element_mode ); inov_encode_ivas_fx( st_fx, st_fx->core_brate, 0, L_FRAME, st_fx->last_L_frame, UNVOICED, st_fx->bwidth, st_fx->sharpFlag, i_subfr, -1, p_Aq_fx, UNVOICED, st_fx->bwidth, 1, i_subfr, -1, p_Aq_fx, gain_pit_fx, cn_fx, exc_fx, h2_fx, hLPDmem->tilt_code, *pt_pitch_fx, xn_fx, code_fx, y2_fx, &unbits_PI, L_SUBFR, shift, Q_new ); E_ACELP_xy2_corr( xn_fx, y1, y2_fx, &g_corr, L_SUBFR, Q_xn ); Loading