/*
l3_integer_tables.h: Layer3 Constant tables for integer decoders
copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Taihei Monma
*/
#ifndef MPG123_L3_INTEGER_TABLES_H
#define MPG123_L3_INTEGER_TABLES_H
#ifdef PRECALC_TABLES#ifdef NEW_DCT9
static const real cos9[3] =
{
15765426,-2913333,-12852093
};
static const real cos18[3] =
{
16522332,-5738146,-10784187
};
#endif
static const real tan1_1[16] =
{
0,6925,11994,16384,20774,25843,32768,44762,77530,2147483647,-44762,-11994,0,6925,11994,16384
};
static const real tan2_1[16] =
{
32768,25843,20774,16384,11994,6925,0,-11994,-44762,2147483647,77530,44762,32768,25843,20774,16384
};
static const real tan1_2[16] =
{
0,9793,16962,23170,29379,36548,46341,63303,109644,2147483647,-63303,-16962,0,9793,16962,23170
};
static real tan2_2[16] =
{
46341,36548,29379,23170,16962,9793,0,-16962,-63303,2147483647,109644,63303,46341,36548,29379,23170
};
static const real pow1_1[2][16] =
{
{32768,27554,32768,23170,32768,19484,32768,16384,32768,13777,32768,11585,32768,9742,32768,8192},
{32768,23170,32768,16384,32768,11585,32768,8192,32768,5793,32768,4096,32768,2896,32768,2048}
};
static const real pow2_1[2][16] =
{
{32768,32768,27554,32768,23170,32768,19484,32768,16384,32768,13777,32768,11585,32768,9742,32768},
{32768,32768,23170,32768,16384,32768,11585,32768,8192,32768,5793,32768,4096,32768,2896,32768}
};
static const real pow1_2[2][16] =
{
{46341,38968,46341,32768,46341,27554,46341,23170,46341,19484,46341,16384,46341,13777,46341,11585},
{46341,32768,46341,23170,46341,16384,46341,11585,46341,8192,46341,5793,46341,4096,46341,2896}
};
static const real pow2_2[2][16] =
{
{46341,46341,38968,46341,32768,46341,27554,46341,23170,46341,19484,46341,16384,46341,13777,46341},
{46341,46341,32768,46341,23170,46341,16384,46341,11585,46341,8192,46341,5793,46341,4096,46341}
};
static const real gainpow2[256+118+4] =
{
1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,
1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,
1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,
1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,
1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,
1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,
1518500250,1276901417,1073741824,902905651,759250125,638450708,536870912,451452825,379625062,319225354,
268435456,225726413,189812531,159612677,134217728,112863206,94906266,79806339,67108864,56431603,
47453133,39903169,33554432,28215802,23726566,19951585,16777216,14107901,11863283,9975792,
8388608,7053950,5931642,4987896,4194304,3526975,2965821,2493948,2097152,1763488,
1482910,1246974,1048576,881744,741455,623487,524288,440872,370728,311744,
262144,220436,185364,155872,131072,110218,92682,77936,65536,55109,
46341,38968,32768,27554,23170,19484,16384,13777,11585,9742,
8192,6889,5793,4871,4096,3444,2896,2435,2048,1722,
1448,1218,1024,861,724,609,512,431,362,304,
256,215,181,152,128,108,91,76,64,54,
45,38,32,27,23,19,16,13,11,10,
8,7,6,5,4,3,3,2,2,2,
1,1,1,1,1,1,1,
};
#else
static real ispow[8207];
static real aa_ca[8],aa_cs[8];
static real win[4][36];
static real win1[4][36];
real COS9[9]; /* dct36_3dnow wants to use that */
static real COS6_1,COS6_2;
real tfcos36[9]; /* dct36_3dnow wants to use that */
static real tfcos12[3];
#ifdef NEW_DCT9
static real cos9[3],cos18[3];
static real tan1_1[16],tan2_1[16],tan1_2[16],tan2_2[16];
static real pow1_1[2][16],pow2_1[2][16],pow1_2[2][16],pow2_2[2][16];
#endif
#endif
static real win1[4][36];
static const char gainpow2_scale[256+118+4+1] =
{
19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,
27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,34,
34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,0
};
#endif