psych_8.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /********************************************************************
  2. * *
  3. * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
  4. * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
  5. * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  6. * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
  7. * *
  8. * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
  9. * by the Xiph.Org Foundation http://www.xiph.org/ *
  10. * *
  11. ********************************************************************
  12. function: 8kHz psychoacoustic settings
  13. last mod: $Id: psych_8.h 16227 2009-07-08 06:58:46Z xiphmont $
  14. ********************************************************************/
  15. static const att3 _psy_tone_masteratt_8[3]={
  16. {{ 32, 25, 12}, 0, 0}, /* 0 */
  17. {{ 30, 25, 12}, 0, 0}, /* 0 */
  18. {{ 20, 0, -14}, 0, 0}, /* 0 */
  19. };
  20. static const vp_adjblock _vp_tonemask_adj_8[3]={
  21. /* adjust for mode zero */
  22. /* 63 125 250 500 1 2 4 8 16 */
  23. {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */
  24. {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */
  25. {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 1 */
  26. };
  27. static const noise3 _psy_noisebias_8[3]={
  28. /* 63 125 250 500 1k 2k 4k 8k 16k*/
  29. {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 8, 8, 8, 10, 10, 99, 99, 99},
  30. {-10,-10,-10,-10, -5, -5, -5, 0, 0, 4, 4, 4, 4, 4, 99, 99, 99},
  31. {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},
  32. {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 8, 8, 8, 10, 10, 99, 99, 99},
  33. {-10,-10,-10,-10,-10,-10, -5, -5, -5, 0, 0, 0, 0, 0, 99, 99, 99},
  34. {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},
  35. {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 99, 99, 99},
  36. {-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10, 99, 99, 99},
  37. {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}},
  38. };
  39. /* stereo mode by base quality level */
  40. static const adj_stereo _psy_stereo_modes_8[3]={
  41. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
  42. {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
  43. { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
  44. { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  45. { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
  46. {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
  47. { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
  48. { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  49. { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
  50. {{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
  51. { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
  52. { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  53. { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
  54. };
  55. static const noiseguard _psy_noiseguards_8[2]={
  56. {10,10,-1},
  57. {10,10,-1},
  58. };
  59. static const compandblock _psy_compand_8[2]={
  60. {{
  61. 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */
  62. 8, 8, 9, 9,10,10,11, 11, /* 15dB */
  63. 12,12,13,13,14,14,15, 15, /* 23dB */
  64. 16,16,17,17,17,18,18, 19, /* 31dB */
  65. 19,19,20,21,22,23,24, 25, /* 39dB */
  66. }},
  67. {{
  68. 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */
  69. 7, 7, 6, 6, 5, 5, 4, 4, /* 15dB */
  70. 3, 3, 3, 4, 5, 6, 7, 8, /* 23dB */
  71. 9,10,11,12,13,14,15, 16, /* 31dB */
  72. 17,18,19,20,21,22,23, 24, /* 39dB */
  73. }},
  74. };
  75. static const double _psy_lowpass_8[3]={3.,4.,4.};
  76. static const int _noise_start_8[2]={
  77. 64,64,
  78. };
  79. static const int _noise_part_8[2]={
  80. 8,8,
  81. };
  82. static const int _psy_ath_floater_8[3]={
  83. -100,-100,-105,
  84. };
  85. static const int _psy_ath_abs_8[3]={
  86. -130,-130,-140,
  87. };