06ee1af275eb96e42d030ffd59a6f1501183db95
[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.5 2000/02/09 22:04:10 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,0};
50 static vorbis_info_mapping0 _mapping_set0={1, {0,0}, {0}, {0}, {0}, {0}};
51 static vorbis_info_mapping0 _mapping_set1={1, {0,0}, {0}, {1}, {0}, {0}};
52 static vorbis_info_mode _mode_set0={0,0,0,0};
53 static vorbis_info_mode _mode_set1={1,0,0,1};
54
55 /* CD quality stereo, no channel coupling */
56 vorbis_info info_A={
57   /* channels, sample rate, upperkbps, nominalkbps, lowerkbps */
58   0, 2, 44100, 0,0,0,
59   /* smallblock, largeblock */
60   {256, 2048}, 
61   /* modes,maps,times,floors,residues,books,psys */
62   2,          2,    1,     2,       2,    2,   1,
63   /* modes */
64   {&_mode_set0,&_mode_set1},
65   /* maps */
66   {0,0},{&_mapping_set0,&_mapping_set1},
67   /* times */
68   {0,0},{&_time_set0},
69   /* floors */
70   {0,0},{&_floor_set0,&_floor_set1},
71   /* residue */
72   {0,0},{&_residue_set0},
73   /* books */
74   {&_vq_book_lsp20_0,&_vq_book_lsp32_0},
75   /* psy */
76   {&_psy_set0},
77   /* thresh sample period, preecho clamp trigger threshhold, range */
78   64, 10, 2 
79 };
80
81 #define PREDEF_INFO_MAX 0
82
83 #endif