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.9 2000/02/23 11:42:00 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/res1024_0a.vqh"
36 /*#include "vorbis/book/res128_0b.vqh"
37 #include "vorbis/book/res128_0c7x4.vqh"
38 #include "vorbis/book/res1024_1a.vqh"
39 #include "vorbis/book/res1024_0b.vqh"
40 #include "vorbis/book/res1024_0c8x4.vqh"*/
44 0, 100, 200, 300, 400, 510, 630, 770, 920, 1080,
46 10 11 12 13 14 15 16 17 18 19
47 1270, 1480, 1720, 2000, 2320, 2700, 3150, 3700, 4400, 5300,
49 20 21 22 23 24 25 26 Bark
50 6400, 7700, 9500, 12000, 15500, 20500, 27000 Hz */
52 /* a good set of rolloffs for nigh-transparent masking */
53 static vorbis_info_psy _psy_set0={
54 { -20, -20, -14, -14, -14, -14, -14, -14, -14, -14,
55 -14, -14, -16, -16, -16, -16, -18, -18, -16, -16,
56 -12, -10, -6, -3, -2, -1, -0}, 16,8
59 /* with GNUisms, this could be short and readable. Oh well */
60 static vorbis_info_time0 _time_set0={0};
61 static vorbis_info_floor0 _floor_set0={20, 44100, 64, 12,140, 1, {0} };
62 static vorbis_info_floor0 _floor_set1={32, 44100, 256, 12,140, 1, {1} };
63 static vorbis_info_residue0 _residue_set0={0, 128, 8,4,2,{0,1,1,1},{4,6,6}};
64 static vorbis_info_residue0 _residue_set1={0,1024, 8,4,3,{0,1,1,1},{5,6,6}};
65 static vorbis_info_mapping0 _mapping_set0={1, {0,0}, {0}, {0}, {0}, {0}};
66 static vorbis_info_mapping0 _mapping_set1={1, {0,0}, {0}, {1}, {1}, {0}};
67 static vorbis_info_mode _mode_set0={0,0,0,0};
68 static vorbis_info_mode _mode_set1={1,0,0,1};
70 /* CD quality stereo, no channel coupling */
72 /* channels, sample rate, upperkbps, nominalkbps, lowerkbps */
74 /* smallblock, largeblock */
76 /* modes,maps,times,floors,residues,books,psys */
79 {&_mode_set0,&_mode_set1},
81 {0,0},{&_mapping_set0,&_mapping_set1},
85 {0,0},{&_floor_set0,&_floor_set1},
87 {0,0},{&_residue_set0,&_residue_set1},
89 {&_vq_book_lsp20_0, /* 0 */
90 &_vq_book_lsp32_0, /* 1 */
92 &_huff_book_resshort8aux,/* 2 */
93 &_huff_book_reslong8aux, /* 3 */
95 &_vq_book_res128_0a, /* 4 */
96 &_vq_book_res1024_0a, /* 5 */
99 &_vq_book_res128_0a, /* 4 */
100 &_vq_book_res128_0b, /* 5 */
101 &_vq_book_res128_0c7x4, /* 6 */
102 &_vq_book_res1024_1a, /* 7 */
103 &_vq_book_res1024_0b, /* 8 */
104 &_vq_book_res1024_0c8x4,/* 9 */
112 /* thresh sample period, preecho clamp trigger threshhold, range */
116 #define PREDEF_INFO_MAX 0