1 /********************************************************************
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. *
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/ *
12 ********************************************************************
14 function: predefined encoding modes
15 last mod: $Id: modes.h,v 1.3 2000/01/28 14:31:24 xiphmont Exp $
17 ********************************************************************/
23 #include "vorbis/codec.h"
24 #include "vorbis/backends.h"
25 #include "vorbis/book/lsp20_0.h"
26 #include "vorbis/book/lsp32_0.h"
30 0, 100, 200, 300, 400, 510, 630, 770, 920, 1080,
32 10 11 12 13 14 15 16 17 18 19
33 1270, 1480, 1720, 2000, 2320, 2700, 3150, 3700, 4400, 5300,
35 20 21 22 23 24 25 26 Bark
36 6400, 7700, 9500, 12000, 15500, 20500, 27000 Hz */
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
45 /* with GNUisms, this could be short and readable. Oh well */
46 static static_codebook *_book_vec0[2]={&_vq_book_lsp20_0,&_vq_book_lsp32_0};
47 static vorbis_info_time0 _time_set0={0};
48 static vorbis_info_floor0 _floor_set0={20, 44100, 64, 1, {0} };
49 static vorbis_info_floor0 _floor_set1={32, 44100, 256, 1, {1} };
50 static vorbis_info_residue0 _residue_set0={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}, {0}, {0}};
53 static vorbis_info mode _mode_set0={0,0,0,0};
54 static vorbis_info mode _mode_set1={1,0,0,1};
56 static vorbis_info_time *_time_A[1]={&_time_set0};
57 static vorbis_info_floor *_floor_A[2]={&_floor_set0,&_floor_set1};
58 static vorbis_info_residue *_res_A[1]={&_residue_set0};
59 static vorbis_info_psy *_psy_A[1]={&_psy_set0};
60 static vorbis_info_mode *_mode_A[2]=
63 /* CD quality stereo, no channel coupling */
66 /* channels, sample rate, upperkbps, nominalkbps, lowerkbps */
68 /* smallblock, largeblock */
70 /* modes,maps,times,floors,residues,books,psys */
73 {&_mode_set0,&mode_set1},
75 {0,0},{&_mapping_set0,&_mapping_set1},
79 {0,0},{&_floor_set0,&_floor_set1},
81 {0,0},{&_residue_set0},
83 {&_vq_book_lsp20_0,&_vq_book_lsp32_0},
86 /* thresh sample period, preecho clamp trigger threshhold, range */
91 #define PREDEF_INFO_MAX 0