summaryrefslogtreecommitdiff
path: root/libavcodec/acelp_pitch_delay.h
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2009-11-15 10:41:46 +0000
committerVitor Sessak <vitor1001@gmail.com>2009-11-15 10:41:46 +0000
commitb2bf3cfe322549cdc7bbc1603642ff4137a5e2bb (patch)
tree9cb2500dae5851f1ac09093d4e29eaa95d6c0e49 /libavcodec/acelp_pitch_delay.h
parentadeb907137439b35704de4cb51e51b09599ef267 (diff)
Implement ff_decode_pitch_lag() that is used by both AMR and SIPR.
Based on code written by Colin McQuillan during his SoC project. Originally committed as revision 20540 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/acelp_pitch_delay.h')
-rw-r--r--libavcodec/acelp_pitch_delay.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libavcodec/acelp_pitch_delay.h b/libavcodec/acelp_pitch_delay.h
index 42307d2bba..2413145beb 100644
--- a/libavcodec/acelp_pitch_delay.h
+++ b/libavcodec/acelp_pitch_delay.h
@@ -234,4 +234,22 @@ float ff_amr_set_fixed_gain(float fixed_gain_factor, float fixed_mean_energy,
float *prediction_error, float energy_mean,
const float *pred_table);
+
+/**
+ * Decode the adaptive codebook index to the integer and fractional parts
+ * of the pitch lag for one subframe at 1/3 fractional precision.
+ *
+ * The choice of pitch lag is described in 3GPP TS 26.090 section 5.6.1.
+ *
+ * @param lag_int integer part of pitch lag of the current subframe
+ * @param lag_frac fractional part of pitch lag of the current subframe
+ * @param pitch_index parsed adaptive codebook (pitch) index
+ * @param prev_lag_int integer part of pitch lag for the previous subframe
+ * @param subframe current subframe number
+ * @param third_as_first treat the third frame the same way as the first
+ */
+void ff_decode_pitch_lag(int *lag_int, int *lag_frac, int pitch_index,
+ const int prev_lag_int, const int subframe,
+ int third_as_first, int resolution);
+
#endif /* AVCODEC_ACELP_PITCH_DELAY_H */