summaryrefslogtreecommitdiff
path: root/libavcodec/g729data.h
diff options
context:
space:
mode:
authorVladimir Voroshilov <voroshil@gmail.com>2008-09-17 06:13:07 +0000
committerVladimir Voroshilov <voroshil@gmail.com>2008-09-17 06:13:07 +0000
commit00cc0ce91e26a207057d8ba986c663823f41a4fc (patch)
tree3dfc70a066c15c371897f2407e2bf8d844cc02b8 /libavcodec/g729data.h
parent1a18912e491c55dcf6d3b10ed72ae041053ccca8 (diff)
downloadffmpeg-00cc0ce91e26a207057d8ba986c663823f41a4fc.tar.gz
Second-stage gain and Moving Average Predictor codebooks.
Originally committed as revision 15342 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/g729data.h')
-rw-r--r--libavcodec/g729data.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/libavcodec/g729data.h b/libavcodec/g729data.h
index 09b3a47f0d..192eaa4ff0 100644
--- a/libavcodec/g729data.h
+++ b/libavcodec/g729data.h
@@ -225,4 +225,46 @@ static const int16_t cb_gain_1st_8k[1<<GC_1ST_IDX_BITS_8K][2] =
{ 356 , 14756 },
{ 57 , 5404 },
};
+
+/**
+ * gain codebook (second stage), 8k mode (3.9.2 of G.729)
+ */
+static const int16_t cb_gain_2nd_8k[1<<GC_2ND_IDX_BITS_8K][2] =
+{ /*(1.14) (1.13) */
+ { 5142 , 592 },
+ { 17299 , 1861 },
+ { 6160 , 2395 },
+ { 16112 , 3392 },
+ { 826 , 2005 },
+ { 18973 , 5935 },
+ { 1994 , 0 },
+ { 15434 , 237 },
+ { 10573 , 2966 },
+ { 15132 , 4914 },
+ { 11569 , 1196 },
+ { 14194 , 1630 },
+ { 8091 , 4861 },
+ { 15161 , 14276 },
+ { 9120 , 525 },
+ { 13260 , 3256 },
+};
+
+/**
+ * 4th order Moving Average (MA) Predictor codebook (3.2.4 of G.729)
+ */
+static const int16_t cb_ma_predictor[2][MA_NP][10] =
+{ /* (0.15) */
+ {
+ { 8421, 9109, 9175, 8965, 9034, 9057, 8765, 8775, 9106, 8673},
+ { 7018, 7189, 7638, 7307, 7444, 7379, 7038, 6956, 6930, 6868},
+ { 5472, 4990, 5134, 5177, 5246, 5141, 5206, 5095, 4830, 5147},
+ { 4056, 3031, 2614, 3024, 2916, 2713, 3309, 3237, 2857, 3473}
+ },
+ {
+ { 7733, 7880, 8188, 8175, 8247, 8490, 8637, 8601, 8359, 7569},
+ { 4210, 3031, 2552, 3473, 3876, 3853, 4184, 4154, 3909, 3968},
+ { 3214, 1930, 1313, 2143, 2493, 2385, 2755, 2706, 2542, 2919},
+ { 3024, 1592, 940, 1631, 1723, 1579, 2034, 2084, 1913, 2601}
+ }
+};
#endif // AVCODEC_G729DATA_H