Update opus from 1.1 to 1.1.4
Define FLOAT_APPROX in Makefile and misc/msvc12/quake3.vcxproj.
This commit is contained in:
parent
67bfe8f8d6
commit
853110d5d4
146 changed files with 11919 additions and 2111 deletions
|
@ -47,7 +47,7 @@ void silk_encode_do_VAD_FLP(
|
|||
/****************************/
|
||||
/* Voice Activity Detection */
|
||||
/****************************/
|
||||
silk_VAD_GetSA_Q8( &psEnc->sCmn, psEnc->sCmn.inputBuf + 1 );
|
||||
silk_VAD_GetSA_Q8( &psEnc->sCmn, psEnc->sCmn.inputBuf + 1, psEnc->sCmn.arch );
|
||||
|
||||
/**************************************************/
|
||||
/* Convert speech activity into VAD and DTX flags */
|
||||
|
|
|
@ -99,6 +99,6 @@ void silk_find_LPC_FLP(
|
|||
silk_A2NLSF_FLP( NLSF_Q15, a, psEncC->predictLPCOrder );
|
||||
}
|
||||
|
||||
silk_assert( psEncC->indices.NLSFInterpCoef_Q2 == 4 ||
|
||||
silk_assert( psEncC->indices.NLSFInterpCoef_Q2 == 4 ||
|
||||
( psEncC->useInterpolatedNLSFs && !psEncC->first_frame_after_reset && psEncC->nb_subfr == MAX_NB_SUBFR ) );
|
||||
}
|
||||
|
|
|
@ -67,7 +67,8 @@ void silk_find_pred_coefs_FLP(
|
|||
|
||||
/* Quantize LTP gain parameters */
|
||||
silk_quant_LTP_gains_FLP( psEncCtrl->LTPCoef, psEnc->sCmn.indices.LTPIndex, &psEnc->sCmn.indices.PERIndex,
|
||||
&psEnc->sCmn.sum_log_gain_Q7, WLTP, psEnc->sCmn.mu_LTP_Q9, psEnc->sCmn.LTPQuantLowComplexity, psEnc->sCmn.nb_subfr );
|
||||
&psEnc->sCmn.sum_log_gain_Q7, WLTP, psEnc->sCmn.mu_LTP_Q9, psEnc->sCmn.LTPQuantLowComplexity, psEnc->sCmn.nb_subfr,
|
||||
psEnc->sCmn.arch );
|
||||
|
||||
/* Control LTP scaling */
|
||||
silk_LTP_scale_ctrl_FLP( psEnc, psEncCtrl, condCoding );
|
||||
|
@ -90,13 +91,13 @@ void silk_find_pred_coefs_FLP(
|
|||
}
|
||||
silk_memset( psEncCtrl->LTPCoef, 0, psEnc->sCmn.nb_subfr * LTP_ORDER * sizeof( silk_float ) );
|
||||
psEncCtrl->LTPredCodGain = 0.0f;
|
||||
psEnc->sCmn.sum_log_gain_Q7 = 0;
|
||||
psEnc->sCmn.sum_log_gain_Q7 = 0;
|
||||
}
|
||||
|
||||
/* Limit on total predictive coding gain */
|
||||
if( psEnc->sCmn.first_frame_after_reset ) {
|
||||
minInvGain = 1.0f / MAX_PREDICTION_POWER_GAIN_AFTER_RESET;
|
||||
} else {
|
||||
} else {
|
||||
minInvGain = (silk_float)pow( 2, psEncCtrl->LTPredCodGain / 3 ) / MAX_PREDICTION_POWER_GAIN;
|
||||
minInvGain /= 0.25f + 0.75f * psEncCtrl->coding_quality;
|
||||
}
|
||||
|
|
|
@ -205,7 +205,8 @@ void silk_quant_LTP_gains_FLP(
|
|||
const silk_float W[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* I Error weights */
|
||||
const opus_int mu_Q10, /* I Mu value (R/D tradeoff) */
|
||||
const opus_int lowComplexity, /* I Flag for low complexity */
|
||||
const opus_int nb_subfr /* I number of subframes */
|
||||
const opus_int nb_subfr, /* I number of subframes */
|
||||
int arch /* I Run-time architecture */
|
||||
);
|
||||
|
||||
/* Residual energy: nrg = wxx - 2 * wXx * c + c' * wXX * c */
|
||||
|
|
|
@ -182,8 +182,8 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced,
|
|||
|
||||
/* Calculate first vector products before loop */
|
||||
cross_corr = xcorr[ max_lag_4kHz - min_lag_4kHz ];
|
||||
normalizer = silk_energy_FLP( target_ptr, sf_length_8kHz ) +
|
||||
silk_energy_FLP( basis_ptr, sf_length_8kHz ) +
|
||||
normalizer = silk_energy_FLP( target_ptr, sf_length_8kHz ) +
|
||||
silk_energy_FLP( basis_ptr, sf_length_8kHz ) +
|
||||
sf_length_8kHz * 4000.0f;
|
||||
|
||||
C[ 0 ][ min_lag_4kHz ] += (silk_float)( 2 * cross_corr / normalizer );
|
||||
|
|
|
@ -115,6 +115,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
silk_encoder_state_FLP state_Fxx[ ENCODER_NUM_CHANNELS ];
|
||||
stereo_enc_state sStereo;
|
||||
opus_int32 nBitsUsedLBRR;
|
||||
opus_int32 nBitsExceeded;
|
||||
opus_int nChannelsAPI;
|
||||
opus_int nChannelsInternal;
|
||||
|
|
|
@ -161,10 +161,10 @@ void silk_NSQ_wrapper_FLP(
|
|||
/* Call NSQ */
|
||||
if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 ) {
|
||||
silk_NSQ_del_dec( &psEnc->sCmn, psNSQ, psIndices, x_Q3, pulses, PredCoef_Q12[ 0 ], LTPCoef_Q14,
|
||||
AR2_Q13, HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCtrl->pitchL, Lambda_Q10, LTP_scale_Q14 );
|
||||
AR2_Q13, HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCtrl->pitchL, Lambda_Q10, LTP_scale_Q14, psEnc->sCmn.arch );
|
||||
} else {
|
||||
silk_NSQ( &psEnc->sCmn, psNSQ, psIndices, x_Q3, pulses, PredCoef_Q12[ 0 ], LTPCoef_Q14,
|
||||
AR2_Q13, HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCtrl->pitchL, Lambda_Q10, LTP_scale_Q14 );
|
||||
AR2_Q13, HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCtrl->pitchL, Lambda_Q10, LTP_scale_Q14, psEnc->sCmn.arch );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,8 @@ void silk_quant_LTP_gains_FLP(
|
|||
const silk_float W[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* I Error weights */
|
||||
const opus_int mu_Q10, /* I Mu value (R/D tradeoff) */
|
||||
const opus_int lowComplexity, /* I Flag for low complexity */
|
||||
const opus_int nb_subfr /* I number of subframes */
|
||||
const opus_int nb_subfr, /* I number of subframes */
|
||||
int arch /* I Run-time architecture */
|
||||
)
|
||||
{
|
||||
opus_int i;
|
||||
|
@ -193,7 +194,7 @@ void silk_quant_LTP_gains_FLP(
|
|||
W_Q18[ i ] = (opus_int32)silk_float2int( W[ i ] * 262144.0f );
|
||||
}
|
||||
|
||||
silk_quant_LTP_gains( B_Q14, cbk_index, periodicity_index, sum_log_gain_Q7, W_Q18, mu_Q10, lowComplexity, nb_subfr );
|
||||
silk_quant_LTP_gains( B_Q14, cbk_index, periodicity_index, sum_log_gain_Q7, W_Q18, mu_Q10, lowComplexity, nb_subfr, arch );
|
||||
|
||||
for( i = 0; i < nb_subfr * LTP_ORDER; i++ ) {
|
||||
B[ i ] = (silk_float)B_Q14[ i ] * ( 1.0f / 16384.0f );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue