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.8 2000/02/23 09:24:01 xiphmont Exp $
17 ********************************************************************/
23 #include "vorbis/codec.h"
24 #include "vorbis/backends.h"
26 #include "vorbis/book/lsp20_0.vqh"
27 #include "vorbis/book/lsp32_0.vqh"
29 #include "vorbis/book/resshort8aux.vqh"
30 #include "vorbis/book/reslong8aux.vqh"
32 #include "vorbis/book/resX_1.vqh"
34 /*#include "vorbis/book/res128_0a.vqh"
35 #include "vorbis/book/res128_0b.vqh"
36 #include "vorbis/book/res128_0c7x4.vqh"
37 #include "vorbis/book/res1024_1a.vqh"
38 #include "vorbis/book/res1024_0b.vqh"
39 #include "vorbis/book/res1024_0c8x4.vqh"*/
43 0, 100, 200, 300, 400, 510, 630, 770, 920, 1080,
45 10 11 12 13 14 15 16 17 18 19
46 1270, 1480, 1720, 2000, 2320, 2700, 3150, 3700, 4400, 5300,
48 20 21 22 23 24 25 26 Bark
49 6400, 7700, 9500, 12000, 15500, 20500, 27000 Hz */
51 /* a good set of rolloffs for nigh-transparent masking */
52 static vorbis_info_psy _psy_set0={
53 { -20, -20, -14, -14, -14, -14, -14, -14, -14, -14,
54 -14, -14, -16, -16, -16, -16, -18, -18, -16, -16,
55 -12, -10, -6, -3, -2, -1, -0}, 16,8
58 /* with GNUisms, this could be short and readable. Oh well */
59 static vorbis_info_time0 _time_set0={0};
60 static vorbis_info_floor0 _floor_set0={20, 44100, 64, 12,140, 1, {0} };
61 static vorbis_info_floor0 _floor_set1={32, 44100, 256, 12,140, 1, {1} };
62 static vorbis_info_residue0 _residue_set0={0, 128, 8,4,2,{0,1,1,1},{4,4,4}};
63 static vorbis_info_residue0 _residue_set1={0,1024, 8,4,3,{0,1,1,1},{4,4,4}};
64 static vorbis_info_mapping0 _mapping_set0={1, {0,0}, {0}, {0}, {0}, {0}};
65 static vorbis_info_mapping0 _mapping_set1={1, {0,0}, {0}, {1}, {1}, {0}};
66 static vorbis_info_mode _mode_set0={0,0,0,0};
67 static vorbis_info_mode _mode_set1={1,0,0,1};
69 /* CD quality stereo, no channel coupling */
71 /* channels, sample rate, upperkbps, nominalkbps, lowerkbps */
73 /* smallblock, largeblock */
75 /* modes,maps,times,floors,residues,books,psys */
78 {&_mode_set0,&_mode_set1},
80 {0,0},{&_mapping_set0,&_mapping_set1},
84 {0,0},{&_floor_set0,&_floor_set1},
86 {0,0},{&_residue_set0,&_residue_set1},
88 {&_vq_book_lsp20_0, /* 0 */
89 &_vq_book_lsp32_0, /* 1 */
91 &_huff_book_resshort8aux,/* 2 */
92 &_huff_book_reslong8aux, /* 3 */
95 &_vq_book_res128_0a, /* 4 */
96 &_vq_book_res128_0b, /* 5 */
97 &_vq_book_res128_0c7x4, /* 6 */
98 &_vq_book_res1024_1a, /* 7 */
99 &_vq_book_res1024_0b, /* 8 */
100 &_vq_book_res1024_0c8x4,/* 9 */
108 /* thresh sample period, preecho clamp trigger threshhold, range */
112 #define PREDEF_INFO_MAX 0