tables.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * MPEG layer 3 tables include file
  3. *
  4. * Copyright (c) 1999 Albert L Faber
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Library General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Library General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Library General Public
  17. * License along with this library; if not, write to the
  18. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19. * Boston, MA 02111-1307, USA.
  20. */
  21. #ifndef LAME_TABLES_H
  22. #define LAME_TABLES_H
  23. #if 0
  24. typedef struct {
  25. unsigned char no;
  26. unsigned char width;
  27. unsigned char minval_2;
  28. float quiet_thr;
  29. float norm;
  30. float bark;
  31. } type1_t;
  32. typedef struct {
  33. unsigned char no;
  34. unsigned char width;
  35. float quiet_thr;
  36. float norm;
  37. float SNR;
  38. float bark;
  39. } type2_t;
  40. typedef struct {
  41. unsigned int no:5;
  42. unsigned int cbw:3;
  43. unsigned int bu:6;
  44. unsigned int bo:6;
  45. unsigned int w1_576:10;
  46. unsigned int w2_576:10;
  47. } type34_t;
  48. typedef struct {
  49. size_t len1;
  50. const type1_t *const tab1;
  51. size_t len2;
  52. const type2_t *const tab2;
  53. size_t len3;
  54. const type34_t *const tab3;
  55. size_t len4;
  56. const type34_t *const tab4;
  57. } type5_t;
  58. extern const type5_t table5[6];
  59. #endif
  60. #define HTN 34
  61. struct huffcodetab {
  62. const unsigned int xlen; /* max. x-index+ */
  63. const unsigned int linmax; /* max number to be stored in linbits */
  64. const uint16_t *table; /* pointer to array[xlen][ylen] */
  65. const uint8_t *hlen; /* pointer to array[xlen][ylen] */
  66. };
  67. extern const struct huffcodetab ht[HTN];
  68. /* global memory block */
  69. /* array of all huffcodtable headers */
  70. /* 0..31 Huffman code table 0..31 */
  71. /* 32,33 count1-tables */
  72. extern const uint8_t t32l[];
  73. extern const uint8_t t33l[];
  74. extern const uint32_t largetbl[16 * 16];
  75. extern const uint32_t table23[3 * 3];
  76. extern const uint32_t table56[4 * 4];
  77. extern const int scfsi_band[5];
  78. extern const int bitrate_table [3][16];
  79. extern const int samplerate_table [3][ 4];
  80. #endif /* LAME_TABLES_H */