Mercurial > libavcodec.hg
comparison acelp_pitch_delay.h @ 10532:ca88470521db libavcodec
Implement ff_decode_pitch_lag() that is used by both AMR and SIPR.
Based on code written by Colin McQuillan during his SoC project.
author | vitor |
---|---|
date | Sun, 15 Nov 2009 10:41:46 +0000 |
parents | afad312b9989 |
children | dc394a1cc943 |
comparison
equal
deleted
inserted
replaced
10531:142645a57180 | 10532:ca88470521db |
---|---|
232 */ | 232 */ |
233 float ff_amr_set_fixed_gain(float fixed_gain_factor, float fixed_mean_energy, | 233 float ff_amr_set_fixed_gain(float fixed_gain_factor, float fixed_mean_energy, |
234 float *prediction_error, float energy_mean, | 234 float *prediction_error, float energy_mean, |
235 const float *pred_table); | 235 const float *pred_table); |
236 | 236 |
237 | |
238 /** | |
239 * Decode the adaptive codebook index to the integer and fractional parts | |
240 * of the pitch lag for one subframe at 1/3 fractional precision. | |
241 * | |
242 * The choice of pitch lag is described in 3GPP TS 26.090 section 5.6.1. | |
243 * | |
244 * @param lag_int integer part of pitch lag of the current subframe | |
245 * @param lag_frac fractional part of pitch lag of the current subframe | |
246 * @param pitch_index parsed adaptive codebook (pitch) index | |
247 * @param prev_lag_int integer part of pitch lag for the previous subframe | |
248 * @param subframe current subframe number | |
249 * @param third_as_first treat the third frame the same way as the first | |
250 */ | |
251 void ff_decode_pitch_lag(int *lag_int, int *lag_frac, int pitch_index, | |
252 const int prev_lag_int, const int subframe, | |
253 int third_as_first, int resolution); | |
254 | |
237 #endif /* AVCODEC_ACELP_PITCH_DELAY_H */ | 255 #endif /* AVCODEC_ACELP_PITCH_DELAY_H */ |