Home | History | Annotate | Download | only in modes
      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 
     13  function: 8kHz psychoacoustic settings
     14  last mod: $Id: psych_8.h 16227 2009-07-08 06:58:46Z xiphmont $
     15 
     16  ********************************************************************/
     17 
     18 static const att3 _psy_tone_masteratt_8[3]={
     19   {{ 32,  25,  12},  0,   0},  /* 0 */
     20   {{ 30,  25,  12},  0,   0},  /* 0 */
     21   {{ 20,   0, -14},  0,   0}, /* 0 */
     22 };
     23 
     24 static const vp_adjblock _vp_tonemask_adj_8[3]={
     25   /* adjust for mode zero */
     26   /* 63     125     250     500     1     2     4     8    16 */
     27   {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */
     28   {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */
     29   {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 1 */
     30 };
     31 
     32 
     33 static const noise3 _psy_noisebias_8[3]={
     34   /*  63     125     250     500      1k       2k      4k      8k     16k*/
     35   {{{-10,-10,-10,-10, -5, -5, -5,  0,  4,  8,  8,  8, 10, 10, 99, 99, 99},
     36     {-10,-10,-10,-10, -5, -5, -5,  0,  0,  4,  4,  4,  4,  4, 99, 99, 99},
     37     {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},
     38 
     39   {{{-10,-10,-10,-10, -5, -5, -5,  0,  4,  8,  8,  8, 10, 10, 99, 99, 99},
     40     {-10,-10,-10,-10,-10,-10, -5, -5, -5,  0,  0,  0,  0,  0, 99, 99, 99},
     41     {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},
     42 
     43   {{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  2,  4,  4,  5,  5, 99, 99, 99},
     44     {-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10, 99, 99, 99},
     45     {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}},
     46 };
     47 
     48 /* stereo mode by base quality level */
     49 static const adj_stereo _psy_stereo_modes_8[3]={
     50   /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  */
     51   {{  4,  4,  4,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3},
     52    {  6,  5,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4},
     53    {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1},
     54    { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
     55   {{  4,  4,  4,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3},
     56    {  6,  5,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4},
     57    {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1},
     58    { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
     59   {{  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3},
     60    {  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4},
     61    {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1},
     62    { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
     63 };
     64 
     65 static const noiseguard _psy_noiseguards_8[2]={
     66   {10,10,-1},
     67   {10,10,-1},
     68 };
     69 
     70 static const compandblock _psy_compand_8[2]={
     71   {{
     72      0, 1, 2, 3, 4, 5, 6,  7,     /* 7dB */
     73      8, 8, 9, 9,10,10,11, 11,     /* 15dB */
     74     12,12,13,13,14,14,15, 15,     /* 23dB */
     75     16,16,17,17,17,18,18, 19,     /* 31dB */
     76     19,19,20,21,22,23,24, 25,     /* 39dB */
     77   }},
     78   {{
     79      0, 1, 2, 3, 4, 5, 6,  6,     /* 7dB */
     80      7, 7, 6, 6, 5, 5, 4,  4,     /* 15dB */
     81      3, 3, 3, 4, 5, 6, 7,  8,     /* 23dB */
     82      9,10,11,12,13,14,15, 16,     /* 31dB */
     83     17,18,19,20,21,22,23, 24,     /* 39dB */
     84   }},
     85 };
     86 
     87 static const double _psy_lowpass_8[3]={3.,4.,4.};
     88 static const int _noise_start_8[2]={
     89   64,64,
     90 };
     91 static const int _noise_part_8[2]={
     92   8,8,
     93 };
     94 
     95 static const int _psy_ath_floater_8[3]={
     96   -100,-100,-105,
     97 };
     98 
     99 static const int _psy_ath_abs_8[3]={
    100   -130,-130,-140,
    101 };
    102