media/libvorbis/lib/modes/residue_44u.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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-2007 *
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: toplevel residue templates for 32/44.1/48kHz uncoupled
michael@0 14 last mod: $Id: residue_44u.h 16962 2010-03-11 07:30:34Z 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/uncoupled/res_books_uncoupled.h"
michael@0 21
michael@0 22 /***** residue backends *********************************************/
michael@0 23
michael@0 24
michael@0 25 static const vorbis_info_residue0 _residue_44_low_un={
michael@0 26 0,-1, -1, 8,-1,-1,
michael@0 27 {0},
michael@0 28 {-1},
michael@0 29 { 0, 1, 1, 2, 2, 4, 28},
michael@0 30 { -1, 25, -1, 45, -1, -1, -1}
michael@0 31 };
michael@0 32
michael@0 33 static const vorbis_info_residue0 _residue_44_mid_un={
michael@0 34 0,-1, -1, 10,-1,-1,
michael@0 35 /* 0 1 2 3 4 5 6 7 8 9 */
michael@0 36 {0},
michael@0 37 {-1},
michael@0 38 { 0, 1, 1, 2, 2, 4, 4, 16, 60},
michael@0 39 { -1, 30, -1, 50, -1, 80, -1, -1, -1}
michael@0 40 };
michael@0 41
michael@0 42 static const vorbis_info_residue0 _residue_44_hi_un={
michael@0 43 0,-1, -1, 10,-1,-1,
michael@0 44 /* 0 1 2 3 4 5 6 7 8 9 */
michael@0 45 {0},
michael@0 46 {-1},
michael@0 47 { 0, 1, 2, 4, 8, 16, 32, 71,157},
michael@0 48 { -1, -1, -1, -1, -1, -1, -1, -1, -1}
michael@0 49 };
michael@0 50
michael@0 51 /* mapping conventions:
michael@0 52 only one submap (this would change for efficient 5.1 support for example)*/
michael@0 53 /* Four psychoacoustic profiles are used, one for each blocktype */
michael@0 54 static const vorbis_info_mapping0 _map_nominal_u[2]={
michael@0 55 {1, {0,0,0,0,0,0}, {0}, {0}, 0,{0},{0}},
michael@0 56 {1, {0,0,0,0,0,0}, {1}, {1}, 0,{0},{0}}
michael@0 57 };
michael@0 58
michael@0 59 static const static_bookblock _resbook_44u_n1={
michael@0 60 {
michael@0 61 {0},
michael@0 62 {0,0,&_44un1__p1_0},
michael@0 63 {0,0,&_44un1__p2_0},
michael@0 64 {0,0,&_44un1__p3_0},
michael@0 65 {0,0,&_44un1__p4_0},
michael@0 66 {0,0,&_44un1__p5_0},
michael@0 67 {&_44un1__p6_0,&_44un1__p6_1},
michael@0 68 {&_44un1__p7_0,&_44un1__p7_1,&_44un1__p7_2}
michael@0 69 }
michael@0 70 };
michael@0 71 static const static_bookblock _resbook_44u_0={
michael@0 72 {
michael@0 73 {0},
michael@0 74 {0,0,&_44u0__p1_0},
michael@0 75 {0,0,&_44u0__p2_0},
michael@0 76 {0,0,&_44u0__p3_0},
michael@0 77 {0,0,&_44u0__p4_0},
michael@0 78 {0,0,&_44u0__p5_0},
michael@0 79 {&_44u0__p6_0,&_44u0__p6_1},
michael@0 80 {&_44u0__p7_0,&_44u0__p7_1,&_44u0__p7_2}
michael@0 81 }
michael@0 82 };
michael@0 83 static const static_bookblock _resbook_44u_1={
michael@0 84 {
michael@0 85 {0},
michael@0 86 {0,0,&_44u1__p1_0},
michael@0 87 {0,0,&_44u1__p2_0},
michael@0 88 {0,0,&_44u1__p3_0},
michael@0 89 {0,0,&_44u1__p4_0},
michael@0 90 {0,0,&_44u1__p5_0},
michael@0 91 {&_44u1__p6_0,&_44u1__p6_1},
michael@0 92 {&_44u1__p7_0,&_44u1__p7_1,&_44u1__p7_2}
michael@0 93 }
michael@0 94 };
michael@0 95 static const static_bookblock _resbook_44u_2={
michael@0 96 {
michael@0 97 {0},
michael@0 98 {0,0,&_44u2__p1_0},
michael@0 99 {0,0,&_44u2__p2_0},
michael@0 100 {0,0,&_44u2__p3_0},
michael@0 101 {0,0,&_44u2__p4_0},
michael@0 102 {0,0,&_44u2__p5_0},
michael@0 103 {&_44u2__p6_0,&_44u2__p6_1},
michael@0 104 {&_44u2__p7_0,&_44u2__p7_1,&_44u2__p7_2}
michael@0 105 }
michael@0 106 };
michael@0 107 static const static_bookblock _resbook_44u_3={
michael@0 108 {
michael@0 109 {0},
michael@0 110 {0,0,&_44u3__p1_0},
michael@0 111 {0,0,&_44u3__p2_0},
michael@0 112 {0,0,&_44u3__p3_0},
michael@0 113 {0,0,&_44u3__p4_0},
michael@0 114 {0,0,&_44u3__p5_0},
michael@0 115 {&_44u3__p6_0,&_44u3__p6_1},
michael@0 116 {&_44u3__p7_0,&_44u3__p7_1,&_44u3__p7_2}
michael@0 117 }
michael@0 118 };
michael@0 119 static const static_bookblock _resbook_44u_4={
michael@0 120 {
michael@0 121 {0},
michael@0 122 {0,0,&_44u4__p1_0},
michael@0 123 {0,0,&_44u4__p2_0},
michael@0 124 {0,0,&_44u4__p3_0},
michael@0 125 {0,0,&_44u4__p4_0},
michael@0 126 {0,0,&_44u4__p5_0},
michael@0 127 {&_44u4__p6_0,&_44u4__p6_1},
michael@0 128 {&_44u4__p7_0,&_44u4__p7_1,&_44u4__p7_2}
michael@0 129 }
michael@0 130 };
michael@0 131 static const static_bookblock _resbook_44u_5={
michael@0 132 {
michael@0 133 {0},
michael@0 134 {0,0,&_44u5__p1_0},
michael@0 135 {0,0,&_44u5__p2_0},
michael@0 136 {0,0,&_44u5__p3_0},
michael@0 137 {0,0,&_44u5__p4_0},
michael@0 138 {0,0,&_44u5__p5_0},
michael@0 139 {0,0,&_44u5__p6_0},
michael@0 140 {&_44u5__p7_0,&_44u5__p7_1},
michael@0 141 {&_44u5__p8_0,&_44u5__p8_1},
michael@0 142 {&_44u5__p9_0,&_44u5__p9_1,&_44u5__p9_2}
michael@0 143 }
michael@0 144 };
michael@0 145 static const static_bookblock _resbook_44u_6={
michael@0 146 {
michael@0 147 {0},
michael@0 148 {0,0,&_44u6__p1_0},
michael@0 149 {0,0,&_44u6__p2_0},
michael@0 150 {0,0,&_44u6__p3_0},
michael@0 151 {0,0,&_44u6__p4_0},
michael@0 152 {0,0,&_44u6__p5_0},
michael@0 153 {0,0,&_44u6__p6_0},
michael@0 154 {&_44u6__p7_0,&_44u6__p7_1},
michael@0 155 {&_44u6__p8_0,&_44u6__p8_1},
michael@0 156 {&_44u6__p9_0,&_44u6__p9_1,&_44u6__p9_2}
michael@0 157 }
michael@0 158 };
michael@0 159 static const static_bookblock _resbook_44u_7={
michael@0 160 {
michael@0 161 {0},
michael@0 162 {0,0,&_44u7__p1_0},
michael@0 163 {0,0,&_44u7__p2_0},
michael@0 164 {0,0,&_44u7__p3_0},
michael@0 165 {0,0,&_44u7__p4_0},
michael@0 166 {0,0,&_44u7__p5_0},
michael@0 167 {0,0,&_44u7__p6_0},
michael@0 168 {&_44u7__p7_0,&_44u7__p7_1},
michael@0 169 {&_44u7__p8_0,&_44u7__p8_1},
michael@0 170 {&_44u7__p9_0,&_44u7__p9_1,&_44u7__p9_2}
michael@0 171 }
michael@0 172 };
michael@0 173 static const static_bookblock _resbook_44u_8={
michael@0 174 {
michael@0 175 {0},
michael@0 176 {0,0,&_44u8_p1_0},
michael@0 177 {0,0,&_44u8_p2_0},
michael@0 178 {0,0,&_44u8_p3_0},
michael@0 179 {0,0,&_44u8_p4_0},
michael@0 180 {&_44u8_p5_0,&_44u8_p5_1},
michael@0 181 {&_44u8_p6_0,&_44u8_p6_1},
michael@0 182 {&_44u8_p7_0,&_44u8_p7_1},
michael@0 183 {&_44u8_p8_0,&_44u8_p8_1},
michael@0 184 {&_44u8_p9_0,&_44u8_p9_1,&_44u8_p9_2}
michael@0 185 }
michael@0 186 };
michael@0 187 static const static_bookblock _resbook_44u_9={
michael@0 188 {
michael@0 189 {0},
michael@0 190 {0,0,&_44u9_p1_0},
michael@0 191 {0,0,&_44u9_p2_0},
michael@0 192 {0,0,&_44u9_p3_0},
michael@0 193 {0,0,&_44u9_p4_0},
michael@0 194 {&_44u9_p5_0,&_44u9_p5_1},
michael@0 195 {&_44u9_p6_0,&_44u9_p6_1},
michael@0 196 {&_44u9_p7_0,&_44u9_p7_1},
michael@0 197 {&_44u9_p8_0,&_44u9_p8_1},
michael@0 198 {&_44u9_p9_0,&_44u9_p9_1,&_44u9_p9_2}
michael@0 199 }
michael@0 200 };
michael@0 201
michael@0 202 static const vorbis_residue_template _res_44u_n1[]={
michael@0 203 {1,0,32, &_residue_44_low_un,
michael@0 204 &_huff_book__44un1__short,&_huff_book__44un1__short,
michael@0 205 &_resbook_44u_n1,&_resbook_44u_n1},
michael@0 206
michael@0 207 {1,0,32, &_residue_44_low_un,
michael@0 208 &_huff_book__44un1__long,&_huff_book__44un1__long,
michael@0 209 &_resbook_44u_n1,&_resbook_44u_n1}
michael@0 210 };
michael@0 211 static const vorbis_residue_template _res_44u_0[]={
michael@0 212 {1,0,16, &_residue_44_low_un,
michael@0 213 &_huff_book__44u0__short,&_huff_book__44u0__short,
michael@0 214 &_resbook_44u_0,&_resbook_44u_0},
michael@0 215
michael@0 216 {1,0,32, &_residue_44_low_un,
michael@0 217 &_huff_book__44u0__long,&_huff_book__44u0__long,
michael@0 218 &_resbook_44u_0,&_resbook_44u_0}
michael@0 219 };
michael@0 220 static const vorbis_residue_template _res_44u_1[]={
michael@0 221 {1,0,16, &_residue_44_low_un,
michael@0 222 &_huff_book__44u1__short,&_huff_book__44u1__short,
michael@0 223 &_resbook_44u_1,&_resbook_44u_1},
michael@0 224
michael@0 225 {1,0,32, &_residue_44_low_un,
michael@0 226 &_huff_book__44u1__long,&_huff_book__44u1__long,
michael@0 227 &_resbook_44u_1,&_resbook_44u_1}
michael@0 228 };
michael@0 229 static const vorbis_residue_template _res_44u_2[]={
michael@0 230 {1,0,16, &_residue_44_low_un,
michael@0 231 &_huff_book__44u2__short,&_huff_book__44u2__short,
michael@0 232 &_resbook_44u_2,&_resbook_44u_2},
michael@0 233
michael@0 234 {1,0,32, &_residue_44_low_un,
michael@0 235 &_huff_book__44u2__long,&_huff_book__44u2__long,
michael@0 236 &_resbook_44u_2,&_resbook_44u_2}
michael@0 237 };
michael@0 238 static const vorbis_residue_template _res_44u_3[]={
michael@0 239 {1,0,16, &_residue_44_low_un,
michael@0 240 &_huff_book__44u3__short,&_huff_book__44u3__short,
michael@0 241 &_resbook_44u_3,&_resbook_44u_3},
michael@0 242
michael@0 243 {1,0,32, &_residue_44_low_un,
michael@0 244 &_huff_book__44u3__long,&_huff_book__44u3__long,
michael@0 245 &_resbook_44u_3,&_resbook_44u_3}
michael@0 246 };
michael@0 247 static const vorbis_residue_template _res_44u_4[]={
michael@0 248 {1,0,16, &_residue_44_low_un,
michael@0 249 &_huff_book__44u4__short,&_huff_book__44u4__short,
michael@0 250 &_resbook_44u_4,&_resbook_44u_4},
michael@0 251
michael@0 252 {1,0,32, &_residue_44_low_un,
michael@0 253 &_huff_book__44u4__long,&_huff_book__44u4__long,
michael@0 254 &_resbook_44u_4,&_resbook_44u_4}
michael@0 255 };
michael@0 256
michael@0 257 static const vorbis_residue_template _res_44u_5[]={
michael@0 258 {1,0,16, &_residue_44_mid_un,
michael@0 259 &_huff_book__44u5__short,&_huff_book__44u5__short,
michael@0 260 &_resbook_44u_5,&_resbook_44u_5},
michael@0 261
michael@0 262 {1,0,32, &_residue_44_mid_un,
michael@0 263 &_huff_book__44u5__long,&_huff_book__44u5__long,
michael@0 264 &_resbook_44u_5,&_resbook_44u_5}
michael@0 265 };
michael@0 266
michael@0 267 static const vorbis_residue_template _res_44u_6[]={
michael@0 268 {1,0,16, &_residue_44_mid_un,
michael@0 269 &_huff_book__44u6__short,&_huff_book__44u6__short,
michael@0 270 &_resbook_44u_6,&_resbook_44u_6},
michael@0 271
michael@0 272 {1,0,32, &_residue_44_mid_un,
michael@0 273 &_huff_book__44u6__long,&_huff_book__44u6__long,
michael@0 274 &_resbook_44u_6,&_resbook_44u_6}
michael@0 275 };
michael@0 276
michael@0 277 static const vorbis_residue_template _res_44u_7[]={
michael@0 278 {1,0,16, &_residue_44_mid_un,
michael@0 279 &_huff_book__44u7__short,&_huff_book__44u7__short,
michael@0 280 &_resbook_44u_7,&_resbook_44u_7},
michael@0 281
michael@0 282 {1,0,32, &_residue_44_mid_un,
michael@0 283 &_huff_book__44u7__long,&_huff_book__44u7__long,
michael@0 284 &_resbook_44u_7,&_resbook_44u_7}
michael@0 285 };
michael@0 286
michael@0 287 static const vorbis_residue_template _res_44u_8[]={
michael@0 288 {1,0,16, &_residue_44_hi_un,
michael@0 289 &_huff_book__44u8__short,&_huff_book__44u8__short,
michael@0 290 &_resbook_44u_8,&_resbook_44u_8},
michael@0 291
michael@0 292 {1,0,32, &_residue_44_hi_un,
michael@0 293 &_huff_book__44u8__long,&_huff_book__44u8__long,
michael@0 294 &_resbook_44u_8,&_resbook_44u_8}
michael@0 295 };
michael@0 296 static const vorbis_residue_template _res_44u_9[]={
michael@0 297 {1,0,16, &_residue_44_hi_un,
michael@0 298 &_huff_book__44u9__short,&_huff_book__44u9__short,
michael@0 299 &_resbook_44u_9,&_resbook_44u_9},
michael@0 300
michael@0 301 {1,0,32, &_residue_44_hi_un,
michael@0 302 &_huff_book__44u9__long,&_huff_book__44u9__long,
michael@0 303 &_resbook_44u_9,&_resbook_44u_9}
michael@0 304 };
michael@0 305
michael@0 306 static const vorbis_mapping_template _mapres_template_44_uncoupled[]={
michael@0 307 { _map_nominal_u, _res_44u_n1 }, /* -1 */
michael@0 308 { _map_nominal_u, _res_44u_0 }, /* 0 */
michael@0 309 { _map_nominal_u, _res_44u_1 }, /* 1 */
michael@0 310 { _map_nominal_u, _res_44u_2 }, /* 2 */
michael@0 311 { _map_nominal_u, _res_44u_3 }, /* 3 */
michael@0 312 { _map_nominal_u, _res_44u_4 }, /* 4 */
michael@0 313 { _map_nominal_u, _res_44u_5 }, /* 5 */
michael@0 314 { _map_nominal_u, _res_44u_6 }, /* 6 */
michael@0 315 { _map_nominal_u, _res_44u_7 }, /* 7 */
michael@0 316 { _map_nominal_u, _res_44u_8 }, /* 8 */
michael@0 317 { _map_nominal_u, _res_44u_9 }, /* 9 */
michael@0 318 };

mercurial