quantize.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. /*
  10. * MP3 quantization
  11. *
  12. * Copyright (c) 1999 Mark Taylor
  13. *
  14. * This library is free software; you can redistribute it and/or
  15. * modify it under the terms of the GNU Library General Public
  16. * License as published by the Free Software Foundation; either
  17. * version 2 of the License, or (at your option) any later version.
  18. *
  19. * This library is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  22. * Library General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU Library General Public
  25. * License along with this library; if not, write to the
  26. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  27. * Boston, MA 02111-1307, USA.
  28. */
  29. #ifndef LAME_QUANTIZE_H
  30. #define LAME_QUANTIZE_H
  31. #include "util.h"
  32. /*#include "l3side.h"
  33. */
  34. void iteration_loop( lame_global_flags *gfp,
  35. FLOAT8 pe[2][2], FLOAT8 ms_ratio[2],
  36. FLOAT8 xr_org[2][2][576], III_psy_ratio ratio[2][2],
  37. int l3_enc[2][2][576],
  38. III_scalefac_t scalefac[2][2]);
  39. void VBR_iteration_loop( lame_global_flags *gfp,
  40. FLOAT8 pe[2][2], FLOAT8 ms_ratio[2],
  41. FLOAT8 xr_org[2][2][576], III_psy_ratio ratio[2][2],
  42. int l3_enc[2][2][576],
  43. III_scalefac_t scalefac[2][2]);
  44. void ABR_iteration_loop( lame_global_flags *gfp,
  45. FLOAT8 pe[2][2], FLOAT8 ms_ratio[2],
  46. FLOAT8 xr_org[2][2][576], III_psy_ratio ratio[2][2],
  47. int l3_enc[2][2][576],
  48. III_scalefac_t scalefac[2][2]);
  49. /*
  50. * vbrquantize.c
  51. */
  52. void VBR_quantize(
  53. lame_global_flags *gfp,
  54. FLOAT8 pe[2][2],
  55. FLOAT8 ms_ener_ratio[2],
  56. FLOAT8 xr[2][2][576],
  57. III_psy_ratio ratio[2][2],
  58. int l3_enc[2][2][576],
  59. III_scalefac_t scalefac[2][2]);
  60. /* used by VBR_iteration_loop() */
  61. int VBR_noise_shaping2(
  62. lame_global_flags *gfp,
  63. FLOAT8 xr [576],
  64. FLOAT8 xr34orig [576],
  65. III_psy_ratio * ratio,
  66. int l3_enc [576],
  67. int digital_silence,
  68. int minbits,
  69. int maxbits,
  70. III_scalefac_t * scalefac,
  71. III_psy_xmin * l3_xmin,
  72. int gr,
  73. int ch );
  74. #endif /* LAME_QUANTIZE_H */