summaryrefslogtreecommitdiff
path: root/libavcodec/qcelpdata.h
diff options
context:
space:
mode:
authorKenan Gillet <kenan.gillet@gmail.com>2008-11-09 12:00:47 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-11-09 12:00:47 +0000
commit2ae1a9b2642d848d01475386f15967f00ae43503 (patch)
tree141d7a4323bfd69ae0eddfbc267e4a67177b2176 /libavcodec/qcelpdata.h
parent3d4fc61064624ab3c65ea525b6b104ca1fa40c1f (diff)
More OKed parts of the QCELP decoder
patch by Kenan Gillet, kenan.gillet gmail com Originally committed as revision 15797 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/qcelpdata.h')
-rw-r--r--libavcodec/qcelpdata.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/libavcodec/qcelpdata.h b/libavcodec/qcelpdata.h
index cf54c811bf..e5e9de5868 100644
--- a/libavcodec/qcelpdata.h
+++ b/libavcodec/qcelpdata.h
@@ -378,4 +378,54 @@ static const qcelp_vector * const qcelp_lspvq[5] = {
qcelp_lspvq5
};
+/**
+ * circular codebook for rate 1 frames in x*100 form
+ *
+ * TIA/EIA/IS-733 2.4.6.1-2
+ */
+static const int16_t qcelp_rate_full_codebook[128] = {
+ 10, -65, -59, 12, 110, 34, -134, 157,
+ 104, -84, -34, -115, 23, -101, 3, 45,
+ -101, -16, -59, 28, -45, 134, -67, 22,
+ 61, -29, 226, -26, -55, -179, 157, -51,
+ -220, -93, -37, 60, 118, 74, -48, -95,
+ -181, 111, 36, -52, -215, 78, -112, 39,
+ -17, -47, -223, 19, 12, -98, -142, 130,
+ 54, -127, 21, -12, 39, -48, 12, 128,
+ 6, -167, 82, -102, -79, 55, -44, 48,
+ -20, -53, 8, -61, 11, -70, -157, -168,
+ 20, -56, -74, 78, 33, -63, -173, -2,
+ -75, -53, -146, 77, 66, -29, 9, -75,
+ 65, 119, -43, 76, 233, 98, 125, -156,
+ -27, 78, -9, 170, 176, 143, -148, -7,
+ 27, -136, 5, 27, 18, 139, 204, 7,
+ -184, -197, 52, -3, 78, -189, 8, -65
+};
+#define QCELP_RATE_FULL_CODEBOOK_RATIO .01
+
+/**
+ * circular codebook for rate 1/2 frames in x*2 form
+ *
+ * TIA/EIA/IS-733 2.4.6.1-1
+ */
+static const int8_t qcelp_rate_half_codebook[128] = {
+ 0, -4, 0, -3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -3, -2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5,
+ 0, 0, 0, 0, 0, 0, 4, 0,
+ 0, 3, 2, 0, 3, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3, 0, 0,
+ -3, 3, 0, 0, -2, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0, -5, 0,
+ 0, 0, 0, 3, 0, 0, 0, 3,
+ 0, 0, 0, 0, 0, 0, 0, 4,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3, 6, -3, -4, 0, -3, -3,
+ 3, -3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0
+};
+#define QCELP_RATE_HALF_CODEBOOK_RATIO 0.5
+
#endif /* AVCODEC_QCELPDATA_H */