media/libvorbis/lib/modes/residue_44.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-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: toplevel residue templates for 32/44.1/48kHz
michael@0 14 last mod: $Id: residue_44.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/coupled/res_books_stereo.h"
michael@0 21
michael@0 22 /***** residue backends *********************************************/
michael@0 23
michael@0 24 static const vorbis_info_residue0 _residue_44_low={
michael@0 25 0,-1, -1, 9,-1,-1,
michael@0 26 /* 0 1 2 3 4 5 6 7 */
michael@0 27 {0},
michael@0 28 {-1},
michael@0 29 { 0, 1, 2, 2, 4, 8, 16, 32},
michael@0 30 { 0, 0, 0,999, 4, 8, 16, 32},
michael@0 31 };
michael@0 32
michael@0 33 static const vorbis_info_residue0 _residue_44_mid={
michael@0 34 0,-1, -1, 10,-1,-1,
michael@0 35 /* 0 1 2 3 4 5 6 7 8 */
michael@0 36 {0},
michael@0 37 {-1},
michael@0 38 { 0, 1, 1, 2, 2, 4, 8, 16, 32},
michael@0 39 { 0, 0,999, 0,999, 4, 8, 16, 32},
michael@0 40 };
michael@0 41
michael@0 42 static const vorbis_info_residue0 _residue_44_high={
michael@0 43 0,-1, -1, 10,-1,-1,
michael@0 44 /* 0 1 2 3 4 5 6 7 8 */
michael@0 45 {0},
michael@0 46 {-1},
michael@0 47 { 0, 1, 2, 4, 8, 16, 32, 71,157},
michael@0 48 { 0, 1, 2, 3, 4, 8, 16, 71,157},
michael@0 49 };
michael@0 50
michael@0 51 static const static_bookblock _resbook_44s_n1={
michael@0 52 {
michael@0 53 {0},{0,0,&_44cn1_s_p1_0},{0,0,&_44cn1_s_p2_0},
michael@0 54 {0,0,&_44cn1_s_p3_0},{0,0,&_44cn1_s_p4_0},{0,0,&_44cn1_s_p5_0},
michael@0 55 {&_44cn1_s_p6_0,&_44cn1_s_p6_1},{&_44cn1_s_p7_0,&_44cn1_s_p7_1},
michael@0 56 {&_44cn1_s_p8_0,&_44cn1_s_p8_1,&_44cn1_s_p8_2}
michael@0 57 }
michael@0 58 };
michael@0 59 static const static_bookblock _resbook_44sm_n1={
michael@0 60 {
michael@0 61 {0},{0,0,&_44cn1_sm_p1_0},{0,0,&_44cn1_sm_p2_0},
michael@0 62 {0,0,&_44cn1_sm_p3_0},{0,0,&_44cn1_sm_p4_0},{0,0,&_44cn1_sm_p5_0},
michael@0 63 {&_44cn1_sm_p6_0,&_44cn1_sm_p6_1},{&_44cn1_sm_p7_0,&_44cn1_sm_p7_1},
michael@0 64 {&_44cn1_sm_p8_0,&_44cn1_sm_p8_1,&_44cn1_sm_p8_2}
michael@0 65 }
michael@0 66 };
michael@0 67
michael@0 68 static const static_bookblock _resbook_44s_0={
michael@0 69 {
michael@0 70 {0},{0,0,&_44c0_s_p1_0},{0,0,&_44c0_s_p2_0},
michael@0 71 {0,0,&_44c0_s_p3_0},{0,0,&_44c0_s_p4_0},{0,0,&_44c0_s_p5_0},
michael@0 72 {&_44c0_s_p6_0,&_44c0_s_p6_1},{&_44c0_s_p7_0,&_44c0_s_p7_1},
michael@0 73 {&_44c0_s_p8_0,&_44c0_s_p8_1,&_44c0_s_p8_2}
michael@0 74 }
michael@0 75 };
michael@0 76 static const static_bookblock _resbook_44sm_0={
michael@0 77 {
michael@0 78 {0},{0,0,&_44c0_sm_p1_0},{0,0,&_44c0_sm_p2_0},
michael@0 79 {0,0,&_44c0_sm_p3_0},{0,0,&_44c0_sm_p4_0},{0,0,&_44c0_sm_p5_0},
michael@0 80 {&_44c0_sm_p6_0,&_44c0_sm_p6_1},{&_44c0_sm_p7_0,&_44c0_sm_p7_1},
michael@0 81 {&_44c0_sm_p8_0,&_44c0_sm_p8_1,&_44c0_sm_p8_2}
michael@0 82 }
michael@0 83 };
michael@0 84
michael@0 85 static const static_bookblock _resbook_44s_1={
michael@0 86 {
michael@0 87 {0},{0,0,&_44c1_s_p1_0},{0,0,&_44c1_s_p2_0},
michael@0 88 {0,0,&_44c1_s_p3_0},{0,0,&_44c1_s_p4_0},{0,0,&_44c1_s_p5_0},
michael@0 89 {&_44c1_s_p6_0,&_44c1_s_p6_1},{&_44c1_s_p7_0,&_44c1_s_p7_1},
michael@0 90 {&_44c1_s_p8_0,&_44c1_s_p8_1,&_44c1_s_p8_2}
michael@0 91 }
michael@0 92 };
michael@0 93 static const static_bookblock _resbook_44sm_1={
michael@0 94 {
michael@0 95 {0},{0,0,&_44c1_sm_p1_0},{0,0,&_44c1_sm_p2_0},
michael@0 96 {0,0,&_44c1_sm_p3_0},{0,0,&_44c1_sm_p4_0},{0,0,&_44c1_sm_p5_0},
michael@0 97 {&_44c1_sm_p6_0,&_44c1_sm_p6_1},{&_44c1_sm_p7_0,&_44c1_sm_p7_1},
michael@0 98 {&_44c1_sm_p8_0,&_44c1_sm_p8_1,&_44c1_sm_p8_2}
michael@0 99 }
michael@0 100 };
michael@0 101
michael@0 102 static const static_bookblock _resbook_44s_2={
michael@0 103 {
michael@0 104 {0},{0,0,&_44c2_s_p1_0},{0,0,&_44c2_s_p2_0},{0,0,&_44c2_s_p3_0},
michael@0 105 {0,0,&_44c2_s_p4_0},{0,0,&_44c2_s_p5_0},{0,0,&_44c2_s_p6_0},
michael@0 106 {&_44c2_s_p7_0,&_44c2_s_p7_1},{&_44c2_s_p8_0,&_44c2_s_p8_1},
michael@0 107 {&_44c2_s_p9_0,&_44c2_s_p9_1,&_44c2_s_p9_2}
michael@0 108 }
michael@0 109 };
michael@0 110 static const static_bookblock _resbook_44s_3={
michael@0 111 {
michael@0 112 {0},{0,0,&_44c3_s_p1_0},{0,0,&_44c3_s_p2_0},{0,0,&_44c3_s_p3_0},
michael@0 113 {0,0,&_44c3_s_p4_0},{0,0,&_44c3_s_p5_0},{0,0,&_44c3_s_p6_0},
michael@0 114 {&_44c3_s_p7_0,&_44c3_s_p7_1},{&_44c3_s_p8_0,&_44c3_s_p8_1},
michael@0 115 {&_44c3_s_p9_0,&_44c3_s_p9_1,&_44c3_s_p9_2}
michael@0 116 }
michael@0 117 };
michael@0 118 static const static_bookblock _resbook_44s_4={
michael@0 119 {
michael@0 120 {0},{0,0,&_44c4_s_p1_0},{0,0,&_44c4_s_p2_0},{0,0,&_44c4_s_p3_0},
michael@0 121 {0,0,&_44c4_s_p4_0},{0,0,&_44c4_s_p5_0},{0,0,&_44c4_s_p6_0},
michael@0 122 {&_44c4_s_p7_0,&_44c4_s_p7_1},{&_44c4_s_p8_0,&_44c4_s_p8_1},
michael@0 123 {&_44c4_s_p9_0,&_44c4_s_p9_1,&_44c4_s_p9_2}
michael@0 124 }
michael@0 125 };
michael@0 126 static const static_bookblock _resbook_44s_5={
michael@0 127 {
michael@0 128 {0},{0,0,&_44c5_s_p1_0},{0,0,&_44c5_s_p2_0},{0,0,&_44c5_s_p3_0},
michael@0 129 {0,0,&_44c5_s_p4_0},{0,0,&_44c5_s_p5_0},{0,0,&_44c5_s_p6_0},
michael@0 130 {&_44c5_s_p7_0,&_44c5_s_p7_1},{&_44c5_s_p8_0,&_44c5_s_p8_1},
michael@0 131 {&_44c5_s_p9_0,&_44c5_s_p9_1,&_44c5_s_p9_2}
michael@0 132 }
michael@0 133 };
michael@0 134 static const static_bookblock _resbook_44s_6={
michael@0 135 {
michael@0 136 {0},{0,0,&_44c6_s_p1_0},{0,0,&_44c6_s_p2_0},{0,0,&_44c6_s_p3_0},
michael@0 137 {0,0,&_44c6_s_p4_0},
michael@0 138 {&_44c6_s_p5_0,&_44c6_s_p5_1},
michael@0 139 {&_44c6_s_p6_0,&_44c6_s_p6_1},
michael@0 140 {&_44c6_s_p7_0,&_44c6_s_p7_1},
michael@0 141 {&_44c6_s_p8_0,&_44c6_s_p8_1},
michael@0 142 {&_44c6_s_p9_0,&_44c6_s_p9_1,&_44c6_s_p9_2}
michael@0 143 }
michael@0 144 };
michael@0 145 static const static_bookblock _resbook_44s_7={
michael@0 146 {
michael@0 147 {0},{0,0,&_44c7_s_p1_0},{0,0,&_44c7_s_p2_0},{0,0,&_44c7_s_p3_0},
michael@0 148 {0,0,&_44c7_s_p4_0},
michael@0 149 {&_44c7_s_p5_0,&_44c7_s_p5_1},
michael@0 150 {&_44c7_s_p6_0,&_44c7_s_p6_1},
michael@0 151 {&_44c7_s_p7_0,&_44c7_s_p7_1},
michael@0 152 {&_44c7_s_p8_0,&_44c7_s_p8_1},
michael@0 153 {&_44c7_s_p9_0,&_44c7_s_p9_1,&_44c7_s_p9_2}
michael@0 154 }
michael@0 155 };
michael@0 156 static const static_bookblock _resbook_44s_8={
michael@0 157 {
michael@0 158 {0},{0,0,&_44c8_s_p1_0},{0,0,&_44c8_s_p2_0},{0,0,&_44c8_s_p3_0},
michael@0 159 {0,0,&_44c8_s_p4_0},
michael@0 160 {&_44c8_s_p5_0,&_44c8_s_p5_1},
michael@0 161 {&_44c8_s_p6_0,&_44c8_s_p6_1},
michael@0 162 {&_44c8_s_p7_0,&_44c8_s_p7_1},
michael@0 163 {&_44c8_s_p8_0,&_44c8_s_p8_1},
michael@0 164 {&_44c8_s_p9_0,&_44c8_s_p9_1,&_44c8_s_p9_2}
michael@0 165 }
michael@0 166 };
michael@0 167 static const static_bookblock _resbook_44s_9={
michael@0 168 {
michael@0 169 {0},{0,0,&_44c9_s_p1_0},{0,0,&_44c9_s_p2_0},{0,0,&_44c9_s_p3_0},
michael@0 170 {0,0,&_44c9_s_p4_0},
michael@0 171 {&_44c9_s_p5_0,&_44c9_s_p5_1},
michael@0 172 {&_44c9_s_p6_0,&_44c9_s_p6_1},
michael@0 173 {&_44c9_s_p7_0,&_44c9_s_p7_1},
michael@0 174 {&_44c9_s_p8_0,&_44c9_s_p8_1},
michael@0 175 {&_44c9_s_p9_0,&_44c9_s_p9_1,&_44c9_s_p9_2}
michael@0 176 }
michael@0 177 };
michael@0 178
michael@0 179 static const vorbis_residue_template _res_44s_n1[]={
michael@0 180 {2,0,32, &_residue_44_low,
michael@0 181 &_huff_book__44cn1_s_short,&_huff_book__44cn1_sm_short,
michael@0 182 &_resbook_44s_n1,&_resbook_44sm_n1},
michael@0 183
michael@0 184 {2,0,32, &_residue_44_low,
michael@0 185 &_huff_book__44cn1_s_long,&_huff_book__44cn1_sm_long,
michael@0 186 &_resbook_44s_n1,&_resbook_44sm_n1}
michael@0 187 };
michael@0 188 static const vorbis_residue_template _res_44s_0[]={
michael@0 189 {2,0,16, &_residue_44_low,
michael@0 190 &_huff_book__44c0_s_short,&_huff_book__44c0_sm_short,
michael@0 191 &_resbook_44s_0,&_resbook_44sm_0},
michael@0 192
michael@0 193 {2,0,32, &_residue_44_low,
michael@0 194 &_huff_book__44c0_s_long,&_huff_book__44c0_sm_long,
michael@0 195 &_resbook_44s_0,&_resbook_44sm_0}
michael@0 196 };
michael@0 197 static const vorbis_residue_template _res_44s_1[]={
michael@0 198 {2,0,16, &_residue_44_low,
michael@0 199 &_huff_book__44c1_s_short,&_huff_book__44c1_sm_short,
michael@0 200 &_resbook_44s_1,&_resbook_44sm_1},
michael@0 201
michael@0 202 {2,0,32, &_residue_44_low,
michael@0 203 &_huff_book__44c1_s_long,&_huff_book__44c1_sm_long,
michael@0 204 &_resbook_44s_1,&_resbook_44sm_1}
michael@0 205 };
michael@0 206
michael@0 207 static const vorbis_residue_template _res_44s_2[]={
michael@0 208 {2,0,16, &_residue_44_mid,
michael@0 209 &_huff_book__44c2_s_short,&_huff_book__44c2_s_short,
michael@0 210 &_resbook_44s_2,&_resbook_44s_2},
michael@0 211
michael@0 212 {2,0,32, &_residue_44_mid,
michael@0 213 &_huff_book__44c2_s_long,&_huff_book__44c2_s_long,
michael@0 214 &_resbook_44s_2,&_resbook_44s_2}
michael@0 215 };
michael@0 216 static const vorbis_residue_template _res_44s_3[]={
michael@0 217 {2,0,16, &_residue_44_mid,
michael@0 218 &_huff_book__44c3_s_short,&_huff_book__44c3_s_short,
michael@0 219 &_resbook_44s_3,&_resbook_44s_3},
michael@0 220
michael@0 221 {2,0,32, &_residue_44_mid,
michael@0 222 &_huff_book__44c3_s_long,&_huff_book__44c3_s_long,
michael@0 223 &_resbook_44s_3,&_resbook_44s_3}
michael@0 224 };
michael@0 225 static const vorbis_residue_template _res_44s_4[]={
michael@0 226 {2,0,16, &_residue_44_mid,
michael@0 227 &_huff_book__44c4_s_short,&_huff_book__44c4_s_short,
michael@0 228 &_resbook_44s_4,&_resbook_44s_4},
michael@0 229
michael@0 230 {2,0,32, &_residue_44_mid,
michael@0 231 &_huff_book__44c4_s_long,&_huff_book__44c4_s_long,
michael@0 232 &_resbook_44s_4,&_resbook_44s_4}
michael@0 233 };
michael@0 234 static const vorbis_residue_template _res_44s_5[]={
michael@0 235 {2,0,16, &_residue_44_mid,
michael@0 236 &_huff_book__44c5_s_short,&_huff_book__44c5_s_short,
michael@0 237 &_resbook_44s_5,&_resbook_44s_5},
michael@0 238
michael@0 239 {2,0,32, &_residue_44_mid,
michael@0 240 &_huff_book__44c5_s_long,&_huff_book__44c5_s_long,
michael@0 241 &_resbook_44s_5,&_resbook_44s_5}
michael@0 242 };
michael@0 243 static const vorbis_residue_template _res_44s_6[]={
michael@0 244 {2,0,16, &_residue_44_high,
michael@0 245 &_huff_book__44c6_s_short,&_huff_book__44c6_s_short,
michael@0 246 &_resbook_44s_6,&_resbook_44s_6},
michael@0 247
michael@0 248 {2,0,32, &_residue_44_high,
michael@0 249 &_huff_book__44c6_s_long,&_huff_book__44c6_s_long,
michael@0 250 &_resbook_44s_6,&_resbook_44s_6}
michael@0 251 };
michael@0 252 static const vorbis_residue_template _res_44s_7[]={
michael@0 253 {2,0,16, &_residue_44_high,
michael@0 254 &_huff_book__44c7_s_short,&_huff_book__44c7_s_short,
michael@0 255 &_resbook_44s_7,&_resbook_44s_7},
michael@0 256
michael@0 257 {2,0,32, &_residue_44_high,
michael@0 258 &_huff_book__44c7_s_long,&_huff_book__44c7_s_long,
michael@0 259 &_resbook_44s_7,&_resbook_44s_7}
michael@0 260 };
michael@0 261 static const vorbis_residue_template _res_44s_8[]={
michael@0 262 {2,0,16, &_residue_44_high,
michael@0 263 &_huff_book__44c8_s_short,&_huff_book__44c8_s_short,
michael@0 264 &_resbook_44s_8,&_resbook_44s_8},
michael@0 265
michael@0 266 {2,0,32, &_residue_44_high,
michael@0 267 &_huff_book__44c8_s_long,&_huff_book__44c8_s_long,
michael@0 268 &_resbook_44s_8,&_resbook_44s_8}
michael@0 269 };
michael@0 270 static const vorbis_residue_template _res_44s_9[]={
michael@0 271 {2,0,16, &_residue_44_high,
michael@0 272 &_huff_book__44c9_s_short,&_huff_book__44c9_s_short,
michael@0 273 &_resbook_44s_9,&_resbook_44s_9},
michael@0 274
michael@0 275 {2,0,32, &_residue_44_high,
michael@0 276 &_huff_book__44c9_s_long,&_huff_book__44c9_s_long,
michael@0 277 &_resbook_44s_9,&_resbook_44s_9}
michael@0 278 };
michael@0 279
michael@0 280 static const vorbis_mapping_template _mapres_template_44_stereo[]={
michael@0 281 { _map_nominal, _res_44s_n1 }, /* -1 */
michael@0 282 { _map_nominal, _res_44s_0 }, /* 0 */
michael@0 283 { _map_nominal, _res_44s_1 }, /* 1 */
michael@0 284 { _map_nominal, _res_44s_2 }, /* 2 */
michael@0 285 { _map_nominal, _res_44s_3 }, /* 3 */
michael@0 286 { _map_nominal, _res_44s_4 }, /* 4 */
michael@0 287 { _map_nominal, _res_44s_5 }, /* 5 */
michael@0 288 { _map_nominal, _res_44s_6 }, /* 6 */
michael@0 289 { _map_nominal, _res_44s_7 }, /* 7 */
michael@0 290 { _map_nominal, _res_44s_8 }, /* 8 */
michael@0 291 { _map_nominal, _res_44s_9 }, /* 9 */
michael@0 292 };

mercurial