Collect training data from the lib when compiled with -DTRAIN
[platform/upstream/libvorbis.git] / include / vorbis / modes.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: modes.h,v 1.6 2000/02/12 08:33:03 xiphmont Exp $
16
17  ********************************************************************/
18
19 #ifndef _V_MODES_H_
20 #define _V_MODES_H_
21
22 #include <stdio.h>
23 #include "vorbis/codec.h"
24 #include "vorbis/backends.h"
25 #include "vorbis/book/lsp20_0.vqh"
26 #include "vorbis/book/lsp32_0.vqh"
27
28 /*
29    0      1      2      3      4     5      6     7     8     9 
30    0,   100,  200,   300,   400,   510,   630,  770,  920, 1080,
31
32    10    11    12     13     14     15     16    17    18    19
33  1270, 1480, 1720,  2000,  2320,  2700,  3150, 3700, 4400, 5300,
34
35    20    21    22     23     24     25     26 Bark
36  6400, 7700, 9500, 12000, 15500, 20500, 27000 Hz    */
37
38 /* a good set of rolloffs for nigh-transparent masking */
39 static vorbis_info_psy _psy_set0={
40   { -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
41     -12, -14, -16, -16, -16, -16, -18, -18, -16, -16,
42     -12, -10, -8, -6, -6, -6, -4}, 24,10
43 };
44
45 /* with GNUisms, this could be short and readable. Oh well */
46 static vorbis_info_time0 _time_set0={0};
47 static vorbis_info_floor0 _floor_set0={20, 44100,  64, 12,140, 1, {0} };
48 static vorbis_info_floor0 _floor_set1={32, 44100, 256, 12,140, 1, {1} };
49 static vorbis_info_residue0 _residue_set0={0, 128, 32,4,4,3,{0,1,1,1},{0,0,0}};
50 static vorbis_info_residue0 _residue_set1={0,1024, 32,4,4,3,{0,1,1,1},{0,0,0}};
51 static vorbis_info_mapping0 _mapping_set0={1, {0,0}, {0}, {0}, {0}, {0}};
52 static vorbis_info_mapping0 _mapping_set1={1, {0,0}, {0}, {1}, {1}, {0}};
53 static vorbis_info_mode _mode_set0={0,0,0,0};
54 static vorbis_info_mode _mode_set1={1,0,0,1};
55
56 /* CD quality stereo, no channel coupling */
57 vorbis_info info_A={
58   /* channels, sample rate, upperkbps, nominalkbps, lowerkbps */
59   0, 2, 44100, 0,0,0,
60   /* smallblock, largeblock */
61   {256, 2048}, 
62   /* modes,maps,times,floors,residues,books,psys */
63   2,          2,    1,     2,       2,    2,   1,
64   /* modes */
65   {&_mode_set0,&_mode_set1},
66   /* maps */
67   {0,0},{&_mapping_set0,&_mapping_set1},
68   /* times */
69   {0,0},{&_time_set0},
70   /* floors */
71   {0,0},{&_floor_set0,&_floor_set1},
72   /* residue */
73   {0,0},{&_residue_set0,&_residue_set1},
74   /* books */
75   {&_vq_book_lsp20_0,&_vq_book_lsp32_0},
76   /* psy */
77   {&_psy_set0},
78   /* thresh sample period, preecho clamp trigger threshhold, range */
79   64, 10, 2 
80 };
81
82 #define PREDEF_INFO_MAX 0
83
84 #endif