Incremental update toward VQ integration, vorbis_info rearrangement
[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.2 2000/01/12 11:34:38 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/book/lsp20_0a.h"
25 #include "vorbis/book/lsp20_0b.h"
26 #include "vorbis/book/lsp32_0a.h"
27 #include "vorbis/book/lsp32_0b.h"
28
29 static int _intvector_0_15[]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
30 static *codebook _bookvector0[4]={_vq_book_lsp20_0a,_vq_book_lsp20_0b,
31                                   _vq_book_lsp32_0a,_vq_book_lsp32_0b};
32
33 /*
34    0      1      2      3      4     5      6     7     8     9 
35    0,   100,  200,   300,   400,   510,   630,  770,  920, 1080,
36
37    10    11    12     13     14     15     16    17    18    19
38  1270, 1480, 1720,  2000,  2320,  2700,  3150, 3700, 4400, 5300,
39
40    20    21    22     23     24     25     26 Bark
41  6400, 7700, 9500, 12000, 15500, 20500, 27000 Hz    */
42
43 vorbis_info predef_modes[]={
44   /* CD quality stereo, no channel coupling */
45
46     /* channels, sample rate, upperkbps, nominalkbps, lowerkbps */
47   { 2, 44100, 0,0,0,
48     /* dummy, dummy, dummy, dummy */
49     NULL, 0, NULL, 
50     /* smallblock, largeblock */
51     {256, 2048}, 
52
53     /* LSP/LPC order (small, large), LPC bark mapping size, floor channels */
54     {20,32}, {64,256}, 2,
55     /* LSP encoding */
56     2, _intvector_0_15, 2, _intvector_0_15+2,
57
58     /* channel mapping.  Right now, no balance, no coupling */
59     {0,0},
60
61     /* residue encoding */
62
63     /* codebooks */
64     _bookvector0, 4,
65
66     /* thresh sample period, preecho clamp trigger threshhold, range, dummy */
67     64, 10, 2, 
68     /* tone masking curve dB attenuation levels [27] */
69     { -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
70       -12, -14, -16, -16, -16, -16, -18, -18, -16, -16,
71       -12, -10, -8, -6, -6, -6, -4},
72     /* tone masking rolloff settings (dB per octave), octave bias */
73     24,10,
74
75     NULL,NULL,NULL},
76   
77 };
78
79 #define predef_mode_max 0
80
81 #endif