Commit mode E (roughly 350kbps stereo)
[platform/upstream/libvorbis.git] / include / vorbis / mode_E.h
1 /********************************************************************
2  *                                                                  *
3  * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE.  *
4  * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
5  * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE.    *
6  * PLEASE READ THESE TERMS DISTRIBUTING.                            *
7  *                                                                  *
8  * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000             *
9  * by Monty <monty@xiph.org> and The XIPHOPHORUS Company            *
10  * http://www.xiph.org/                                             *
11  *                                                                  *
12  ********************************************************************
13
14  function: predefined encoding modes
15  last mod: $Id: mode_E.h,v 1.1 2000/08/15 09:45:47 xiphmont Exp $
16
17  ********************************************************************/
18
19 /* this is really a freeform VBR mode.  It roughly centers on 350 kbps stereo */
20
21 #ifndef _V_MODES_E_H_
22 #define _V_MODES_E_H_
23
24 #include <stdio.h>
25 #include "vorbis/codec.h"
26 #include "vorbis/backends.h"
27
28 #include "vorbis/book/lsp12_0.vqh"
29 #include "vorbis/book/lsp30_0.vqh"
30
31 #include "vorbis/book/resaux0_128a_350.vqh"
32 #include "vorbis/book/resaux0_1024a_350.vqh"
33
34 #include "vorbis/book/res0_128a_350_1.vqh"
35 #include "vorbis/book/res0_128a_350_2.vqh"
36 #include "vorbis/book/res0_128a_350_3.vqh"
37 #include "vorbis/book/res0_128a_350_4.vqh"
38 #include "vorbis/book/res0_128a_350_5.vqh"
39 #include "vorbis/book/res0_1024a_350_1.vqh"
40 #include "vorbis/book/res0_1024a_350_2.vqh"
41 #include "vorbis/book/res0_1024a_350_3.vqh"
42 #include "vorbis/book/res0_1024a_350_4.vqh"
43 #include "vorbis/book/res0_1024a_350_5.vqh"
44
45 static vorbis_info_psy _psy_set_E ={
46   1,/*athp*/
47   0,/*decayp*/
48   1,/*smoothp*/
49   0,.1,
50
51   -140.,
52   -180.,
53
54   /*     0  1  2   3   4   5   6   7   8   9  10  11  12  13  14  15   16   */
55   /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
56   /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
57
58   0,/* tonemaskp */
59   /*  0   10   20   30   40   50   60   70   80   90   100 */
60   {0},
61
62   1,/* peakattp */
63   {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*63*/
64    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*88*/
65    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*125*/
66    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*175*/
67    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*250*/
68    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*350*/
69    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*500*/
70    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*700*/
71    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*1000*/
72    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*1400*/
73    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*2000*/
74    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*2800*/
75    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*4000*/
76    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*5600*/
77    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*8000*/
78    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*11500*/
79    {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*16000*/
80   },
81
82   0,/*noisemaskp */
83   /*  0   10   20   30   40   50   60    70    80    90   100 */
84   {0},
85  
86   110.,
87
88   -0., -.004   /* attack/decay control */
89 };
90
91 /* with GNUisms, this could be short and readable. Oh well */
92 static vorbis_info_time0 _time_set0_E={0};
93 static vorbis_info_floor0 _floor_set0_E={12, 44100,  64, 12,150, 1, {0} };
94 static vorbis_info_floor0 _floor_set1_E={30, 44100, 256, 12,150, 1, {1} };
95 static vorbis_info_residue0 _residue_set0_E={0,128, 32,6,2,
96                                            {0,1,1,1,1,1},
97                                             {4,5,6,7,8},
98
99                                            {0,9999,9999,9999,9999},
100                                            {99,2.5,7,13.5,27.5},
101                                            {5,5,5,5,5},
102                                            {99,99,99,99,99}};
103
104 static vorbis_info_residue0 _residue_set1_E={0,1024, 32,6,3,
105                                            {0,1,1,1,1,1},
106                                             {9,10,11,12,13},
107                                            
108                                            {0,9999,9999,9999,9999},
109                                            {99,2.5,7,13.5,27.5},
110                                            {5,5,5,5,5},
111                                            {99,99,99,99,99}};
112
113 static vorbis_info_mapping0 _mapping_set0_E={1, {0,0}, {0}, {0}, {0}, {0}};
114 static vorbis_info_mapping0 _mapping_set1_E={1, {0,0}, {0}, {1}, {1}, {0}};
115 static vorbis_info_mode _mode_set0_E={0,0,0,0};
116 static vorbis_info_mode _mode_set1_E={1,0,0,1};
117
118 /* CD quality stereo, no channel coupling */
119 vorbis_info info_E={
120   /* channels, sample rate, upperkbps, nominalkbps, lowerkbps */
121   0, 2, 44100, 0,0,0,
122   /* smallblock, largeblock */
123   {256, 2048}, 
124   /* modes,maps,times,floors,residues,books,psys */
125   2,          2,    1,     2,       2,   14,   1,
126   /* modes */
127   {&_mode_set0_E,&_mode_set1_E},
128   /* maps */
129   {0,0},{&_mapping_set0_E,&_mapping_set1_E},
130   /* times */
131   {0,0},{&_time_set0_E},
132   /* floors */
133   {0,0},{&_floor_set0_E,&_floor_set1_E},
134   /* residue */
135   {0,0},{&_residue_set0_E,&_residue_set1_E},
136   /* books */
137   {&_vq_book_lsp12_0,      /* 0 */
138    &_vq_book_lsp30_0,      /* 1 */
139
140    &_huff_book_resaux0_128a_350,
141    &_huff_book_resaux0_1024a_350,
142
143    &_vq_book_res0_128a_350_1,
144    &_vq_book_res0_128a_350_2,
145    &_vq_book_res0_128a_350_3,
146    &_vq_book_res0_128a_350_4,
147    &_vq_book_res0_128a_350_5,
148    &_vq_book_res0_1024a_350_1,
149    &_vq_book_res0_1024a_350_2,
150    &_vq_book_res0_1024a_350_3,
151    &_vq_book_res0_1024a_350_4,
152    &_vq_book_res0_1024a_350_5,
153
154   },
155   /* psy */
156   {&_psy_set_E},
157   /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
158   256, 24, 6, -96.
159 };
160
161 #define PREDEF_INFO_MAX 0
162
163 #endif