dbf-halloween2015

diff libs/vorbis/modes/residue_44u.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_44u.h	Sun Nov 01 00:36:56 2015 +0200
     1.3 @@ -0,0 +1,318 @@
     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-2007             *
    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: residue_44u.h 16962 2010-03-11 07:30:34Z xiphmont $
    1.18 +
    1.19 + ********************************************************************/
    1.20 +
    1.21 +#include "vorbis/codec.h"
    1.22 +#include "backends.h"
    1.23 +#include "books/uncoupled/res_books_uncoupled.h"
    1.24 +
    1.25 +/***** residue backends *********************************************/
    1.26 +
    1.27 +
    1.28 +static const vorbis_info_residue0 _residue_44_low_un={
    1.29 +  0,-1, -1, 8,-1,-1,
    1.30 +  {0},
    1.31 +  {-1},
    1.32 +  {  0,  1,  1,  2,  2,  4, 28},
    1.33 +  { -1, 25, -1, 45, -1, -1, -1}
    1.34 +};
    1.35 +
    1.36 +static const vorbis_info_residue0 _residue_44_mid_un={
    1.37 +  0,-1, -1, 10,-1,-1,
    1.38 +  /* 0   1   2   3   4   5   6   7   8   9 */
    1.39 +  {0},
    1.40 +  {-1},
    1.41 +  {  0,  1,  1,  2,  2,  4,  4, 16, 60},
    1.42 +  { -1, 30, -1, 50, -1, 80, -1, -1, -1}
    1.43 +};
    1.44 +
    1.45 +static const vorbis_info_residue0 _residue_44_hi_un={
    1.46 +  0,-1, -1, 10,-1,-1,
    1.47 +  /* 0   1   2   3   4   5   6   7   8   9 */
    1.48 +  {0},
    1.49 +  {-1},
    1.50 +  {  0,  1,  2,  4,  8, 16, 32, 71,157},
    1.51 +  { -1, -1, -1, -1, -1, -1, -1, -1, -1}
    1.52 +};
    1.53 +
    1.54 +/* mapping conventions:
    1.55 +   only one submap (this would change for efficient 5.1 support for example)*/
    1.56 +/* Four psychoacoustic profiles are used, one for each blocktype */
    1.57 +static const vorbis_info_mapping0 _map_nominal_u[2]={
    1.58 +  {1, {0,0,0,0,0,0}, {0}, {0}, 0,{0},{0}},
    1.59 +  {1, {0,0,0,0,0,0}, {1}, {1}, 0,{0},{0}}
    1.60 +};
    1.61 +
    1.62 +static const static_bookblock _resbook_44u_n1={
    1.63 +  {
    1.64 +    {0},
    1.65 +    {0,0,&_44un1__p1_0},
    1.66 +    {0,0,&_44un1__p2_0},
    1.67 +    {0,0,&_44un1__p3_0},
    1.68 +    {0,0,&_44un1__p4_0},
    1.69 +    {0,0,&_44un1__p5_0},
    1.70 +    {&_44un1__p6_0,&_44un1__p6_1},
    1.71 +    {&_44un1__p7_0,&_44un1__p7_1,&_44un1__p7_2}
    1.72 +   }
    1.73 +};
    1.74 +static const static_bookblock _resbook_44u_0={
    1.75 +  {
    1.76 +    {0},
    1.77 +    {0,0,&_44u0__p1_0},
    1.78 +    {0,0,&_44u0__p2_0},
    1.79 +    {0,0,&_44u0__p3_0},
    1.80 +    {0,0,&_44u0__p4_0},
    1.81 +    {0,0,&_44u0__p5_0},
    1.82 +    {&_44u0__p6_0,&_44u0__p6_1},
    1.83 +    {&_44u0__p7_0,&_44u0__p7_1,&_44u0__p7_2}
    1.84 +   }
    1.85 +};
    1.86 +static const static_bookblock _resbook_44u_1={
    1.87 +  {
    1.88 +    {0},
    1.89 +    {0,0,&_44u1__p1_0},
    1.90 +    {0,0,&_44u1__p2_0},
    1.91 +    {0,0,&_44u1__p3_0},
    1.92 +    {0,0,&_44u1__p4_0},
    1.93 +    {0,0,&_44u1__p5_0},
    1.94 +    {&_44u1__p6_0,&_44u1__p6_1},
    1.95 +    {&_44u1__p7_0,&_44u1__p7_1,&_44u1__p7_2}
    1.96 +   }
    1.97 +};
    1.98 +static const static_bookblock _resbook_44u_2={
    1.99 +  {
   1.100 +    {0},
   1.101 +    {0,0,&_44u2__p1_0},
   1.102 +    {0,0,&_44u2__p2_0},
   1.103 +    {0,0,&_44u2__p3_0},
   1.104 +    {0,0,&_44u2__p4_0},
   1.105 +    {0,0,&_44u2__p5_0},
   1.106 +    {&_44u2__p6_0,&_44u2__p6_1},
   1.107 +    {&_44u2__p7_0,&_44u2__p7_1,&_44u2__p7_2}
   1.108 +   }
   1.109 +};
   1.110 +static const static_bookblock _resbook_44u_3={
   1.111 +  {
   1.112 +    {0},
   1.113 +    {0,0,&_44u3__p1_0},
   1.114 +    {0,0,&_44u3__p2_0},
   1.115 +    {0,0,&_44u3__p3_0},
   1.116 +    {0,0,&_44u3__p4_0},
   1.117 +    {0,0,&_44u3__p5_0},
   1.118 +    {&_44u3__p6_0,&_44u3__p6_1},
   1.119 +    {&_44u3__p7_0,&_44u3__p7_1,&_44u3__p7_2}
   1.120 +   }
   1.121 +};
   1.122 +static const static_bookblock _resbook_44u_4={
   1.123 +  {
   1.124 +    {0},
   1.125 +    {0,0,&_44u4__p1_0},
   1.126 +    {0,0,&_44u4__p2_0},
   1.127 +    {0,0,&_44u4__p3_0},
   1.128 +    {0,0,&_44u4__p4_0},
   1.129 +    {0,0,&_44u4__p5_0},
   1.130 +    {&_44u4__p6_0,&_44u4__p6_1},
   1.131 +    {&_44u4__p7_0,&_44u4__p7_1,&_44u4__p7_2}
   1.132 +   }
   1.133 +};
   1.134 +static const static_bookblock _resbook_44u_5={
   1.135 +  {
   1.136 +    {0},
   1.137 +    {0,0,&_44u5__p1_0},
   1.138 +    {0,0,&_44u5__p2_0},
   1.139 +    {0,0,&_44u5__p3_0},
   1.140 +    {0,0,&_44u5__p4_0},
   1.141 +    {0,0,&_44u5__p5_0},
   1.142 +    {0,0,&_44u5__p6_0},
   1.143 +    {&_44u5__p7_0,&_44u5__p7_1},
   1.144 +    {&_44u5__p8_0,&_44u5__p8_1},
   1.145 +    {&_44u5__p9_0,&_44u5__p9_1,&_44u5__p9_2}
   1.146 +   }
   1.147 +};
   1.148 +static const static_bookblock _resbook_44u_6={
   1.149 +  {
   1.150 +    {0},
   1.151 +    {0,0,&_44u6__p1_0},
   1.152 +    {0,0,&_44u6__p2_0},
   1.153 +    {0,0,&_44u6__p3_0},
   1.154 +    {0,0,&_44u6__p4_0},
   1.155 +    {0,0,&_44u6__p5_0},
   1.156 +    {0,0,&_44u6__p6_0},
   1.157 +    {&_44u6__p7_0,&_44u6__p7_1},
   1.158 +    {&_44u6__p8_0,&_44u6__p8_1},
   1.159 +    {&_44u6__p9_0,&_44u6__p9_1,&_44u6__p9_2}
   1.160 +   }
   1.161 +};
   1.162 +static const static_bookblock _resbook_44u_7={
   1.163 +  {
   1.164 +    {0},
   1.165 +    {0,0,&_44u7__p1_0},
   1.166 +    {0,0,&_44u7__p2_0},
   1.167 +    {0,0,&_44u7__p3_0},
   1.168 +    {0,0,&_44u7__p4_0},
   1.169 +    {0,0,&_44u7__p5_0},
   1.170 +    {0,0,&_44u7__p6_0},
   1.171 +    {&_44u7__p7_0,&_44u7__p7_1},
   1.172 +    {&_44u7__p8_0,&_44u7__p8_1},
   1.173 +    {&_44u7__p9_0,&_44u7__p9_1,&_44u7__p9_2}
   1.174 +   }
   1.175 +};
   1.176 +static const static_bookblock _resbook_44u_8={
   1.177 +  {
   1.178 +    {0},
   1.179 +    {0,0,&_44u8_p1_0},
   1.180 +    {0,0,&_44u8_p2_0},
   1.181 +    {0,0,&_44u8_p3_0},
   1.182 +    {0,0,&_44u8_p4_0},
   1.183 +    {&_44u8_p5_0,&_44u8_p5_1},
   1.184 +    {&_44u8_p6_0,&_44u8_p6_1},
   1.185 +    {&_44u8_p7_0,&_44u8_p7_1},
   1.186 +    {&_44u8_p8_0,&_44u8_p8_1},
   1.187 +    {&_44u8_p9_0,&_44u8_p9_1,&_44u8_p9_2}
   1.188 +   }
   1.189 +};
   1.190 +static const static_bookblock _resbook_44u_9={
   1.191 +  {
   1.192 +    {0},
   1.193 +    {0,0,&_44u9_p1_0},
   1.194 +    {0,0,&_44u9_p2_0},
   1.195 +    {0,0,&_44u9_p3_0},
   1.196 +    {0,0,&_44u9_p4_0},
   1.197 +    {&_44u9_p5_0,&_44u9_p5_1},
   1.198 +    {&_44u9_p6_0,&_44u9_p6_1},
   1.199 +    {&_44u9_p7_0,&_44u9_p7_1},
   1.200 +    {&_44u9_p8_0,&_44u9_p8_1},
   1.201 +    {&_44u9_p9_0,&_44u9_p9_1,&_44u9_p9_2}
   1.202 +   }
   1.203 +};
   1.204 +
   1.205 +static const vorbis_residue_template _res_44u_n1[]={
   1.206 +  {1,0,32,  &_residue_44_low_un,
   1.207 +   &_huff_book__44un1__short,&_huff_book__44un1__short,
   1.208 +   &_resbook_44u_n1,&_resbook_44u_n1},
   1.209 +
   1.210 +  {1,0,32,  &_residue_44_low_un,
   1.211 +   &_huff_book__44un1__long,&_huff_book__44un1__long,
   1.212 +   &_resbook_44u_n1,&_resbook_44u_n1}
   1.213 +};
   1.214 +static const vorbis_residue_template _res_44u_0[]={
   1.215 +  {1,0,16,  &_residue_44_low_un,
   1.216 +   &_huff_book__44u0__short,&_huff_book__44u0__short,
   1.217 +   &_resbook_44u_0,&_resbook_44u_0},
   1.218 +
   1.219 +  {1,0,32,  &_residue_44_low_un,
   1.220 +   &_huff_book__44u0__long,&_huff_book__44u0__long,
   1.221 +   &_resbook_44u_0,&_resbook_44u_0}
   1.222 +};
   1.223 +static const vorbis_residue_template _res_44u_1[]={
   1.224 +  {1,0,16,  &_residue_44_low_un,
   1.225 +   &_huff_book__44u1__short,&_huff_book__44u1__short,
   1.226 +   &_resbook_44u_1,&_resbook_44u_1},
   1.227 +
   1.228 +  {1,0,32,  &_residue_44_low_un,
   1.229 +   &_huff_book__44u1__long,&_huff_book__44u1__long,
   1.230 +   &_resbook_44u_1,&_resbook_44u_1}
   1.231 +};
   1.232 +static const vorbis_residue_template _res_44u_2[]={
   1.233 +  {1,0,16,  &_residue_44_low_un,
   1.234 +   &_huff_book__44u2__short,&_huff_book__44u2__short,
   1.235 +   &_resbook_44u_2,&_resbook_44u_2},
   1.236 +
   1.237 +  {1,0,32,  &_residue_44_low_un,
   1.238 +   &_huff_book__44u2__long,&_huff_book__44u2__long,
   1.239 +   &_resbook_44u_2,&_resbook_44u_2}
   1.240 +};
   1.241 +static const vorbis_residue_template _res_44u_3[]={
   1.242 +  {1,0,16,  &_residue_44_low_un,
   1.243 +   &_huff_book__44u3__short,&_huff_book__44u3__short,
   1.244 +   &_resbook_44u_3,&_resbook_44u_3},
   1.245 +
   1.246 +  {1,0,32,  &_residue_44_low_un,
   1.247 +   &_huff_book__44u3__long,&_huff_book__44u3__long,
   1.248 +   &_resbook_44u_3,&_resbook_44u_3}
   1.249 +};
   1.250 +static const vorbis_residue_template _res_44u_4[]={
   1.251 +  {1,0,16,  &_residue_44_low_un,
   1.252 +   &_huff_book__44u4__short,&_huff_book__44u4__short,
   1.253 +   &_resbook_44u_4,&_resbook_44u_4},
   1.254 +
   1.255 +  {1,0,32,  &_residue_44_low_un,
   1.256 +   &_huff_book__44u4__long,&_huff_book__44u4__long,
   1.257 +   &_resbook_44u_4,&_resbook_44u_4}
   1.258 +};
   1.259 +
   1.260 +static const vorbis_residue_template _res_44u_5[]={
   1.261 +  {1,0,16,  &_residue_44_mid_un,
   1.262 +   &_huff_book__44u5__short,&_huff_book__44u5__short,
   1.263 +   &_resbook_44u_5,&_resbook_44u_5},
   1.264 +
   1.265 +  {1,0,32,  &_residue_44_mid_un,
   1.266 +   &_huff_book__44u5__long,&_huff_book__44u5__long,
   1.267 +   &_resbook_44u_5,&_resbook_44u_5}
   1.268 +};
   1.269 +
   1.270 +static const vorbis_residue_template _res_44u_6[]={
   1.271 +  {1,0,16,  &_residue_44_mid_un,
   1.272 +   &_huff_book__44u6__short,&_huff_book__44u6__short,
   1.273 +   &_resbook_44u_6,&_resbook_44u_6},
   1.274 +
   1.275 +  {1,0,32,  &_residue_44_mid_un,
   1.276 +   &_huff_book__44u6__long,&_huff_book__44u6__long,
   1.277 +   &_resbook_44u_6,&_resbook_44u_6}
   1.278 +};
   1.279 +
   1.280 +static const vorbis_residue_template _res_44u_7[]={
   1.281 +  {1,0,16,  &_residue_44_mid_un,
   1.282 +   &_huff_book__44u7__short,&_huff_book__44u7__short,
   1.283 +   &_resbook_44u_7,&_resbook_44u_7},
   1.284 +
   1.285 +  {1,0,32,  &_residue_44_mid_un,
   1.286 +   &_huff_book__44u7__long,&_huff_book__44u7__long,
   1.287 +   &_resbook_44u_7,&_resbook_44u_7}
   1.288 +};
   1.289 +
   1.290 +static const vorbis_residue_template _res_44u_8[]={
   1.291 +  {1,0,16,  &_residue_44_hi_un,
   1.292 +   &_huff_book__44u8__short,&_huff_book__44u8__short,
   1.293 +   &_resbook_44u_8,&_resbook_44u_8},
   1.294 +
   1.295 +  {1,0,32,  &_residue_44_hi_un,
   1.296 +   &_huff_book__44u8__long,&_huff_book__44u8__long,
   1.297 +   &_resbook_44u_8,&_resbook_44u_8}
   1.298 +};
   1.299 +static const vorbis_residue_template _res_44u_9[]={
   1.300 +  {1,0,16,  &_residue_44_hi_un,
   1.301 +   &_huff_book__44u9__short,&_huff_book__44u9__short,
   1.302 +   &_resbook_44u_9,&_resbook_44u_9},
   1.303 +
   1.304 +  {1,0,32,  &_residue_44_hi_un,
   1.305 +   &_huff_book__44u9__long,&_huff_book__44u9__long,
   1.306 +   &_resbook_44u_9,&_resbook_44u_9}
   1.307 +};
   1.308 +
   1.309 +static const vorbis_mapping_template _mapres_template_44_uncoupled[]={
   1.310 +  { _map_nominal_u, _res_44u_n1 }, /* -1 */
   1.311 +  { _map_nominal_u, _res_44u_0 }, /* 0 */
   1.312 +  { _map_nominal_u, _res_44u_1 }, /* 1 */
   1.313 +  { _map_nominal_u, _res_44u_2 }, /* 2 */
   1.314 +  { _map_nominal_u, _res_44u_3 }, /* 3 */
   1.315 +  { _map_nominal_u, _res_44u_4 }, /* 4 */
   1.316 +  { _map_nominal_u, _res_44u_5 }, /* 5 */
   1.317 +  { _map_nominal_u, _res_44u_6 }, /* 6 */
   1.318 +  { _map_nominal_u, _res_44u_7 }, /* 7 */
   1.319 +  { _map_nominal_u, _res_44u_8 }, /* 8 */
   1.320 +  { _map_nominal_u, _res_44u_9 }, /* 9 */
   1.321 +};