Newer
Older
monitord / lame-3.97 / libmp3lame / .svn / text-base / psymodel.h.svn-base
  1. /*
  2. * psymodel.h
  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.  
  22. #ifndef LAME_PSYMODEL_H
  23. #define LAME_PSYMODEL_H
  24.  
  25. #include "l3side.h"
  26.  
  27. int L3psycho_anal( lame_global_flags *gfc,
  28. const sample_t *buffer[2], int gr,
  29. FLOAT *ms_ratio,
  30. FLOAT *ms_ratio_next,
  31. III_psy_ratio ratio[2][2],
  32. III_psy_ratio MS_ratio[2][2],
  33. FLOAT pe[2], FLOAT pe_MS[2], FLOAT ener[2],
  34. int blocktype_d[2]);
  35.  
  36. int L3psycho_anal_ns( lame_global_flags *gfc,
  37. const sample_t *buffer[2], int gr,
  38. FLOAT *ms_ratio,
  39. FLOAT *ms_ratio_next,
  40. III_psy_ratio ratio[2][2],
  41. III_psy_ratio MS_ratio[2][2],
  42. FLOAT pe[2], FLOAT pe_MS[2], FLOAT ener[2],
  43. int blocktype_d[2]);
  44.  
  45.  
  46. int psymodel_init(lame_global_flags *gfp);
  47.  
  48.  
  49. #define rpelev 2
  50. #define rpelev2 16
  51. #define rpelev_s 2
  52. #define rpelev2_s 16
  53.  
  54. /* size of each partition band, in barks: */
  55. #define DELBARK .34
  56. #define CW_LOWER_INDEX 6
  57.  
  58.  
  59. #if 1
  60. /* AAC values, results in more masking over MP3 values */
  61. # define TMN 18
  62. # define NMT 6
  63. #else
  64. /* MP3 values */
  65. # define TMN 29
  66. # define NMT 6
  67. #endif
  68.  
  69. /* ISO values */
  70. #define CONV1 (-.299)
  71. #define CONV2 (-.43)
  72.  
  73. /* tuned for output level (sensitive to energy scale) */
  74. #define VO_SCALE (1./( 14752*14752 )/(BLKSIZE/2))
  75.  
  76. #define temporalmask_sustain_sec 0.01
  77.  
  78. #define NS_PREECHO_ATT0 0.8
  79. #define NS_PREECHO_ATT1 0.6
  80. #define NS_PREECHO_ATT2 0.3
  81.  
  82. #define NS_MSFIX 3.5
  83. #define NSATTACKTHRE 4.4
  84. #define NSATTACKTHRE_S 25
  85.  
  86. #endif /* LAME_PSYMODEL_H */
  87.