Mercurial > libavcodec.hg
annotate vp6data.h @ 4021:56a9e98b06a7 libavcodec
Ignore blocks with no samples and flags (but usually with MD5 sum)
author | kostya |
---|---|
date | Sun, 15 Oct 2006 04:50:19 +0000 |
parents | c8c591fe26f8 |
children | 6a10cc9adb8a |
rev | line source |
---|---|
3695 | 1 /** |
2 * @file vp6data.h | |
3 * VP6 compatible video decoder | |
4 * | |
5 * Copyright (C) 2006 Aurelien Jacobs <aurel@gnuage.org> | |
6 * | |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3695
diff
changeset
|
7 * This file is part of FFmpeg. |
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3695
diff
changeset
|
8 * |
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3695
diff
changeset
|
9 * FFmpeg is free software; you can redistribute it and/or |
3695 | 10 * modify it under the terms of the GNU Lesser General Public |
11 * License as published by the Free Software Foundation; either | |
12 * version 2.1 of the License, or (at your option) any later version. | |
13 * | |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3695
diff
changeset
|
14 * FFmpeg is distributed in the hope that it will be useful, |
3695 | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 * Lesser General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU Lesser General Public | |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3695
diff
changeset
|
20 * License along with FFmpeg; if not, write to the Free Software |
3695 | 21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
22 */ | |
23 | |
24 #ifndef VP6DATA_H | |
25 #define VP6DATA_H | |
26 | |
27 #include <inttypes.h> | |
28 #include "vp56data.h" | |
29 | |
30 static const uint8_t vp6_def_fdv_vector_model[2][8] = { | |
31 { 247, 210, 135, 68, 138, 220, 239, 246 }, | |
32 { 244, 184, 201, 44, 173, 221, 239, 253 }, | |
33 }; | |
34 | |
35 static const uint8_t vp6_def_pdv_vector_model[2][7] = { | |
36 { 225, 146, 172, 147, 214, 39, 156 }, | |
37 { 204, 170, 119, 235, 140, 230, 228 }, | |
38 }; | |
39 | |
40 static const uint8_t vp6_def_coeff_reorder[] = { | |
41 0, 0, 1, 1, 1, 2, 2, 2, | |
42 2, 2, 2, 3, 3, 4, 4, 4, | |
43 5, 5, 5, 5, 6, 6, 7, 7, | |
44 7, 7, 7, 8, 8, 9, 9, 9, | |
45 9, 9, 9, 10, 10, 11, 11, 11, | |
46 11, 11, 11, 12, 12, 12, 12, 12, | |
47 12, 13, 13, 13, 13, 13, 14, 14, | |
48 14, 14, 15, 15, 15, 15, 15, 15, | |
49 }; | |
50 | |
51 static const uint8_t vp6_def_runv_coeff_model[2][14] = { | |
52 { 198, 197, 196, 146, 198, 204, 169, 142, 130, 136, 149, 149, 191, 249 }, | |
53 { 135, 201, 181, 154, 98, 117, 132, 126, 146, 169, 184, 240, 246, 254 }, | |
54 }; | |
55 | |
56 static const uint8_t vp6_sig_dct_pct[2][2] = { | |
57 { 237, 246 }, | |
58 { 231, 243 }, | |
59 }; | |
60 | |
61 static const uint8_t vp6_pdv_pct[2][7] = { | |
62 { 253, 253, 254, 254, 254, 254, 254 }, | |
63 { 245, 253, 254, 254, 254, 254, 254 }, | |
64 }; | |
65 | |
66 static const uint8_t vp6_fdv_pct[2][8] = { | |
67 { 254, 254, 254, 254, 254, 250, 250, 252 }, | |
68 { 254, 254, 254, 254, 254, 251, 251, 254 }, | |
69 }; | |
70 | |
71 static const uint8_t vp6_dccv_pct[2][11] = { | |
72 { 146, 255, 181, 207, 232, 243, 238, 251, 244, 250, 249 }, | |
73 { 179, 255, 214, 240, 250, 255, 244, 255, 255, 255, 255 }, | |
74 }; | |
75 | |
76 static const uint8_t vp6_coeff_reorder_pct[] = { | |
77 255, 132, 132, 159, 153, 151, 161, 170, | |
78 164, 162, 136, 110, 103, 114, 129, 118, | |
79 124, 125, 132, 136, 114, 110, 142, 135, | |
80 134, 123, 143, 126, 153, 183, 166, 161, | |
81 171, 180, 179, 164, 203, 218, 225, 217, | |
82 215, 206, 203, 217, 229, 241, 248, 243, | |
83 253, 255, 253, 255, 255, 255, 255, 255, | |
84 255, 255, 255, 255, 255, 255, 255, 255, | |
85 }; | |
86 | |
87 static const uint8_t vp6_runv_pct[2][14] = { | |
88 { 219, 246, 238, 249, 232, 239, 249, 255, 248, 253, 239, 244, 241, 248 }, | |
89 { 198, 232, 251, 253, 219, 241, 253, 255, 248, 249, 244, 238, 251, 255 }, | |
90 }; | |
91 | |
92 static const uint8_t vp6_ract_pct[3][2][6][11] = { | |
93 { { { 227, 246, 230, 247, 244, 255, 255, 255, 255, 255, 255 }, | |
94 { 255, 255, 209, 231, 231, 249, 249, 253, 255, 255, 255 }, | |
95 { 255, 255, 225, 242, 241, 251, 253, 255, 255, 255, 255 }, | |
96 { 255, 255, 241, 253, 252, 255, 255, 255, 255, 255, 255 }, | |
97 { 255, 255, 248, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
98 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, | |
99 { { 240, 255, 248, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
100 { 255, 255, 240, 253, 255, 255, 255, 255, 255, 255, 255 }, | |
101 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
102 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
103 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
104 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } }, | |
105 { { { 206, 203, 227, 239, 247, 255, 253, 255, 255, 255, 255 }, | |
106 { 207, 199, 220, 236, 243, 252, 252, 255, 255, 255, 255 }, | |
107 { 212, 219, 230, 243, 244, 253, 252, 255, 255, 255, 255 }, | |
108 { 236, 237, 247, 252, 253, 255, 255, 255, 255, 255, 255 }, | |
109 { 240, 240, 248, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
110 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, | |
111 { { 230, 233, 249, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
112 { 238, 238, 250, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
113 { 248, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
114 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
115 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
116 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } }, | |
117 { { { 225, 239, 227, 231, 244, 253, 243, 255, 255, 253, 255 }, | |
118 { 232, 234, 224, 228, 242, 249, 242, 252, 251, 251, 255 }, | |
119 { 235, 249, 238, 240, 251, 255, 249, 255, 253, 253, 255 }, | |
120 { 249, 253, 251, 250, 255, 255, 255, 255, 255, 255, 255 }, | |
121 { 251, 250, 249, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
122 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, | |
123 { { 243, 244, 250, 250, 255, 255, 255, 255, 255, 255, 255 }, | |
124 { 249, 248, 250, 253, 255, 255, 255, 255, 255, 255, 255 }, | |
125 { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
126 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
127 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, | |
128 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } } | |
129 }; | |
130 | |
131 static const int vp6_dccv_lc[3][5][2] = { | |
132 { { 122, 133 }, { 0, 1 }, { 78, 171 }, { 139, 117 }, { 168, 79 } }, | |
133 { { 133, 51 }, { 0, 1 }, { 169, 71 }, { 214, 44 }, { 210, 38 } }, | |
134 { { 142, -16 }, { 0, 1 }, { 221, -30 }, { 246, -3 }, { 203, 17 } }, | |
135 }; | |
136 | |
137 static const uint8_t vp6_coeff_groups[] = { | |
138 0, 0, 1, 1, 1, 2, 2, 2, | |
139 2, 2, 2, 3, 3, 3, 3, 3, | |
140 3, 3, 3, 3, 3, 3, 4, 4, | |
141 4, 4, 4, 4, 4, 4, 4, 4, | |
142 4, 4, 4, 4, 4, 5, 5, 5, | |
143 5, 5, 5, 5, 5, 5, 5, 5, | |
144 5, 5, 5, 5, 5, 5, 5, 5, | |
145 5, 5, 5, 5, 5, 5, 5, 5, | |
146 }; | |
147 | |
148 static const int16_t vp6_block_copy_filter[16][8][4] = { | |
149 { { 0, 128, 0, 0 }, /* 0 */ | |
150 { -3, 122, 9, 0 }, | |
151 { -4, 109, 24, -1 }, | |
152 { -5, 91, 45, -3 }, | |
153 { -4, 68, 68, -4 }, | |
154 { -3, 45, 91, -5 }, | |
155 { -1, 24, 109, -4 }, | |
156 { 0, 9, 122, -3 } }, | |
157 { { 0, 128, 0, 0 }, /* 1 */ | |
158 { -4, 124, 9, -1 }, | |
159 { -5, 110, 25, -2 }, | |
160 { -6, 91, 46, -3 }, | |
161 { -5, 69, 69, -5 }, | |
162 { -3, 46, 91, -6 }, | |
163 { -2, 25, 110, -5 }, | |
164 { -1, 9, 124, -4 } }, | |
165 { { 0, 128, 0, 0 }, /* 2 */ | |
166 { -4, 123, 10, -1 }, | |
167 { -6, 110, 26, -2 }, | |
168 { -7, 92, 47, -4 }, | |
169 { -6, 70, 70, -6 }, | |
170 { -4, 47, 92, -7 }, | |
171 { -2, 26, 110, -6 }, | |
172 { -1, 10, 123, -4 } }, | |
173 { { 0, 128, 0, 0 }, /* 3 */ | |
174 { -5, 124, 10, -1 }, | |
175 { -7, 110, 27, -2 }, | |
176 { -7, 91, 48, -4 }, | |
177 { -6, 70, 70, -6 }, | |
178 { -4, 48, 92, -8 }, | |
179 { -2, 27, 110, -7 }, | |
180 { -1, 10, 124, -5 } }, | |
181 { { 0, 128, 0, 0 }, /* 4 */ | |
182 { -6, 124, 11, -1 }, | |
183 { -8, 111, 28, -3 }, | |
184 { -8, 92, 49, -5 }, | |
185 { -7, 71, 71, -7 }, | |
186 { -5, 49, 92, -8 }, | |
187 { -3, 28, 111, -8 }, | |
188 { -1, 11, 124, -6 } }, | |
189 { { 0, 128, 0, 0 }, /* 5 */ | |
190 { -6, 123, 12, -1 }, | |
191 { -9, 111, 29, -3 }, | |
192 { -9, 93, 50, -6 }, | |
193 { -8, 72, 72, -8 }, | |
194 { -6, 50, 93, -9 }, | |
195 { -3, 29, 111, -9 }, | |
196 { -1, 12, 123, -6 } }, | |
197 { { 0, 128, 0, 0 }, /* 6 */ | |
198 { -7, 124, 12, -1 }, | |
199 { -10, 111, 30, -3 }, | |
200 { -10, 93, 51, -6 }, | |
201 { -9, 73, 73, -9 }, | |
202 { -6, 51, 93, -10 }, | |
203 { -3, 30, 111, -10 }, | |
204 { -1, 12, 124, -7 } }, | |
205 { { 0, 128, 0, 0 }, /* 7 */ | |
206 { -7, 123, 13, -1 }, | |
207 { -11, 112, 31, -4 }, | |
208 { -11, 94, 52, -7 }, | |
209 { -10, 74, 74, -10 }, | |
210 { -7, 52, 94, -11 }, | |
211 { -4, 31, 112, -11 }, | |
212 { -1, 13, 123, -7 } }, | |
213 { { 0, 128, 0, 0 }, /* 8 */ | |
214 { -8, 124, 13, -1 }, | |
215 { -12, 112, 32, -4 }, | |
216 { -12, 94, 53, -7 }, | |
217 { -10, 74, 74, -10 }, | |
218 { -7, 53, 94, -12 }, | |
219 { -4, 32, 112, -12 }, | |
220 { -1, 13, 124, -8 } }, | |
221 { { 0, 128, 0, 0 }, /* 9 */ | |
222 { -9, 124, 14, -1 }, | |
223 { -13, 112, 33, -4 }, | |
224 { -13, 95, 54, -8 }, | |
225 { -11, 75, 75, -11 }, | |
226 { -8, 54, 95, -13 }, | |
227 { -4, 33, 112, -13 }, | |
228 { -1, 14, 124, -9 } }, | |
229 { { 0, 128, 0, 0 }, /* 10 */ | |
230 { -9, 123, 15, -1 }, | |
231 { -14, 113, 34, -5 }, | |
232 { -14, 95, 55, -8 }, | |
233 { -12, 76, 76, -12 }, | |
234 { -8, 55, 95, -14 }, | |
235 { -5, 34, 112, -13 }, | |
236 { -1, 15, 123, -9 } }, | |
237 { { 0, 128, 0, 0 }, /* 11 */ | |
238 { -10, 124, 15, -1 }, | |
239 { -14, 113, 34, -5 }, | |
240 { -15, 96, 56, -9 }, | |
241 { -13, 77, 77, -13 }, | |
242 { -9, 56, 96, -15 }, | |
243 { -5, 34, 113, -14 }, | |
244 { -1, 15, 124, -10 } }, | |
245 { { 0, 128, 0, 0 }, /* 12 */ | |
246 { -10, 123, 16, -1 }, | |
247 { -15, 113, 35, -5 }, | |
248 { -16, 98, 56, -10 }, | |
249 { -14, 78, 78, -14 }, | |
250 { -10, 56, 98, -16 }, | |
251 { -5, 35, 113, -15 }, | |
252 { -1, 16, 123, -10 } }, | |
253 { { 0, 128, 0, 0 }, /* 13 */ | |
254 { -11, 124, 17, -2 }, | |
255 { -16, 113, 36, -5 }, | |
256 { -17, 98, 57, -10 }, | |
257 { -14, 78, 78, -14 }, | |
258 { -10, 57, 98, -17 }, | |
259 { -5, 36, 113, -16 }, | |
260 { -2, 17, 124, -11 } }, | |
261 { { 0, 128, 0, 0 }, /* 14 */ | |
262 { -12, 125, 17, -2 }, | |
263 { -17, 114, 37, -6 }, | |
264 { -18, 99, 58, -11 }, | |
265 { -15, 79, 79, -15 }, | |
266 { -11, 58, 99, -18 }, | |
267 { -6, 37, 114, -17 }, | |
268 { -2, 17, 125, -12 } }, | |
269 { { 0, 128, 0, 0 }, /* 15 */ | |
270 { -12, 124, 18, -2 }, | |
271 { -18, 114, 38, -6 }, | |
272 { -19, 99, 59, -11 }, | |
273 { -16, 80, 80, -16 }, | |
274 { -11, 59, 99, -19 }, | |
275 { -6, 38, 114, -18 }, | |
276 { -2, 18, 124, -12 } }, | |
277 }; | |
278 | |
279 const vp56_tree_t vp6_pcr_tree[] = { | |
280 { 8, 0}, | |
281 { 4, 1}, | |
282 { 2, 2}, {-1}, {-2}, | |
283 { 2, 3}, {-3}, {-4}, | |
284 { 8, 4}, | |
285 { 4, 5}, | |
286 { 2, 6}, {-5}, {-6}, | |
287 { 2, 7}, {-7}, {-8}, | |
288 {-0}, | |
289 }; | |
290 | |
291 static const uint8_t vp6_coord_div[] = { 4, 4, 4, 4, 8, 8 }; | |
292 | |
293 #endif /* VP6DATA_H */ |