Mercurial > libavcodec.hg
comparison aacdectab.h @ 7523:a3f7ffdb676d libavcodec
Sync already committed code with that in SoC and commit more OKed hunks of code
author | superdump |
---|---|
date | Sat, 09 Aug 2008 10:46:27 +0000 |
parents | |
children | 850a1625bee4 |
comparison
equal
deleted
inserted
replaced
7522:4017c5ba7bab | 7523:a3f7ffdb676d |
---|---|
1 /* | |
2 * AAC decoder data | |
3 * Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org ) | |
4 * Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com ) | |
5 * | |
6 * This file is part of FFmpeg. | |
7 * | |
8 * FFmpeg is free software; you can redistribute it and/or | |
9 * modify it under the terms of the GNU Lesser General Public | |
10 * License as published by the Free Software Foundation; either | |
11 * version 2.1 of the License, or (at your option) any later version. | |
12 * | |
13 * FFmpeg is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * Lesser General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU Lesser General Public | |
19 * License along with FFmpeg; if not, write to the Free Software | |
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
21 */ | |
22 | |
23 /** | |
24 * @file aacdectab.h | |
25 * AAC decoder data | |
26 * @author Oded Shimon ( ods15 ods15 dyndns org ) | |
27 * @author Maxim Gavrilov ( maxim.gavrilov gmail com ) | |
28 */ | |
29 | |
30 #ifndef FFMPEG_AACDECTAB_H | |
31 #define FFMPEG_AACDECTAB_H | |
32 | |
33 #include "aac.h" | |
34 | |
35 #include <stdint.h> | |
36 | |
37 /* @name swb_offsets | |
38 * Sample offset into the window indicating the beginning of a scalefactor | |
39 * window band | |
40 * | |
41 * scalefactor window band - term for scalefactor bands within a window, | |
42 * given in Table 4.110 to Table 4.128. | |
43 * | |
44 * scalefactor band - a set of spectral coefficients which are scaled by one | |
45 * scalefactor. In case of EIGHT_SHORT_SEQUENCE and grouping a scalefactor band | |
46 * may contain several scalefactor window bands of corresponding frequency. For | |
47 * all other window_sequences scalefactor bands and scalefactor window bands are | |
48 * identical. | |
49 * @{ | |
50 */ | |
51 | |
52 static const uint16_t swb_offset_1024_96[] = { | |
53 0, 4, 8, 12, 16, 20, 24, 28, | |
54 32, 36, 40, 44, 48, 52, 56, 64, | |
55 72, 80, 88, 96, 108, 120, 132, 144, | |
56 156, 172, 188, 212, 240, 276, 320, 384, | |
57 448, 512, 576, 640, 704, 768, 832, 896, | |
58 960, 1024 | |
59 }; | |
60 | |
61 static const uint16_t swb_offset_128_96[] = { | |
62 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128 | |
63 }; | |
64 | |
65 static const uint16_t swb_offset_1024_64[] = { | |
66 0, 4, 8, 12, 16, 20, 24, 28, | |
67 32, 36, 40, 44, 48, 52, 56, 64, | |
68 72, 80, 88, 100, 112, 124, 140, 156, | |
69 172, 192, 216, 240, 268, 304, 344, 384, | |
70 424, 464, 504, 544, 584, 624, 664, 704, | |
71 744, 784, 824, 864, 904, 944, 984, 1024 | |
72 }; | |
73 | |
74 static const uint16_t swb_offset_1024_48[] = { | |
75 0, 4, 8, 12, 16, 20, 24, 28, | |
76 32, 36, 40, 48, 56, 64, 72, 80, | |
77 88, 96, 108, 120, 132, 144, 160, 176, | |
78 196, 216, 240, 264, 292, 320, 352, 384, | |
79 416, 448, 480, 512, 544, 576, 608, 640, | |
80 672, 704, 736, 768, 800, 832, 864, 896, | |
81 928, 1024 | |
82 }; | |
83 | |
84 static const uint16_t swb_offset_128_48[] = { | |
85 0, 4, 8, 12, 16, 20, 28, 36, | |
86 44, 56, 68, 80, 96, 112, 128 | |
87 }; | |
88 | |
89 static const uint16_t swb_offset_1024_32[] = { | |
90 0, 4, 8, 12, 16, 20, 24, 28, | |
91 32, 36, 40, 48, 56, 64, 72, 80, | |
92 88, 96, 108, 120, 132, 144, 160, 176, | |
93 196, 216, 240, 264, 292, 320, 352, 384, | |
94 416, 448, 480, 512, 544, 576, 608, 640, | |
95 672, 704, 736, 768, 800, 832, 864, 896, | |
96 928, 960, 992, 1024 | |
97 }; | |
98 | |
99 static const uint16_t swb_offset_1024_24[] = { | |
100 0, 4, 8, 12, 16, 20, 24, 28, | |
101 32, 36, 40, 44, 52, 60, 68, 76, | |
102 84, 92, 100, 108, 116, 124, 136, 148, | |
103 160, 172, 188, 204, 220, 240, 260, 284, | |
104 308, 336, 364, 396, 432, 468, 508, 552, | |
105 600, 652, 704, 768, 832, 896, 960, 1024 | |
106 }; | |
107 | |
108 static const uint16_t swb_offset_128_24[] = { | |
109 0, 4, 8, 12, 16, 20, 24, 28, | |
110 36, 44, 52, 64, 76, 92, 108, 128 | |
111 }; | |
112 | |
113 static const uint16_t swb_offset_1024_16[] = { | |
114 0, 8, 16, 24, 32, 40, 48, 56, | |
115 64, 72, 80, 88, 100, 112, 124, 136, | |
116 148, 160, 172, 184, 196, 212, 228, 244, | |
117 260, 280, 300, 320, 344, 368, 396, 424, | |
118 456, 492, 532, 572, 616, 664, 716, 772, | |
119 832, 896, 960, 1024 | |
120 }; | |
121 | |
122 static const uint16_t swb_offset_128_16[] = { | |
123 0, 4, 8, 12, 16, 20, 24, 28, | |
124 32, 40, 48, 60, 72, 88, 108, 128 | |
125 }; | |
126 | |
127 static const uint16_t swb_offset_1024_8[] = { | |
128 0, 12, 24, 36, 48, 60, 72, 84, | |
129 96, 108, 120, 132, 144, 156, 172, 188, | |
130 204, 220, 236, 252, 268, 288, 308, 328, | |
131 348, 372, 396, 420, 448, 476, 508, 544, | |
132 580, 620, 664, 712, 764, 820, 880, 944, | |
133 1024 | |
134 }; | |
135 | |
136 static const uint16_t swb_offset_128_8[] = { | |
137 0, 4, 8, 12, 16, 20, 24, 28, | |
138 36, 44, 52, 60, 72, 88, 108, 128 | |
139 }; | |
140 | |
141 static const uint16_t *swb_offset_1024[] = { | |
142 swb_offset_1024_96, swb_offset_1024_96, swb_offset_1024_64, | |
143 swb_offset_1024_48, swb_offset_1024_48, swb_offset_1024_32, | |
144 swb_offset_1024_24, swb_offset_1024_24, swb_offset_1024_16, | |
145 swb_offset_1024_16, swb_offset_1024_16, swb_offset_1024_8 | |
146 }; | |
147 | |
148 static const uint16_t *swb_offset_128[] = { | |
149 /* The last entry on the following row is swb_offset_128_64 but is a | |
150 duplicate of swb_offset_128_96. */ | |
151 swb_offset_128_96, swb_offset_128_96, swb_offset_128_96, | |
152 swb_offset_128_48, swb_offset_128_48, swb_offset_128_48, | |
153 swb_offset_128_24, swb_offset_128_24, swb_offset_128_16, | |
154 swb_offset_128_16, swb_offset_128_16, swb_offset_128_8 | |
155 }; | |
156 | |
157 // @} | |
158 | |
159 #endif /* FFMPEG_AACDECTAB_H */ |