l3side.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * Layer 3 side include file
  3. *
  4. * Copyright (c) 1999 Mark Taylor
  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_L3SIDE_H
  22. #define LAME_L3SIDE_H
  23. /* max scalefactor band, max(SBMAX_l, SBMAX_s*3, (SBMAX_s-3)*3+8) */
  24. #define SFBMAX (SBMAX_s*3)
  25. /* Layer III side information. */
  26. typedef struct {
  27. int l[1 + SBMAX_l];
  28. int s[1 + SBMAX_s];
  29. int psfb21[1 + PSFB21];
  30. int psfb12[1 + PSFB12];
  31. } scalefac_struct;
  32. typedef struct {
  33. FLOAT l[SBMAX_l];
  34. FLOAT s[SBMAX_s][3];
  35. } III_psy_xmin;
  36. typedef struct {
  37. III_psy_xmin thm;
  38. III_psy_xmin en;
  39. } III_psy_ratio;
  40. typedef struct {
  41. FLOAT xr[576];
  42. int l3_enc[576];
  43. int scalefac[SFBMAX];
  44. FLOAT xrpow_max;
  45. int part2_3_length;
  46. int big_values;
  47. int count1;
  48. int global_gain;
  49. int scalefac_compress;
  50. int block_type;
  51. int mixed_block_flag;
  52. int table_select[3];
  53. int subblock_gain[3 + 1];
  54. int region0_count;
  55. int region1_count;
  56. int preflag;
  57. int scalefac_scale;
  58. int count1table_select;
  59. int part2_length;
  60. int sfb_lmax;
  61. int sfb_smin;
  62. int psy_lmax;
  63. int sfbmax;
  64. int psymax;
  65. int sfbdivide;
  66. int width[SFBMAX];
  67. int window[SFBMAX];
  68. int count1bits;
  69. /* added for LSF */
  70. const int *sfb_partition_table;
  71. int slen[4];
  72. int max_nonzero_coeff;
  73. char energy_above_cutoff[SFBMAX];
  74. } gr_info;
  75. typedef struct {
  76. gr_info tt[2][2];
  77. int main_data_begin;
  78. int private_bits;
  79. int resvDrain_pre;
  80. int resvDrain_post;
  81. int scfsi[2][4];
  82. } III_side_info_t;
  83. #endif