dbf-halloween2015
diff libs/vorbis/modes/residue_44p51.h @ 1:c3f5c32cb210
barfed all the libraries in the source tree to make porting easier
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 01 Nov 2015 00:36:56 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libs/vorbis/modes/residue_44p51.h Sun Nov 01 00:36:56 2015 +0200 1.3 @@ -0,0 +1,451 @@ 1.4 +/******************************************************************** 1.5 + * * 1.6 + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * 1.7 + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 1.8 + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 1.9 + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 1.10 + * * 1.11 + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 * 1.12 + * by the Xiph.Org Foundation http://www.xiph.org/ * 1.13 + * * 1.14 + ******************************************************************** 1.15 + 1.16 + function: toplevel residue templates for 32/44.1/48kHz uncoupled 1.17 + last mod: $Id$ 1.18 + 1.19 + ********************************************************************/ 1.20 + 1.21 +#include "vorbis/codec.h" 1.22 +#include "backends.h" 1.23 + 1.24 +#include "books/coupled/res_books_51.h" 1.25 + 1.26 +/***** residue backends *********************************************/ 1.27 + 1.28 +static const vorbis_info_residue0 _residue_44p_lo={ 1.29 + 0,-1, -1, 7,-1,-1, 1.30 + /* 0 1 2 3 4 5 6 7 8 */ 1.31 + {0}, 1.32 + {-1}, 1.33 + { 0, 1, 2, 7, 17, 31}, 1.34 + { 0, 0, 99, 7, 17, 31}, 1.35 +}; 1.36 + 1.37 +static const vorbis_info_residue0 _residue_44p={ 1.38 + 0,-1, -1, 8,-1,-1, 1.39 + /* 0 1 2 3 4 5 6 7 8 */ 1.40 + {0}, 1.41 + {-1}, 1.42 + { 0, 1, 1, 2, 7, 17, 31}, 1.43 + { 0, 0, 99, 99, 7, 17, 31}, 1.44 +}; 1.45 + 1.46 +static const vorbis_info_residue0 _residue_44p_hi={ 1.47 + 0,-1, -1, 8,-1,-1, 1.48 + /* 0 1 2 3 4 5 6 7 8 */ 1.49 + {0}, 1.50 + {-1}, 1.51 + { 0, 1, 2, 4, 7, 17, 31}, 1.52 + { 0, 1, 2, 4, 7, 17, 31}, 1.53 +}; 1.54 + 1.55 +static const vorbis_info_residue0 _residue_44p_lfe={ 1.56 + 0,-1, -1, 2,-1,-1, 1.57 + /* 0 1 2 3 4 5 6 7 8 */ 1.58 + {0}, 1.59 + {-1}, 1.60 + { 32}, 1.61 + { -1} 1.62 +}; 1.63 + 1.64 +static const static_bookblock _resbook_44p_n1={ 1.65 + { 1.66 + {0}, 1.67 + {0,&_44pn1_p1_0}, 1.68 + 1.69 + {&_44pn1_p2_0,&_44pn1_p2_1,0}, 1.70 + {&_44pn1_p3_0,&_44pn1_p3_1,0}, 1.71 + {&_44pn1_p4_0,&_44pn1_p4_1,0}, 1.72 + 1.73 + {&_44pn1_p5_0,&_44pn1_p5_1,&_44pn1_p4_1}, 1.74 + {&_44pn1_p6_0,&_44pn1_p6_1,&_44pn1_p6_2}, 1.75 + } 1.76 +}; 1.77 + 1.78 +static const static_bookblock _resbook_44p_0={ 1.79 + { 1.80 + {0}, 1.81 + {0,&_44p0_p1_0}, 1.82 + 1.83 + {&_44p0_p2_0,&_44p0_p2_1,0}, 1.84 + {&_44p0_p3_0,&_44p0_p3_1,0}, 1.85 + {&_44p0_p4_0,&_44p0_p4_1,0}, 1.86 + 1.87 + {&_44p0_p5_0,&_44p0_p5_1,&_44p0_p4_1}, 1.88 + {&_44p0_p6_0,&_44p0_p6_1,&_44p0_p6_2}, 1.89 + } 1.90 +}; 1.91 + 1.92 +static const static_bookblock _resbook_44p_1={ 1.93 + { 1.94 + {0}, 1.95 + {0,&_44p1_p1_0}, 1.96 + 1.97 + {&_44p1_p2_0,&_44p1_p2_1,0}, 1.98 + {&_44p1_p3_0,&_44p1_p3_1,0}, 1.99 + {&_44p1_p4_0,&_44p1_p4_1,0}, 1.100 + 1.101 + {&_44p1_p5_0,&_44p1_p5_1,&_44p1_p4_1}, 1.102 + {&_44p1_p6_0,&_44p1_p6_1,&_44p1_p6_2}, 1.103 + } 1.104 +}; 1.105 + 1.106 +static const static_bookblock _resbook_44p_2={ 1.107 + { 1.108 + {0}, 1.109 + {0,0,&_44p2_p1_0}, 1.110 + {0,&_44p2_p2_0,0}, 1.111 + 1.112 + {&_44p2_p3_0,&_44p2_p3_1,0}, 1.113 + {&_44p2_p4_0,&_44p2_p4_1,0}, 1.114 + {&_44p2_p5_0,&_44p2_p5_1,0}, 1.115 + 1.116 + {&_44p2_p6_0,&_44p2_p6_1,&_44p2_p5_1}, 1.117 + {&_44p2_p7_0,&_44p2_p7_1,&_44p2_p7_2,&_44p2_p7_3} 1.118 + } 1.119 +}; 1.120 +static const static_bookblock _resbook_44p_3={ 1.121 + { 1.122 + {0}, 1.123 + {0,0,&_44p3_p1_0}, 1.124 + {0,&_44p3_p2_0,0}, 1.125 + 1.126 + {&_44p3_p3_0,&_44p3_p3_1,0}, 1.127 + {&_44p3_p4_0,&_44p3_p4_1,0}, 1.128 + {&_44p3_p5_0,&_44p3_p5_1,0}, 1.129 + 1.130 + {&_44p3_p6_0,&_44p3_p6_1,&_44p3_p5_1}, 1.131 + {&_44p3_p7_0,&_44p3_p7_1,&_44p3_p7_2,&_44p3_p7_3} 1.132 + } 1.133 +}; 1.134 +static const static_bookblock _resbook_44p_4={ 1.135 + { 1.136 + {0}, 1.137 + {0,0,&_44p4_p1_0}, 1.138 + {0,&_44p4_p2_0,0}, 1.139 + 1.140 + {&_44p4_p3_0,&_44p4_p3_1,0}, 1.141 + {&_44p4_p4_0,&_44p4_p4_1,0}, 1.142 + {&_44p4_p5_0,&_44p4_p5_1,0}, 1.143 + 1.144 + {&_44p4_p6_0,&_44p4_p6_1,&_44p4_p5_1}, 1.145 + {&_44p4_p7_0,&_44p4_p7_1,&_44p4_p7_2,&_44p4_p7_3} 1.146 + } 1.147 +}; 1.148 +static const static_bookblock _resbook_44p_5={ 1.149 + { 1.150 + {0}, 1.151 + {0,0,&_44p5_p1_0}, 1.152 + {0,&_44p5_p2_0,0}, 1.153 + 1.154 + {&_44p5_p3_0,&_44p5_p3_1,0}, 1.155 + {&_44p5_p4_0,&_44p5_p4_1,0}, 1.156 + {&_44p5_p5_0,&_44p5_p5_1,0}, 1.157 + 1.158 + {&_44p5_p6_0,&_44p5_p6_1,&_44p5_p5_1}, 1.159 + {&_44p5_p7_0,&_44p5_p7_1,&_44p5_p7_2,&_44p5_p7_3} 1.160 + } 1.161 +}; 1.162 +static const static_bookblock _resbook_44p_6={ 1.163 + { 1.164 + {0}, 1.165 + {0,0,&_44p6_p1_0}, 1.166 + {0,&_44p6_p2_0,0}, 1.167 + 1.168 + {&_44p6_p3_0,&_44p6_p3_1,0}, 1.169 + {&_44p6_p4_0,&_44p6_p4_1,0}, 1.170 + {&_44p6_p5_0,&_44p6_p5_1,0}, 1.171 + 1.172 + {&_44p6_p6_0,&_44p6_p6_1,&_44p6_p5_1}, 1.173 + {&_44p6_p7_0,&_44p6_p7_1,&_44p6_p7_2,&_44p6_p7_3} 1.174 + } 1.175 +}; 1.176 +static const static_bookblock _resbook_44p_7={ 1.177 + { 1.178 + {0}, 1.179 + {0,0,&_44p7_p1_0}, 1.180 + {0,&_44p7_p2_0,0}, 1.181 + 1.182 + {&_44p7_p3_0,&_44p7_p3_1,0}, 1.183 + {&_44p7_p4_0,&_44p7_p4_1,0}, 1.184 + {&_44p7_p5_0,&_44p7_p5_1,0}, 1.185 + 1.186 + {&_44p7_p6_0,&_44p7_p6_1,&_44p7_p5_1}, 1.187 + {&_44p7_p7_0,&_44p7_p7_1,&_44p7_p7_2,&_44p7_p7_3} 1.188 + } 1.189 +}; 1.190 +static const static_bookblock _resbook_44p_8={ 1.191 + { 1.192 + {0}, 1.193 + {0,0,&_44p8_p1_0}, 1.194 + {0,&_44p8_p2_0,0}, 1.195 + 1.196 + {&_44p8_p3_0,&_44p8_p3_1,0}, 1.197 + {&_44p8_p4_0,&_44p8_p4_1,0}, 1.198 + {&_44p8_p5_0,&_44p8_p5_1,0}, 1.199 + 1.200 + {&_44p8_p6_0,&_44p8_p6_1,&_44p8_p5_1}, 1.201 + {&_44p8_p7_0,&_44p8_p7_1,&_44p8_p7_2,&_44p8_p7_3} 1.202 + } 1.203 +}; 1.204 +static const static_bookblock _resbook_44p_9={ 1.205 + { 1.206 + {0}, 1.207 + {0,0,&_44p9_p1_0}, 1.208 + {0,&_44p9_p2_0,0}, 1.209 + 1.210 + {&_44p9_p3_0,&_44p9_p3_1,0}, 1.211 + {&_44p9_p4_0,&_44p9_p4_1,0}, 1.212 + {&_44p9_p5_0,&_44p9_p5_1,0}, 1.213 + 1.214 + {&_44p9_p6_0,&_44p9_p6_1,&_44p9_p5_1}, 1.215 + {&_44p9_p7_0,&_44p9_p7_1,&_44p9_p7_2,&_44p9_p7_3} 1.216 + } 1.217 +}; 1.218 + 1.219 +static const static_bookblock _resbook_44p_ln1={ 1.220 + { 1.221 + {&_44pn1_l0_0,&_44pn1_l0_1,0}, 1.222 + {&_44pn1_l1_0,&_44pn1_p6_1,&_44pn1_p6_2}, 1.223 + } 1.224 +}; 1.225 +static const static_bookblock _resbook_44p_l0={ 1.226 + { 1.227 + {&_44p0_l0_0,&_44p0_l0_1,0}, 1.228 + {&_44p0_l1_0,&_44p0_p6_1,&_44p0_p6_2}, 1.229 + } 1.230 +}; 1.231 +static const static_bookblock _resbook_44p_l1={ 1.232 + { 1.233 + {&_44p1_l0_0,&_44p1_l0_1,0}, 1.234 + {&_44p1_l1_0,&_44p1_p6_1,&_44p1_p6_2}, 1.235 + } 1.236 +}; 1.237 +static const static_bookblock _resbook_44p_l2={ 1.238 + { 1.239 + {&_44p2_l0_0,&_44p2_l0_1,0}, 1.240 + {&_44p2_l1_0,&_44p2_p7_2,&_44p2_p7_3}, 1.241 + } 1.242 +}; 1.243 +static const static_bookblock _resbook_44p_l3={ 1.244 + { 1.245 + {&_44p3_l0_0,&_44p3_l0_1,0}, 1.246 + {&_44p3_l1_0,&_44p3_p7_2,&_44p3_p7_3}, 1.247 + } 1.248 +}; 1.249 +static const static_bookblock _resbook_44p_l4={ 1.250 + { 1.251 + {&_44p4_l0_0,&_44p4_l0_1,0}, 1.252 + {&_44p4_l1_0,&_44p4_p7_2,&_44p4_p7_3}, 1.253 + } 1.254 +}; 1.255 +static const static_bookblock _resbook_44p_l5={ 1.256 + { 1.257 + {&_44p5_l0_0,&_44p5_l0_1,0}, 1.258 + {&_44p5_l1_0,&_44p5_p7_2,&_44p5_p7_3}, 1.259 + } 1.260 +}; 1.261 +static const static_bookblock _resbook_44p_l6={ 1.262 + { 1.263 + {&_44p6_l0_0,&_44p6_l0_1,0}, 1.264 + {&_44p6_l1_0,&_44p6_p7_2,&_44p6_p7_3}, 1.265 + } 1.266 +}; 1.267 +static const static_bookblock _resbook_44p_l7={ 1.268 + { 1.269 + {&_44p7_l0_0,&_44p7_l0_1,0}, 1.270 + {&_44p7_l1_0,&_44p7_p7_2,&_44p7_p7_3}, 1.271 + } 1.272 +}; 1.273 +static const static_bookblock _resbook_44p_l8={ 1.274 + { 1.275 + {&_44p8_l0_0,&_44p8_l0_1,0}, 1.276 + {&_44p8_l1_0,&_44p8_p7_2,&_44p8_p7_3}, 1.277 + } 1.278 +}; 1.279 +static const static_bookblock _resbook_44p_l9={ 1.280 + { 1.281 + {&_44p9_l0_0,&_44p9_l0_1,0}, 1.282 + {&_44p9_l1_0,&_44p9_p7_2,&_44p9_p7_3}, 1.283 + } 1.284 +}; 1.285 + 1.286 + 1.287 +static const vorbis_info_mapping0 _map_nominal_51[2]={ 1.288 + {2, {0,0,0,0,0,1}, {0,2}, {0,2}, 4,{0,3,0,0},{2,4,1,3}}, 1.289 + {2, {0,0,0,0,0,1}, {1,2}, {1,2}, 4,{0,3,0,0},{2,4,1,3}} 1.290 +}; 1.291 +static const vorbis_info_mapping0 _map_nominal_51u[2]={ 1.292 + {2, {0,0,0,0,0,1}, {0,2}, {0,2}, 0,{0},{0}}, 1.293 + {2, {0,0,0,0,0,1}, {1,2}, {1,2}, 0,{0},{0}} 1.294 +}; 1.295 + 1.296 +static const vorbis_residue_template _res_44p51_n1[]={ 1.297 + {2,0,30, &_residue_44p_lo, 1.298 + &_huff_book__44pn1_short,&_huff_book__44pn1_short, 1.299 + &_resbook_44p_n1,&_resbook_44p_n1}, 1.300 + 1.301 + {2,0,30, &_residue_44p_lo, 1.302 + &_huff_book__44pn1_long,&_huff_book__44pn1_long, 1.303 + &_resbook_44p_n1,&_resbook_44p_n1}, 1.304 + 1.305 + {1,2,6, &_residue_44p_lfe, 1.306 + &_huff_book__44pn1_lfe,&_huff_book__44pn1_lfe, 1.307 + &_resbook_44p_ln1,&_resbook_44p_ln1} 1.308 +}; 1.309 +static const vorbis_residue_template _res_44p51_0[]={ 1.310 + {2,0,15, &_residue_44p_lo, 1.311 + &_huff_book__44p0_short,&_huff_book__44p0_short, 1.312 + &_resbook_44p_0,&_resbook_44p_0}, 1.313 + 1.314 + {2,0,30, &_residue_44p_lo, 1.315 + &_huff_book__44p0_long,&_huff_book__44p0_long, 1.316 + &_resbook_44p_0,&_resbook_44p_0}, 1.317 + 1.318 + {1,2,6, &_residue_44p_lfe, 1.319 + &_huff_book__44p0_lfe,&_huff_book__44p0_lfe, 1.320 + &_resbook_44p_l0,&_resbook_44p_l0} 1.321 +}; 1.322 +static const vorbis_residue_template _res_44p51_1[]={ 1.323 + {2,0,15, &_residue_44p_lo, 1.324 + &_huff_book__44p1_short,&_huff_book__44p1_short, 1.325 + &_resbook_44p_1,&_resbook_44p_1}, 1.326 + 1.327 + {2,0,30, &_residue_44p_lo, 1.328 + &_huff_book__44p1_long,&_huff_book__44p1_long, 1.329 + &_resbook_44p_1,&_resbook_44p_1}, 1.330 + 1.331 + {1,2,6, &_residue_44p_lfe, 1.332 + &_huff_book__44p1_lfe,&_huff_book__44p1_lfe, 1.333 + &_resbook_44p_l1,&_resbook_44p_l1} 1.334 +}; 1.335 +static const vorbis_residue_template _res_44p51_2[]={ 1.336 + {2,0,15, &_residue_44p, 1.337 + &_huff_book__44p2_short,&_huff_book__44p2_short, 1.338 + &_resbook_44p_2,&_resbook_44p_2}, 1.339 + 1.340 + {2,0,30, &_residue_44p, 1.341 + &_huff_book__44p2_long,&_huff_book__44p2_long, 1.342 + &_resbook_44p_2,&_resbook_44p_2}, 1.343 + 1.344 + {1,2,6, &_residue_44p_lfe, 1.345 + &_huff_book__44p2_lfe,&_huff_book__44p2_lfe, 1.346 + &_resbook_44p_l2,&_resbook_44p_l2} 1.347 +}; 1.348 +static const vorbis_residue_template _res_44p51_3[]={ 1.349 + {2,0,15, &_residue_44p, 1.350 + &_huff_book__44p3_short,&_huff_book__44p3_short, 1.351 + &_resbook_44p_3,&_resbook_44p_3}, 1.352 + 1.353 + {2,0,30, &_residue_44p, 1.354 + &_huff_book__44p3_long,&_huff_book__44p3_long, 1.355 + &_resbook_44p_3,&_resbook_44p_3}, 1.356 + 1.357 + {1,2,6, &_residue_44p_lfe, 1.358 + &_huff_book__44p3_lfe,&_huff_book__44p3_lfe, 1.359 + &_resbook_44p_l3,&_resbook_44p_l3} 1.360 +}; 1.361 +static const vorbis_residue_template _res_44p51_4[]={ 1.362 + {2,0,15, &_residue_44p, 1.363 + &_huff_book__44p4_short,&_huff_book__44p4_short, 1.364 + &_resbook_44p_4,&_resbook_44p_4}, 1.365 + 1.366 + {2,0,30, &_residue_44p, 1.367 + &_huff_book__44p4_long,&_huff_book__44p4_long, 1.368 + &_resbook_44p_4,&_resbook_44p_4}, 1.369 + 1.370 + {1,2,6, &_residue_44p_lfe, 1.371 + &_huff_book__44p4_lfe,&_huff_book__44p4_lfe, 1.372 + &_resbook_44p_l4,&_resbook_44p_l4} 1.373 +}; 1.374 +static const vorbis_residue_template _res_44p51_5[]={ 1.375 + {2,0,15, &_residue_44p_hi, 1.376 + &_huff_book__44p5_short,&_huff_book__44p5_short, 1.377 + &_resbook_44p_5,&_resbook_44p_5}, 1.378 + 1.379 + {2,0,30, &_residue_44p_hi, 1.380 + &_huff_book__44p5_long,&_huff_book__44p5_long, 1.381 + &_resbook_44p_5,&_resbook_44p_5}, 1.382 + 1.383 + {1,2,6, &_residue_44p_lfe, 1.384 + &_huff_book__44p5_lfe,&_huff_book__44p5_lfe, 1.385 + &_resbook_44p_l5,&_resbook_44p_l5} 1.386 +}; 1.387 +static const vorbis_residue_template _res_44p51_6[]={ 1.388 + {2,0,15, &_residue_44p_hi, 1.389 + &_huff_book__44p6_short,&_huff_book__44p6_short, 1.390 + &_resbook_44p_6,&_resbook_44p_6}, 1.391 + 1.392 + {2,0,30, &_residue_44p_hi, 1.393 + &_huff_book__44p6_long,&_huff_book__44p6_long, 1.394 + &_resbook_44p_6,&_resbook_44p_6}, 1.395 + 1.396 + {1,2,6, &_residue_44p_lfe, 1.397 + &_huff_book__44p6_lfe,&_huff_book__44p6_lfe, 1.398 + &_resbook_44p_l6,&_resbook_44p_l6} 1.399 +}; 1.400 + 1.401 + 1.402 +static const vorbis_residue_template _res_44p51_7[]={ 1.403 + {2,0,15, &_residue_44p_hi, 1.404 + &_huff_book__44p7_short,&_huff_book__44p7_short, 1.405 + &_resbook_44p_7,&_resbook_44p_7}, 1.406 + 1.407 + {2,0,30, &_residue_44p_hi, 1.408 + &_huff_book__44p7_long,&_huff_book__44p7_long, 1.409 + &_resbook_44p_7,&_resbook_44p_7}, 1.410 + 1.411 + {1,2,6, &_residue_44p_lfe, 1.412 + &_huff_book__44p6_lfe,&_huff_book__44p6_lfe, 1.413 + &_resbook_44p_l6,&_resbook_44p_l6} 1.414 +}; 1.415 +static const vorbis_residue_template _res_44p51_8[]={ 1.416 + {2,0,15, &_residue_44p_hi, 1.417 + &_huff_book__44p8_short,&_huff_book__44p8_short, 1.418 + &_resbook_44p_8,&_resbook_44p_8}, 1.419 + 1.420 + {2,0,30, &_residue_44p_hi, 1.421 + &_huff_book__44p8_long,&_huff_book__44p8_long, 1.422 + &_resbook_44p_8,&_resbook_44p_8}, 1.423 + 1.424 + {1,2,6, &_residue_44p_lfe, 1.425 + &_huff_book__44p6_lfe,&_huff_book__44p6_lfe, 1.426 + &_resbook_44p_l6,&_resbook_44p_l6} 1.427 +}; 1.428 +static const vorbis_residue_template _res_44p51_9[]={ 1.429 + {2,0,15, &_residue_44p_hi, 1.430 + &_huff_book__44p9_short,&_huff_book__44p9_short, 1.431 + &_resbook_44p_9,&_resbook_44p_9}, 1.432 + 1.433 + {2,0,30, &_residue_44p_hi, 1.434 + &_huff_book__44p9_long,&_huff_book__44p9_long, 1.435 + &_resbook_44p_9,&_resbook_44p_9}, 1.436 + 1.437 + {1,2,6, &_residue_44p_lfe, 1.438 + &_huff_book__44p6_lfe,&_huff_book__44p6_lfe, 1.439 + &_resbook_44p_l6,&_resbook_44p_l6} 1.440 +}; 1.441 + 1.442 +static const vorbis_mapping_template _mapres_template_44_51[]={ 1.443 + { _map_nominal_51, _res_44p51_n1 }, /* -1 */ 1.444 + { _map_nominal_51, _res_44p51_0 }, /* 0 */ 1.445 + { _map_nominal_51, _res_44p51_1 }, /* 1 */ 1.446 + { _map_nominal_51, _res_44p51_2 }, /* 2 */ 1.447 + { _map_nominal_51, _res_44p51_3 }, /* 3 */ 1.448 + { _map_nominal_51, _res_44p51_4 }, /* 4 */ 1.449 + { _map_nominal_51u, _res_44p51_5 }, /* 5 */ 1.450 + { _map_nominal_51u, _res_44p51_6 }, /* 6 */ 1.451 + { _map_nominal_51u, _res_44p51_7 }, /* 7 */ 1.452 + { _map_nominal_51u, _res_44p51_8 }, /* 8 */ 1.453 + { _map_nominal_51u, _res_44p51_9 }, /* 9 */ 1.454 +};