diff options
author | Koen Vos <koen.vos@skype.net> | 2011-12-13 23:50:12 +0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-12-13 23:50:12 +0400 |
commit | bbfc9c9ee5de680320aeae2f8bd981ebe7af6861 (patch) | |
tree | 0b1f05721de43ea51d17034e6383447f892dabf7 /silk/float | |
parent | bf75c8ec4d0dded188bc7793de6da56c7ff0be1c (diff) |
Improves the accuracy such that it matches a float decoder much better
Diffstat (limited to 'silk/float')
-rw-r--r-- | silk/float/find_pred_coefs_FLP.c | 2 | ||||
-rw-r--r-- | silk/float/wrappers_FLP.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/silk/float/find_pred_coefs_FLP.c b/silk/float/find_pred_coefs_FLP.c index 71866778..9c0726a2 100644 --- a/silk/float/find_pred_coefs_FLP.c +++ b/silk/float/find_pred_coefs_FLP.c @@ -97,7 +97,7 @@ void silk_find_pred_coefs_FLP( minInvGain = 1.0f / MAX_PREDICTION_POWER_GAIN_AFTER_RESET; } else { minInvGain = (silk_float)powf( 2, psEncCtrl->LTPredCodGain / 3 ) / MAX_PREDICTION_POWER_GAIN; - minInvGain /= 0.1f + 0.9f * psEncCtrl->coding_quality; + minInvGain /= 0.25f + 0.75f * psEncCtrl->coding_quality; } /* LPC_in_pre contains the LTP-filtered input for voiced, and the unfiltered input for unvoiced */ diff --git a/silk/float/wrappers_FLP.c b/silk/float/wrappers_FLP.c index ad9c2a59..5e705b1d 100644 --- a/silk/float/wrappers_FLP.c +++ b/silk/float/wrappers_FLP.c @@ -102,7 +102,7 @@ void silk_NSQ_wrapper_FLP( ) { opus_int i, j; - opus_int32 x_Q10[ MAX_FRAME_LENGTH ]; + opus_int32 x_Q3[ MAX_FRAME_LENGTH ]; opus_int32 Gains_Q16[ MAX_NB_SUBFR ]; silk_DWORD_ALIGN opus_int16 PredCoef_Q12[ 2 ][ MAX_LPC_ORDER ]; opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ]; @@ -155,15 +155,15 @@ void silk_NSQ_wrapper_FLP( /* Convert input to fix */ for( i = 0; i < psEnc->sCmn.frame_length; i++ ) { - x_Q10[ i ] = silk_float2int( 1024.0 * x[ i ] ); + x_Q3[ i ] = silk_float2int( 8.0 * x[ i ] ); } /* Call NSQ */ if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 ) { - silk_NSQ_del_dec( &psEnc->sCmn, psNSQ, psIndices, x_Q10, pulses, PredCoef_Q12[ 0 ], LTPCoef_Q14, + 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 ); } else { - silk_NSQ( &psEnc->sCmn, psNSQ, psIndices, x_Q10, pulses, PredCoef_Q12[ 0 ], LTPCoef_Q14, + 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 ); } } |