Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.         l3_integer_tables.h: Layer3 Constant tables for integer decoders
  3.  
  4.         copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1
  5.         see COPYING and AUTHORS files in distribution or http://mpg123.org
  6.         initially written by Taihei Monma
  7. */
  8.  
  9. #ifndef MPG123_L3_INTEGER_TABLES_H
  10. #define MPG123_L3_INTEGER_TABLES_H
  11.  
  12. #ifdef PRECALC_TABLES#ifdef NEW_DCT9
  13. static const real cos9[3] =
  14. {
  15.         15765426,-2913333,-12852093
  16. };
  17.  
  18. static const real cos18[3] =
  19. {
  20.         16522332,-5738146,-10784187
  21. };
  22. #endif
  23.  
  24. static const real tan1_1[16] =
  25. {
  26.         0,6925,11994,16384,20774,25843,32768,44762,77530,2147483647,-44762,-11994,0,6925,11994,16384
  27. };
  28.  
  29. static const real tan2_1[16] =
  30. {
  31.         32768,25843,20774,16384,11994,6925,0,-11994,-44762,2147483647,77530,44762,32768,25843,20774,16384
  32. };
  33.  
  34. static const real tan1_2[16] =
  35. {
  36.         0,9793,16962,23170,29379,36548,46341,63303,109644,2147483647,-63303,-16962,0,9793,16962,23170
  37. };
  38.  
  39. static real tan2_2[16] =
  40. {
  41.         46341,36548,29379,23170,16962,9793,0,-16962,-63303,2147483647,109644,63303,46341,36548,29379,23170
  42. };
  43.  
  44. static const real pow1_1[2][16] =
  45. {
  46.         {32768,27554,32768,23170,32768,19484,32768,16384,32768,13777,32768,11585,32768,9742,32768,8192},
  47.         {32768,23170,32768,16384,32768,11585,32768,8192,32768,5793,32768,4096,32768,2896,32768,2048}
  48. };
  49.  
  50. static const real pow2_1[2][16] =
  51. {
  52.         {32768,32768,27554,32768,23170,32768,19484,32768,16384,32768,13777,32768,11585,32768,9742,32768},
  53.         {32768,32768,23170,32768,16384,32768,11585,32768,8192,32768,5793,32768,4096,32768,2896,32768}
  54. };
  55.  
  56. static const real pow1_2[2][16] =
  57. {
  58.         {46341,38968,46341,32768,46341,27554,46341,23170,46341,19484,46341,16384,46341,13777,46341,11585},
  59.         {46341,32768,46341,23170,46341,16384,46341,11585,46341,8192,46341,5793,46341,4096,46341,2896}
  60. };
  61.  
  62. static const real pow2_2[2][16] =
  63. {
  64.         {46341,46341,38968,46341,32768,46341,27554,46341,23170,46341,19484,46341,16384,46341,13777,46341},
  65.         {46341,46341,32768,46341,23170,46341,16384,46341,11585,46341,8192,46341,5793,46341,4096,46341}
  66. };
  67.  
  68. static const real gainpow2[256+118+4] =
  69. {
  70.         1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,
  71.         1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,
  72.         1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,
  73.         1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,
  74.         1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,
  75.         1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,
  76.         1518500250,1276901417,1073741824,902905651,759250125,638450708,536870912,451452825,379625062,319225354,
  77.         268435456,225726413,189812531,159612677,134217728,112863206,94906266,79806339,67108864,56431603,
  78.         47453133,39903169,33554432,28215802,23726566,19951585,16777216,14107901,11863283,9975792,
  79.         8388608,7053950,5931642,4987896,4194304,3526975,2965821,2493948,2097152,1763488,
  80.         1482910,1246974,1048576,881744,741455,623487,524288,440872,370728,311744,
  81.         262144,220436,185364,155872,131072,110218,92682,77936,65536,55109,
  82.         46341,38968,32768,27554,23170,19484,16384,13777,11585,9742,
  83.         8192,6889,5793,4871,4096,3444,2896,2435,2048,1722,
  84.         1448,1218,1024,861,724,609,512,431,362,304,
  85.         256,215,181,152,128,108,91,76,64,54,
  86.         45,38,32,27,23,19,16,13,11,10,
  87.         8,7,6,5,4,3,3,2,2,2,
  88.         1,1,1,1,1,1,1,
  89. };
  90.  
  91. #else
  92. static real ispow[8207];
  93. static real aa_ca[8],aa_cs[8];
  94. static real win[4][36];
  95. static real win1[4][36];
  96. real COS9[9]; /* dct36_3dnow wants to use that */
  97. static real COS6_1,COS6_2;
  98. real tfcos36[9]; /* dct36_3dnow wants to use that */
  99. static real tfcos12[3];
  100. #ifdef NEW_DCT9
  101. static real cos9[3],cos18[3];
  102. static real tan1_1[16],tan2_1[16],tan1_2[16],tan2_2[16];
  103. static real pow1_1[2][16],pow2_1[2][16],pow1_2[2][16],pow2_2[2][16];
  104. #endif
  105. #endif
  106.  
  107. static real win1[4][36];
  108.  
  109. static const char gainpow2_scale[256+118+4+1] =
  110. {
  111.         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,
  112.         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,
  113.         34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
  114.         34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
  115.         34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
  116.         34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
  117.         34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
  118.         34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
  119.         34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
  120.         34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
  121.         34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
  122.         34,34,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
  123. };
  124.  
  125. #endif
  126.