lame-analysis.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * GTK plotting routines source 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_GTKANAL_H
  22. #define LAME_GTKANAL_H
  23. #define READ_AHEAD 40 /* number of frames to read ahead */
  24. #define MAXMPGLAG READ_AHEAD /* if the mpg123 lag becomes bigger than this
  25. we have to stop */
  26. #define NUMBACK 6 /* number of frames we can back up */
  27. #define NUMPINFO (NUMBACK+READ_AHEAD+1)
  28. struct plotting_data {
  29. int frameNum; /* current frame number */
  30. int frameNum123;
  31. int num_samples; /* number of pcm samples read for this frame */
  32. double frametime; /* starting time of frame, in seconds */
  33. double pcmdata[2][1600];
  34. double pcmdata2[2][1152 + 1152 - DECDELAY];
  35. double xr[2][2][576];
  36. double mpg123xr[2][2][576];
  37. double ms_ratio[2];
  38. double ms_ener_ratio[2];
  39. /* L,R, M and S values */
  40. double energy_save[4][BLKSIZE]; /* psymodel is one ahead */
  41. double energy[2][4][BLKSIZE];
  42. double pe[2][4];
  43. double thr[2][4][SBMAX_l];
  44. double en[2][4][SBMAX_l];
  45. double thr_s[2][4][3 * SBMAX_s];
  46. double en_s[2][4][3 * SBMAX_s];
  47. double ers_save[4]; /* psymodel is one ahead */
  48. double ers[2][4];
  49. double sfb[2][2][SBMAX_l];
  50. double sfb_s[2][2][3 * SBMAX_s];
  51. double LAMEsfb[2][2][SBMAX_l];
  52. double LAMEsfb_s[2][2][3 * SBMAX_s];
  53. int LAMEqss[2][2];
  54. int qss[2][2];
  55. int big_values[2][2];
  56. int sub_gain[2][2][3];
  57. double xfsf[2][2][SBMAX_l];
  58. double xfsf_s[2][2][3 * SBMAX_s];
  59. int over[2][2];
  60. double tot_noise[2][2];
  61. double max_noise[2][2];
  62. double over_noise[2][2];
  63. int over_SSD[2][2];
  64. int blocktype[2][2];
  65. int scalefac_scale[2][2];
  66. int preflag[2][2];
  67. int mpg123blocktype[2][2];
  68. int mixed[2][2];
  69. int mainbits[2][2];
  70. int sfbits[2][2];
  71. int LAMEmainbits[2][2];
  72. int LAMEsfbits[2][2];
  73. int framesize, stereo, js, ms_stereo, i_stereo, emph, bitrate, sampfreq, maindata;
  74. int crc, padding;
  75. int scfsi[2], mean_bits, resvsize;
  76. int totbits;
  77. };
  78. #ifndef plotting_data_defined
  79. #define plotting_data_defined
  80. typedef struct plotting_data plotting_data;
  81. #endif
  82. #if 0
  83. extern plotting_data *pinfo;
  84. #endif
  85. #endif