aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/qcelpdata.h
diff options
context:
space:
mode:
authorKenan Gillet2008-11-30 17:18:17 +0000
committerVitor Sessak2008-11-30 17:18:17 +0000
commit640760da3efeffa5893caa905d2a0fe39b1e55ff (patch)
tree8fba9527ed8d303daaf067654da6b0f4109c6f9a /libavcodec/qcelpdata.h
parent6dbdf2f26e644ff79f32413e19fb30263107631b (diff)
More OKed parts of the QCELP decoder
patch by Kenan Gillet, kenan.gillet gmail com Originally committed as revision 15961 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/qcelpdata.h')
-rw-r--r--libavcodec/qcelpdata.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/libavcodec/qcelpdata.h b/libavcodec/qcelpdata.h
index e2a26d0d1e..b1b3d98723 100644
--- a/libavcodec/qcelpdata.h
+++ b/libavcodec/qcelpdata.h
@@ -34,6 +34,33 @@
#include "libavutil/common.h"
/**
+ * QCELP unpacked data frame
+ */
+typedef struct {
+/// @defgroup qcelp_codebook_parameters QCELP excitation codebook parameters
+/// @{
+ uint8_t cbsign[16]; ///!< sign of the codebook gain for each codebook subframe
+ uint8_t cbgain[16]; ///!< unsigned codebook gain for each codebook subframe
+ uint8_t cindex[16]; ///!< codebook index for each codebook subframe
+/// @}
+
+/// @defgroup qcelp_pitch_parameters QCELP pitch prediction parameters
+/// @{
+ uint8_t plag[4]; ///!< pitch lag for each pitch subframe
+ uint8_t pfrac[4]; ///!< fractional pitch lag for each pitch subframe
+ uint8_t pgain[4]; ///!< pitch gain for each pitch subframe
+/// @}
+
+ /**
+ * line spectral pair frequencies (LSP) for RATE_OCTAVE,
+ * line spectral pair frequencies grouped into five vectors
+ * of dimension two (LSPV) for other rates
+ */
+ uint8_t lspv[10];
+
+} QCELPFrame;
+
+/**
* pre-calculated table for hammsinc function
* Only half of the table is needed because of symmetry.
*
@@ -47,7 +74,7 @@ typedef struct {
uint8_t bitlen; /*!< number of bits to read */
} QCELPBitmap;
-#define QCELP_OF(variable, bit, len) {offsetof(QCELPContext, variable), bit, len}
+#define QCELP_OF(variable, bit, len) {offsetof(QCELPFrame, variable), bit, len}
/* Disable the below code for now to allow 'make checkheaders' to pass. */
#if 0
@@ -243,7 +270,7 @@ static const QCELPBitmap * const qcelp_unpacking_bitmaps_per_rate[5] = {
qcelp_rate_full_bitmap,
};
-static const uint16_t qcelp_bits_per_rate[5] = {
+static const uint16_t qcelp_unpacking_bitmaps_lengths[5] = {
0, ///!< for SILENCE rate
FF_ARRAY_ELEMS(qcelp_rate_octave_bitmap),
FF_ARRAY_ELEMS(qcelp_rate_quarter_bitmap),