summaryrefslogtreecommitdiff
path: root/lib/modes/mode_E.h
blob: 52d32f673e1992056288ecf39d30a2c9e10aadd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/********************************************************************
 *                                                                  *
 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
 * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
 * THE GNU LESSER/LIBRARY PUBLIC LICENSE, WHICH IS INCLUDED WITH    *
 * THIS SOURCE. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.        *
 *                                                                  *
 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2000             *
 * by Monty <monty@xiph.org> and the XIPHOPHORUS Company            *
 * http://www.xiph.org/                                             *
 *                                                                  *
 ********************************************************************

 function: predefined encoding modes
 last mod: $Id: mode_E.h,v 1.4.2.2 2001/01/09 19:13:24 xiphmont Exp $

 ********************************************************************/

/* this is really a freeform VBR mode.  It roughly centers on 350 kbps stereo */

#ifndef _V_MODES_E_H_
#define _V_MODES_E_H_

#include <stdio.h>
#include "vorbis/codec.h"
#include "backends.h"

#include "books/lsp12_0.vqh"
#include "books/lsp30_0.vqh"

#include "books/res0_350_128aux.vqh"
#include "books/res0_350_1024aux.vqh"

#include "books/res0_350_128_1.vqh"
#include "books/res0_350_128_2.vqh"
#include "books/res0_350_128_3.vqh"
#include "books/res0_350_128_4.vqh"
#include "books/res0_350_128_5.vqh"

#include "books/res0_350_1024_1.vqh"
#include "books/res0_350_1024_2.vqh"
#include "books/res0_350_1024_3.vqh"
#include "books/res0_350_1024_4.vqh"
#include "books/res0_350_1024_5.vqh"

static vorbis_info_psy _psy_set_E ={
  1,/*athp*/
  0,/*decayp*/

  -140.f,
  -180.f,

  16,

  /*     0  1  2   3   4   5   6   7   8   9  10  11  12  13  14  15   16   */
  /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
  /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */

  0,/* tonemaskp */
  /*  0   10   20   30   40   50   60   70   80   90   100 */
  {{0}},

  1,/* peakattp */
  {{-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*63*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*88*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*125*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*175*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*250*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*350*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*500*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*700*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*1000*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*1400*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*2000*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*2800*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*4000*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*5600*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*8000*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*11500*/
   {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*16000*/
  },

  0,/*noisemaskp */
  /*  0   10   20   30   40   50   60    70    80    90   100 */
  0.,
  .5,
  .5,
  25,
  25,
  {0},
 
  110.f,
  -42.,

  -0.f, -.004f   /* attack/decay control */
};

/* with GNUisms, this could be short and readable. Oh well */
static vorbis_info_time0 _time_set0_E={0};
static vorbis_info_floor0 _floor_set0_E={12, 44100,  64, 12,150, 1, {0} };
static vorbis_info_floor0 _floor_set1_E={30, 44100, 256, 12,150, 1, {1} };
static vorbis_info_residue0 _residue_set0_E={0,128, 32,6,2,
					   {0,1,1,1,1,1},
					    {4,5,6,7,8},

					   {0,9999,9999,9999,9999},
					   {99.f,2.5f,6.5f,15.5f,29.5f},
					   {5,5,5,5,5},
					   {99,99,99,99,99}};

static vorbis_info_residue0 _residue_set1_E={0,1024, 32,6,3,
					   {0,1,1,1,1,1},
					    {9,10,11,12,13},
					   
					   {0,9999,9999,9999,9999},
					   {99.f,2.5f,6.5f,15.5f,29.5f},
					   {5,5,5,5,5},
					   {99,99,99,99,99}};

static vorbis_info_mapping0 _mapping_set0_E={1, {0,0}, {0}, {0}, {0}, {0}};
static vorbis_info_mapping0 _mapping_set1_E={1, {0,0}, {0}, {1}, {1}, {0}};
static vorbis_info_mode _mode_set0_E={0,0,0,0};
static vorbis_info_mode _mode_set1_E={1,0,0,1};

/* CD quality stereo, no channel coupling */
codec_setup_info info_E={

  /* smallblock, largeblock */
  {256, 2048}, 
  /* modes,maps,times,floors,residues,books,psys */
  2,          2,    1,     2,       2,   14,   1,
  /* modes */
  {&_mode_set0_E,&_mode_set1_E},
  /* maps */
  {0,0},{&_mapping_set0_E,&_mapping_set1_E},
  /* times */
  {0,0},{&_time_set0_E},
  /* floors */
  {0,0},{&_floor_set0_E,&_floor_set1_E},
  /* residue */
  {0,0},{&_residue_set0_E,&_residue_set1_E},
  /* books */
  {&_vq_book_lsp12_0,      /* 0 */
   &_vq_book_lsp30_0,      /* 1 */

   &_huff_book_res0_350_128aux,
   &_huff_book_res0_350_1024aux,

   &_vq_book_res0_350_128_1,
   &_vq_book_res0_350_128_2,
   &_vq_book_res0_350_128_3,
   &_vq_book_res0_350_128_4,
   &_vq_book_res0_350_128_5,

   &_vq_book_res0_350_1024_1,
   &_vq_book_res0_350_1024_2,
   &_vq_book_res0_350_1024_3,
   &_vq_book_res0_350_1024_4,
   &_vq_book_res0_350_1024_5,

  },
  /* psy */
  {&_psy_set_E},
  /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
  256, 24.f, 6.f, -96.f
};

#define PREDEF_INFO_MAX 0

#endif