Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /******************************************************************** |
michael@0 | 2 | * * |
michael@0 | 3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * |
michael@0 | 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
michael@0 | 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
michael@0 | 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
michael@0 | 7 | * * |
michael@0 | 8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * |
michael@0 | 9 | * by the Xiph.Org Foundation http://www.xiph.org/ * |
michael@0 | 10 | * * |
michael@0 | 11 | ******************************************************************** |
michael@0 | 12 | |
michael@0 | 13 | function: key floor settings |
michael@0 | 14 | last mod: $Id: floor_all.h 17050 2010-03-26 01:34:42Z xiphmont $ |
michael@0 | 15 | |
michael@0 | 16 | ********************************************************************/ |
michael@0 | 17 | |
michael@0 | 18 | #include "vorbis/codec.h" |
michael@0 | 19 | #include "backends.h" |
michael@0 | 20 | #include "books/floor/floor_books.h" |
michael@0 | 21 | |
michael@0 | 22 | static const static_codebook*const _floor_128x4_books[]={ |
michael@0 | 23 | &_huff_book_line_128x4_class0, |
michael@0 | 24 | &_huff_book_line_128x4_0sub0, |
michael@0 | 25 | &_huff_book_line_128x4_0sub1, |
michael@0 | 26 | &_huff_book_line_128x4_0sub2, |
michael@0 | 27 | &_huff_book_line_128x4_0sub3, |
michael@0 | 28 | }; |
michael@0 | 29 | static const static_codebook*const _floor_256x4_books[]={ |
michael@0 | 30 | &_huff_book_line_256x4_class0, |
michael@0 | 31 | &_huff_book_line_256x4_0sub0, |
michael@0 | 32 | &_huff_book_line_256x4_0sub1, |
michael@0 | 33 | &_huff_book_line_256x4_0sub2, |
michael@0 | 34 | &_huff_book_line_256x4_0sub3, |
michael@0 | 35 | }; |
michael@0 | 36 | static const static_codebook*const _floor_128x7_books[]={ |
michael@0 | 37 | &_huff_book_line_128x7_class0, |
michael@0 | 38 | &_huff_book_line_128x7_class1, |
michael@0 | 39 | |
michael@0 | 40 | &_huff_book_line_128x7_0sub1, |
michael@0 | 41 | &_huff_book_line_128x7_0sub2, |
michael@0 | 42 | &_huff_book_line_128x7_0sub3, |
michael@0 | 43 | &_huff_book_line_128x7_1sub1, |
michael@0 | 44 | &_huff_book_line_128x7_1sub2, |
michael@0 | 45 | &_huff_book_line_128x7_1sub3, |
michael@0 | 46 | }; |
michael@0 | 47 | static const static_codebook*const _floor_256x7_books[]={ |
michael@0 | 48 | &_huff_book_line_256x7_class0, |
michael@0 | 49 | &_huff_book_line_256x7_class1, |
michael@0 | 50 | |
michael@0 | 51 | &_huff_book_line_256x7_0sub1, |
michael@0 | 52 | &_huff_book_line_256x7_0sub2, |
michael@0 | 53 | &_huff_book_line_256x7_0sub3, |
michael@0 | 54 | &_huff_book_line_256x7_1sub1, |
michael@0 | 55 | &_huff_book_line_256x7_1sub2, |
michael@0 | 56 | &_huff_book_line_256x7_1sub3, |
michael@0 | 57 | }; |
michael@0 | 58 | static const static_codebook*const _floor_128x11_books[]={ |
michael@0 | 59 | &_huff_book_line_128x11_class1, |
michael@0 | 60 | &_huff_book_line_128x11_class2, |
michael@0 | 61 | &_huff_book_line_128x11_class3, |
michael@0 | 62 | |
michael@0 | 63 | &_huff_book_line_128x11_0sub0, |
michael@0 | 64 | &_huff_book_line_128x11_1sub0, |
michael@0 | 65 | &_huff_book_line_128x11_1sub1, |
michael@0 | 66 | &_huff_book_line_128x11_2sub1, |
michael@0 | 67 | &_huff_book_line_128x11_2sub2, |
michael@0 | 68 | &_huff_book_line_128x11_2sub3, |
michael@0 | 69 | &_huff_book_line_128x11_3sub1, |
michael@0 | 70 | &_huff_book_line_128x11_3sub2, |
michael@0 | 71 | &_huff_book_line_128x11_3sub3, |
michael@0 | 72 | }; |
michael@0 | 73 | static const static_codebook*const _floor_128x17_books[]={ |
michael@0 | 74 | &_huff_book_line_128x17_class1, |
michael@0 | 75 | &_huff_book_line_128x17_class2, |
michael@0 | 76 | &_huff_book_line_128x17_class3, |
michael@0 | 77 | |
michael@0 | 78 | &_huff_book_line_128x17_0sub0, |
michael@0 | 79 | &_huff_book_line_128x17_1sub0, |
michael@0 | 80 | &_huff_book_line_128x17_1sub1, |
michael@0 | 81 | &_huff_book_line_128x17_2sub1, |
michael@0 | 82 | &_huff_book_line_128x17_2sub2, |
michael@0 | 83 | &_huff_book_line_128x17_2sub3, |
michael@0 | 84 | &_huff_book_line_128x17_3sub1, |
michael@0 | 85 | &_huff_book_line_128x17_3sub2, |
michael@0 | 86 | &_huff_book_line_128x17_3sub3, |
michael@0 | 87 | }; |
michael@0 | 88 | static const static_codebook*const _floor_256x4low_books[]={ |
michael@0 | 89 | &_huff_book_line_256x4low_class0, |
michael@0 | 90 | &_huff_book_line_256x4low_0sub0, |
michael@0 | 91 | &_huff_book_line_256x4low_0sub1, |
michael@0 | 92 | &_huff_book_line_256x4low_0sub2, |
michael@0 | 93 | &_huff_book_line_256x4low_0sub3, |
michael@0 | 94 | }; |
michael@0 | 95 | static const static_codebook*const _floor_1024x27_books[]={ |
michael@0 | 96 | &_huff_book_line_1024x27_class1, |
michael@0 | 97 | &_huff_book_line_1024x27_class2, |
michael@0 | 98 | &_huff_book_line_1024x27_class3, |
michael@0 | 99 | &_huff_book_line_1024x27_class4, |
michael@0 | 100 | |
michael@0 | 101 | &_huff_book_line_1024x27_0sub0, |
michael@0 | 102 | &_huff_book_line_1024x27_1sub0, |
michael@0 | 103 | &_huff_book_line_1024x27_1sub1, |
michael@0 | 104 | &_huff_book_line_1024x27_2sub0, |
michael@0 | 105 | &_huff_book_line_1024x27_2sub1, |
michael@0 | 106 | &_huff_book_line_1024x27_3sub1, |
michael@0 | 107 | &_huff_book_line_1024x27_3sub2, |
michael@0 | 108 | &_huff_book_line_1024x27_3sub3, |
michael@0 | 109 | &_huff_book_line_1024x27_4sub1, |
michael@0 | 110 | &_huff_book_line_1024x27_4sub2, |
michael@0 | 111 | &_huff_book_line_1024x27_4sub3, |
michael@0 | 112 | }; |
michael@0 | 113 | static const static_codebook*const _floor_2048x27_books[]={ |
michael@0 | 114 | &_huff_book_line_2048x27_class1, |
michael@0 | 115 | &_huff_book_line_2048x27_class2, |
michael@0 | 116 | &_huff_book_line_2048x27_class3, |
michael@0 | 117 | &_huff_book_line_2048x27_class4, |
michael@0 | 118 | |
michael@0 | 119 | &_huff_book_line_2048x27_0sub0, |
michael@0 | 120 | &_huff_book_line_2048x27_1sub0, |
michael@0 | 121 | &_huff_book_line_2048x27_1sub1, |
michael@0 | 122 | &_huff_book_line_2048x27_2sub0, |
michael@0 | 123 | &_huff_book_line_2048x27_2sub1, |
michael@0 | 124 | &_huff_book_line_2048x27_3sub1, |
michael@0 | 125 | &_huff_book_line_2048x27_3sub2, |
michael@0 | 126 | &_huff_book_line_2048x27_3sub3, |
michael@0 | 127 | &_huff_book_line_2048x27_4sub1, |
michael@0 | 128 | &_huff_book_line_2048x27_4sub2, |
michael@0 | 129 | &_huff_book_line_2048x27_4sub3, |
michael@0 | 130 | }; |
michael@0 | 131 | |
michael@0 | 132 | static const static_codebook*const _floor_512x17_books[]={ |
michael@0 | 133 | &_huff_book_line_512x17_class1, |
michael@0 | 134 | &_huff_book_line_512x17_class2, |
michael@0 | 135 | &_huff_book_line_512x17_class3, |
michael@0 | 136 | |
michael@0 | 137 | &_huff_book_line_512x17_0sub0, |
michael@0 | 138 | &_huff_book_line_512x17_1sub0, |
michael@0 | 139 | &_huff_book_line_512x17_1sub1, |
michael@0 | 140 | &_huff_book_line_512x17_2sub1, |
michael@0 | 141 | &_huff_book_line_512x17_2sub2, |
michael@0 | 142 | &_huff_book_line_512x17_2sub3, |
michael@0 | 143 | &_huff_book_line_512x17_3sub1, |
michael@0 | 144 | &_huff_book_line_512x17_3sub2, |
michael@0 | 145 | &_huff_book_line_512x17_3sub3, |
michael@0 | 146 | }; |
michael@0 | 147 | |
michael@0 | 148 | static const static_codebook*const _floor_Xx0_books[]={ |
michael@0 | 149 | 0 |
michael@0 | 150 | }; |
michael@0 | 151 | |
michael@0 | 152 | static const static_codebook*const *const _floor_books[11]={ |
michael@0 | 153 | _floor_128x4_books, |
michael@0 | 154 | _floor_256x4_books, |
michael@0 | 155 | _floor_128x7_books, |
michael@0 | 156 | _floor_256x7_books, |
michael@0 | 157 | _floor_128x11_books, |
michael@0 | 158 | _floor_128x17_books, |
michael@0 | 159 | _floor_256x4low_books, |
michael@0 | 160 | _floor_1024x27_books, |
michael@0 | 161 | _floor_2048x27_books, |
michael@0 | 162 | _floor_512x17_books, |
michael@0 | 163 | _floor_Xx0_books, |
michael@0 | 164 | }; |
michael@0 | 165 | |
michael@0 | 166 | static const vorbis_info_floor1 _floor[11]={ |
michael@0 | 167 | /* 0: 128 x 4 */ |
michael@0 | 168 | { |
michael@0 | 169 | 1,{0},{4},{2},{0}, |
michael@0 | 170 | {{1,2,3,4}}, |
michael@0 | 171 | 4,{0,128, 33,8,16,70}, |
michael@0 | 172 | |
michael@0 | 173 | 60,30,500, 1.,18., 128 |
michael@0 | 174 | }, |
michael@0 | 175 | /* 1: 256 x 4 */ |
michael@0 | 176 | { |
michael@0 | 177 | 1,{0},{4},{2},{0}, |
michael@0 | 178 | {{1,2,3,4}}, |
michael@0 | 179 | 4,{0,256, 66,16,32,140}, |
michael@0 | 180 | |
michael@0 | 181 | 60,30,500, 1.,18., 256 |
michael@0 | 182 | }, |
michael@0 | 183 | /* 2: 128 x 7 */ |
michael@0 | 184 | { |
michael@0 | 185 | 2,{0,1},{3,4},{2,2},{0,1}, |
michael@0 | 186 | {{-1,2,3,4},{-1,5,6,7}}, |
michael@0 | 187 | 4,{0,128, 14,4,58, 2,8,28,90}, |
michael@0 | 188 | |
michael@0 | 189 | 60,30,500, 1.,18., 128 |
michael@0 | 190 | }, |
michael@0 | 191 | /* 3: 256 x 7 */ |
michael@0 | 192 | { |
michael@0 | 193 | 2,{0,1},{3,4},{2,2},{0,1}, |
michael@0 | 194 | {{-1,2,3,4},{-1,5,6,7}}, |
michael@0 | 195 | 4,{0,256, 28,8,116, 4,16,56,180}, |
michael@0 | 196 | |
michael@0 | 197 | 60,30,500, 1.,18., 256 |
michael@0 | 198 | }, |
michael@0 | 199 | /* 4: 128 x 11 */ |
michael@0 | 200 | { |
michael@0 | 201 | 4,{0,1,2,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2}, |
michael@0 | 202 | {{3},{4,5},{-1,6,7,8},{-1,9,10,11}}, |
michael@0 | 203 | |
michael@0 | 204 | 2,{0,128, 8,33, 4,16,70, 2,6,12, 23,46,90}, |
michael@0 | 205 | |
michael@0 | 206 | 60,30,500, 1,18., 128 |
michael@0 | 207 | }, |
michael@0 | 208 | /* 5: 128 x 17 */ |
michael@0 | 209 | { |
michael@0 | 210 | 6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2}, |
michael@0 | 211 | {{3},{4,5},{-1,6,7,8},{-1,9,10,11}}, |
michael@0 | 212 | 2,{0,128, 12,46, 4,8,16, 23,33,70, 2,6,10, 14,19,28, 39,58,90}, |
michael@0 | 213 | |
michael@0 | 214 | 60,30,500, 1,18., 128 |
michael@0 | 215 | }, |
michael@0 | 216 | /* 6: 256 x 4 (low bitrate version) */ |
michael@0 | 217 | { |
michael@0 | 218 | 1,{0},{4},{2},{0}, |
michael@0 | 219 | {{1,2,3,4}}, |
michael@0 | 220 | 4,{0,256, 66,16,32,140}, |
michael@0 | 221 | |
michael@0 | 222 | 60,30,500, 1.,18., 256 |
michael@0 | 223 | }, |
michael@0 | 224 | /* 7: 1024 x 27 */ |
michael@0 | 225 | { |
michael@0 | 226 | 8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3}, |
michael@0 | 227 | {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}}, |
michael@0 | 228 | 2,{0,1024, 93,23,372, 6,46,186,750, 14,33,65, 130,260,556, |
michael@0 | 229 | 3,10,18,28, 39,55,79,111, 158,220,312, 464,650,850}, |
michael@0 | 230 | |
michael@0 | 231 | 60,30,500, 3,18., 1024 |
michael@0 | 232 | }, |
michael@0 | 233 | /* 8: 2048 x 27 */ |
michael@0 | 234 | { |
michael@0 | 235 | 8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3}, |
michael@0 | 236 | {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}}, |
michael@0 | 237 | 2,{0,2048, 186,46,744, 12,92,372,1500, 28,66,130, 260,520,1112, |
michael@0 | 238 | 6,20,36,56, 78,110,158,222, 316,440,624, 928,1300,1700}, |
michael@0 | 239 | |
michael@0 | 240 | 60,30,500, 3,18., 2048 |
michael@0 | 241 | }, |
michael@0 | 242 | /* 9: 512 x 17 */ |
michael@0 | 243 | { |
michael@0 | 244 | 6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2}, |
michael@0 | 245 | {{3},{4,5},{-1,6,7,8},{-1,9,10,11}}, |
michael@0 | 246 | 2,{0,512, 46,186, 16,33,65, 93,130,278, |
michael@0 | 247 | 7,23,39, 55,79,110, 156,232,360}, |
michael@0 | 248 | |
michael@0 | 249 | 60,30,500, 1,18., 512 |
michael@0 | 250 | }, |
michael@0 | 251 | |
michael@0 | 252 | /* 10: X x 0 (LFE floor; edge posts only) */ |
michael@0 | 253 | { |
michael@0 | 254 | 0,{0}, {0},{0},{-1}, |
michael@0 | 255 | {{-1}}, |
michael@0 | 256 | 2,{0,12}, |
michael@0 | 257 | 60,30,500, 1.,18., 10 |
michael@0 | 258 | }, |
michael@0 | 259 | |
michael@0 | 260 | }; |