summaryrefslogtreecommitdiff
path: root/libavcodec/dcadata.h
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2014-09-22 18:05:40 +0200
committerDiego Biurrun <diego@biurrun.de>2015-02-14 10:13:49 -0800
commit2a9c6fae927964b5dd0b5d3d9292f5621bd21664 (patch)
tree3a6b16a7e5f2f157a2b3985e83c2dc479747762b /libavcodec/dcadata.h
parent8a213179aff0174d81b3e889134a3b4f7d21f5c3 (diff)
dca: Move all tables into dcadata.h
Diffstat (limited to 'libavcodec/dcadata.h')
-rw-r--r--libavcodec/dcadata.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/libavcodec/dcadata.h b/libavcodec/dcadata.h
index 7c37d3ac4e..8be4475d15 100644
--- a/libavcodec/dcadata.h
+++ b/libavcodec/dcadata.h
@@ -7663,4 +7663,93 @@ static const float dca_default_coeffs[10][6][2] = {
* where Ch(n) represents the subband samples in the (n)th audio channel.
*/
+static const int8_t dca_lfe_index[] = {
+ 1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 1, 3, 2, 3
+};
+
+static const int8_t dca_channel_reorder_lfe[][9] = {
+ { 0, -1, -1, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
+ { 2, 0, 1, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, 3, -1, -1, -1, -1, -1, -1 },
+ { 2, 0, 1, 4, -1, -1, -1, -1, -1 },
+ { 0, 1, 3, 4, -1, -1, -1, -1, -1 },
+ { 2, 0, 1, 4, 5, -1, -1, -1, -1 },
+ { 3, 4, 0, 1, 5, 6, -1, -1, -1 },
+ { 2, 0, 1, 4, 5, 6, -1, -1, -1 },
+ { 0, 6, 4, 5, 2, 3, -1, -1, -1 },
+ { 4, 2, 5, 0, 1, 6, 7, -1, -1 },
+ { 5, 6, 0, 1, 7, 3, 8, 4, -1 },
+ { 4, 2, 5, 0, 1, 6, 8, 7, -1 },
+};
+
+static const int8_t dca_channel_reorder_lfe_xch[][9] = {
+ { 0, 2, -1, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, 3, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, 3, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, 3, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, 3, -1, -1, -1, -1, -1, -1 },
+ { 2, 0, 1, 4, -1, -1, -1, -1, -1 },
+ { 0, 1, 3, 4, -1, -1, -1, -1, -1 },
+ { 2, 0, 1, 4, 5, -1, -1, -1, -1 },
+ { 0, 1, 4, 5, 3, -1, -1, -1, -1 },
+ { 2, 0, 1, 5, 6, 4, -1, -1, -1 },
+ { 3, 4, 0, 1, 6, 7, 5, -1, -1 },
+ { 2, 0, 1, 4, 5, 6, 7, -1, -1 },
+ { 0, 6, 4, 5, 2, 3, 7, -1, -1 },
+ { 4, 2, 5, 0, 1, 7, 8, 6, -1 },
+ { 5, 6, 0, 1, 8, 3, 9, 4, 7 },
+ { 4, 2, 5, 0, 1, 6, 9, 8, 7 },
+};
+
+static const int8_t dca_channel_reorder_nolfe[][9] = {
+ { 0, -1, -1, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
+ { 2, 0, 1, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, 2, -1, -1, -1, -1, -1, -1 },
+ { 2, 0, 1, 3, -1, -1, -1, -1, -1 },
+ { 0, 1, 2, 3, -1, -1, -1, -1, -1 },
+ { 2, 0, 1, 3, 4, -1, -1, -1, -1 },
+ { 2, 3, 0, 1, 4, 5, -1, -1, -1 },
+ { 2, 0, 1, 3, 4, 5, -1, -1, -1 },
+ { 0, 5, 3, 4, 1, 2, -1, -1, -1 },
+ { 3, 2, 4, 0, 1, 5, 6, -1, -1 },
+ { 4, 5, 0, 1, 6, 2, 7, 3, -1 },
+ { 3, 2, 4, 0, 1, 5, 7, 6, -1 },
+};
+
+static const int8_t dca_channel_reorder_nolfe_xch[][9] = {
+ { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, 2, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, 2, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, 2, -1, -1, -1, -1, -1, -1 },
+ { 0, 1, 2, -1, -1, -1, -1, -1, -1 },
+ { 2, 0, 1, 3, -1, -1, -1, -1, -1 },
+ { 0, 1, 2, 3, -1, -1, -1, -1, -1 },
+ { 2, 0, 1, 3, 4, -1, -1, -1, -1 },
+ { 0, 1, 3, 4, 2, -1, -1, -1, -1 },
+ { 2, 0, 1, 4, 5, 3, -1, -1, -1 },
+ { 2, 3, 0, 1, 5, 6, 4, -1, -1 },
+ { 2, 0, 1, 3, 4, 5, 6, -1, -1 },
+ { 0, 5, 3, 4, 1, 2, 6, -1, -1 },
+ { 3, 2, 4, 0, 1, 6, 7, 5, -1 },
+ { 4, 5, 0, 1, 7, 2, 8, 3, 6 },
+ { 3, 2, 4, 0, 1, 5, 8, 7, 6 },
+};
+
+static const uint16_t dca_vlc_offs[] = {
+ 0, 512, 640, 768, 1282, 1794, 2436, 3080, 3770, 4454, 5364,
+ 5372, 5380, 5388, 5392, 5396, 5412, 5420, 5428, 5460, 5492, 5508,
+ 5572, 5604, 5668, 5796, 5860, 5892, 6412, 6668, 6796, 7308, 7564,
+ 7820, 8076, 8620, 9132, 9388, 9910, 10166, 10680, 11196, 11726, 12240,
+ 12752, 13298, 13810, 14326, 14840, 15500, 16022, 16540, 17158, 17678, 18264,
+ 18796, 19352, 19926, 20468, 21472, 22398, 23014, 23622,
+};
+
#endif /* AVCODEC_DCADATA_H */