lsp_lookup.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /********************************************************************
  2. * *
  3. * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
  4. * *
  5. * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
  6. * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  7. * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
  8. * *
  9. * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
  10. * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
  11. * *
  12. ********************************************************************
  13. function: lookup data
  14. ********************************************************************/
  15. #ifndef _V_LOOKUP_DATA_H_
  16. #define _V_LOOKUP_DATA_H_
  17. #include "os_types.h"
  18. #define INVSQ_LOOKUP_I_SHIFT 10
  19. #define INVSQ_LOOKUP_I_MASK 1023
  20. static const long INVSQ_LOOKUP_I[64+1]={
  21. 92682, 91966, 91267, 90583,
  22. 89915, 89261, 88621, 87995,
  23. 87381, 86781, 86192, 85616,
  24. 85051, 84497, 83953, 83420,
  25. 82897, 82384, 81880, 81385,
  26. 80899, 80422, 79953, 79492,
  27. 79039, 78594, 78156, 77726,
  28. 77302, 76885, 76475, 76072,
  29. 75674, 75283, 74898, 74519,
  30. 74146, 73778, 73415, 73058,
  31. 72706, 72359, 72016, 71679,
  32. 71347, 71019, 70695, 70376,
  33. 70061, 69750, 69444, 69141,
  34. 68842, 68548, 68256, 67969,
  35. 67685, 67405, 67128, 66855,
  36. 66585, 66318, 66054, 65794,
  37. 65536,
  38. };
  39. static const long INVSQ_LOOKUP_IDel[64]={
  40. 716, 699, 684, 668,
  41. 654, 640, 626, 614,
  42. 600, 589, 576, 565,
  43. 554, 544, 533, 523,
  44. 513, 504, 495, 486,
  45. 477, 469, 461, 453,
  46. 445, 438, 430, 424,
  47. 417, 410, 403, 398,
  48. 391, 385, 379, 373,
  49. 368, 363, 357, 352,
  50. 347, 343, 337, 332,
  51. 328, 324, 319, 315,
  52. 311, 306, 303, 299,
  53. 294, 292, 287, 284,
  54. 280, 277, 273, 270,
  55. 267, 264, 260, 258,
  56. };
  57. #define COS_LOOKUP_I_SHIFT 9
  58. #define COS_LOOKUP_I_MASK 511
  59. #define COS_LOOKUP_I_SZ 128
  60. static const ogg_int32_t COS_LOOKUP_I[COS_LOOKUP_I_SZ+1]={
  61. 16384, 16379, 16364, 16340,
  62. 16305, 16261, 16207, 16143,
  63. 16069, 15986, 15893, 15791,
  64. 15679, 15557, 15426, 15286,
  65. 15137, 14978, 14811, 14635,
  66. 14449, 14256, 14053, 13842,
  67. 13623, 13395, 13160, 12916,
  68. 12665, 12406, 12140, 11866,
  69. 11585, 11297, 11003, 10702,
  70. 10394, 10080, 9760, 9434,
  71. 9102, 8765, 8423, 8076,
  72. 7723, 7366, 7005, 6639,
  73. 6270, 5897, 5520, 5139,
  74. 4756, 4370, 3981, 3590,
  75. 3196, 2801, 2404, 2006,
  76. 1606, 1205, 804, 402,
  77. 0, -401, -803, -1204,
  78. -1605, -2005, -2403, -2800,
  79. -3195, -3589, -3980, -4369,
  80. -4755, -5138, -5519, -5896,
  81. -6269, -6638, -7004, -7365,
  82. -7722, -8075, -8422, -8764,
  83. -9101, -9433, -9759, -10079,
  84. -10393, -10701, -11002, -11296,
  85. -11584, -11865, -12139, -12405,
  86. -12664, -12915, -13159, -13394,
  87. -13622, -13841, -14052, -14255,
  88. -14448, -14634, -14810, -14977,
  89. -15136, -15285, -15425, -15556,
  90. -15678, -15790, -15892, -15985,
  91. -16068, -16142, -16206, -16260,
  92. -16304, -16339, -16363, -16378,
  93. -16383,
  94. };
  95. #endif