Mercurial > libavcodec.hg
annotate vp6.c @ 4063:7f991a9cd252 libavcodec
document the extradata protocol for VP6F
author | aurel |
---|---|
date | Mon, 23 Oct 2006 00:10:18 +0000 |
parents | 683d458a251f |
children | 6a10cc9adb8a |
rev | line source |
---|---|
3695 | 1 /** |
2 * @file vp6.c | |
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:
3697
diff
changeset
|
7 * This file is part of FFmpeg. |
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3697
diff
changeset
|
8 * |
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3697
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:
3697
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:
3697
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 |
4063 | 22 * |
23 * | |
24 * The VP6F decoder accept an optional 1 byte extradata. It is composed of: | |
25 * - upper 4bits: difference between encoded width and visible width | |
26 * - lower 4bits: difference between encoded height and visible height | |
3695 | 27 */ |
28 | |
29 #include <stdlib.h> | |
30 #include <inttypes.h> | |
31 | |
32 #include "avcodec.h" | |
33 #include "dsputil.h" | |
34 #include "bitstream.h" | |
35 #include "mpegvideo.h" | |
36 | |
37 #include "vp56.h" | |
38 #include "vp56data.h" | |
39 #include "vp6data.h" | |
40 | |
41 | |
42 static int vp6_parse_header(vp56_context_t *s, uint8_t *buf, int buf_size, | |
43 int *golden_frame) | |
44 { | |
45 vp56_range_coder_t *c = &s->c; | |
46 int parse_filter_info; | |
47 int rows, cols; | |
48 int res = 1; | |
49 | |
50 if (buf[0] & 1) | |
51 return 0; | |
52 | |
53 s->frames[VP56_FRAME_CURRENT].key_frame = !(buf[0] & 0x80); | |
54 vp56_init_dequant(s, (buf[0] >> 1) & 0x3F); | |
55 | |
56 if (s->frames[VP56_FRAME_CURRENT].key_frame) { | |
57 if ((buf[1] & 0xFE) != 0x46) /* would be 0x36 for VP61 */ | |
58 return 0; | |
59 if (buf[1] & 1) { | |
60 av_log(s->avctx, AV_LOG_ERROR, "interlacing not supported\n"); | |
61 return 0; | |
62 } | |
63 | |
64 rows = buf[2]; /* number of stored macroblock rows */ | |
65 cols = buf[3]; /* number of stored macroblock cols */ | |
66 /* buf[4] is number of displayed macroblock rows */ | |
67 /* buf[5] is number of displayed macroblock cols */ | |
68 | |
69 if (16*cols != s->avctx->coded_width || | |
70 16*rows != s->avctx->coded_height) { | |
71 avcodec_set_dimensions(s->avctx, 16*cols, 16*rows); | |
4062
683d458a251f
use the adjustment value present in FLV to crop VP6 video
aurel
parents:
4001
diff
changeset
|
72 if (s->avctx->extradata_size == 1) { |
683d458a251f
use the adjustment value present in FLV to crop VP6 video
aurel
parents:
4001
diff
changeset
|
73 s->avctx->width -= s->avctx->extradata[0] >> 4; |
683d458a251f
use the adjustment value present in FLV to crop VP6 video
aurel
parents:
4001
diff
changeset
|
74 s->avctx->height -= s->avctx->extradata[0] & 0x0F; |
683d458a251f
use the adjustment value present in FLV to crop VP6 video
aurel
parents:
4001
diff
changeset
|
75 } |
3695 | 76 res = 2; |
77 } | |
78 | |
79 vp56_init_range_decoder(c, buf+6, buf_size-6); | |
80 vp56_rac_gets(c, 2); | |
81 | |
82 parse_filter_info = 1; | |
83 } else { | |
84 vp56_init_range_decoder(c, buf+1, buf_size-1); | |
85 | |
86 *golden_frame = vp56_rac_get(c); | |
87 s->deblock_filtering = vp56_rac_get(c); | |
88 if (s->deblock_filtering) | |
89 vp56_rac_get(c); | |
90 parse_filter_info = vp56_rac_get(c); | |
91 } | |
92 | |
93 if (parse_filter_info) { | |
94 if (vp56_rac_get(c)) { | |
95 s->filter_mode = 2; | |
96 s->sample_variance_threshold = vp56_rac_gets(c, 5); | |
97 s->max_vector_length = 2 << vp56_rac_gets(c, 3); | |
98 } else if (vp56_rac_get(c)) { | |
99 s->filter_mode = 1; | |
100 } else { | |
101 s->filter_mode = 0; | |
102 } | |
103 s->filter_selection = vp56_rac_gets(c, 4); | |
104 } | |
105 | |
106 vp56_rac_get(c); | |
107 return res; | |
108 } | |
109 | |
110 static void vp6_coeff_order_table_init(vp56_context_t *s) | |
111 { | |
112 int i, pos, idx = 1; | |
113 | |
114 s->coeff_index_to_pos[0] = 0; | |
115 for (i=0; i<16; i++) | |
116 for (pos=1; pos<64; pos++) | |
117 if (s->coeff_reorder[pos] == i) | |
118 s->coeff_index_to_pos[idx++] = pos; | |
119 } | |
120 | |
121 static void vp6_default_models_init(vp56_context_t *s) | |
122 { | |
123 s->vector_model_dct[0] = 0xA2; | |
124 s->vector_model_dct[1] = 0xA4; | |
125 s->vector_model_sig[0] = 0x80; | |
126 s->vector_model_sig[1] = 0x80; | |
127 | |
128 memcpy(s->mb_types_stats, vp56_def_mb_types_stats, sizeof(s->mb_types_stats)); | |
129 memcpy(s->vector_model_fdv, vp6_def_fdv_vector_model, sizeof(s->vector_model_fdv)); | |
130 memcpy(s->vector_model_pdv, vp6_def_pdv_vector_model, sizeof(s->vector_model_pdv)); | |
131 memcpy(s->coeff_model_runv, vp6_def_runv_coeff_model, sizeof(s->coeff_model_runv)); | |
132 memcpy(s->coeff_reorder, vp6_def_coeff_reorder, sizeof(s->coeff_reorder)); | |
133 | |
134 vp6_coeff_order_table_init(s); | |
135 } | |
136 | |
137 static void vp6_parse_vector_models(vp56_context_t *s) | |
138 { | |
139 vp56_range_coder_t *c = &s->c; | |
140 int comp, node; | |
141 | |
142 for (comp=0; comp<2; comp++) { | |
143 if (vp56_rac_get_prob(c, vp6_sig_dct_pct[comp][0])) | |
144 s->vector_model_dct[comp] = vp56_rac_gets_nn(c, 7); | |
145 if (vp56_rac_get_prob(c, vp6_sig_dct_pct[comp][1])) | |
146 s->vector_model_sig[comp] = vp56_rac_gets_nn(c, 7); | |
147 } | |
148 | |
149 for (comp=0; comp<2; comp++) | |
150 for (node=0; node<7; node++) | |
151 if (vp56_rac_get_prob(c, vp6_pdv_pct[comp][node])) | |
152 s->vector_model_pdv[comp][node] = vp56_rac_gets_nn(c, 7); | |
153 | |
154 for (comp=0; comp<2; comp++) | |
155 for (node=0; node<8; node++) | |
156 if (vp56_rac_get_prob(c, vp6_fdv_pct[comp][node])) | |
157 s->vector_model_fdv[comp][node] = vp56_rac_gets_nn(c, 7); | |
158 } | |
159 | |
160 static void vp6_parse_coeff_models(vp56_context_t *s) | |
161 { | |
162 vp56_range_coder_t *c = &s->c; | |
163 int def_prob[11]; | |
164 int node, cg, ctx, pos; | |
165 int ct; /* code type */ | |
166 int pt; /* plane type (0 for Y, 1 for U or V) */ | |
167 | |
168 memset(def_prob, 0x80, sizeof(def_prob)); | |
169 | |
170 for (pt=0; pt<2; pt++) | |
171 for (node=0; node<11; node++) | |
172 if (vp56_rac_get_prob(c, vp6_dccv_pct[pt][node])) { | |
173 def_prob[node] = vp56_rac_gets_nn(c, 7); | |
174 s->coeff_model_dccv[pt][node] = def_prob[node]; | |
175 } else if (s->frames[VP56_FRAME_CURRENT].key_frame) { | |
176 s->coeff_model_dccv[pt][node] = def_prob[node]; | |
177 } | |
178 | |
179 if (vp56_rac_get(c)) { | |
180 for (pos=1; pos<64; pos++) | |
181 if (vp56_rac_get_prob(c, vp6_coeff_reorder_pct[pos])) | |
182 s->coeff_reorder[pos] = vp56_rac_gets(c, 4); | |
183 vp6_coeff_order_table_init(s); | |
184 } | |
185 | |
186 for (cg=0; cg<2; cg++) | |
187 for (node=0; node<14; node++) | |
188 if (vp56_rac_get_prob(c, vp6_runv_pct[cg][node])) | |
189 s->coeff_model_runv[cg][node] = vp56_rac_gets_nn(c, 7); | |
190 | |
191 for (ct=0; ct<3; ct++) | |
192 for (pt=0; pt<2; pt++) | |
193 for (cg=0; cg<6; cg++) | |
194 for (node=0; node<11; node++) | |
195 if (vp56_rac_get_prob(c, vp6_ract_pct[ct][pt][cg][node])) { | |
196 def_prob[node] = vp56_rac_gets_nn(c, 7); | |
197 s->coeff_model_ract[pt][ct][cg][node] = def_prob[node]; | |
198 } else if (s->frames[VP56_FRAME_CURRENT].key_frame) { | |
199 s->coeff_model_ract[pt][ct][cg][node] = def_prob[node]; | |
200 } | |
201 | |
202 /* coeff_model_dcct is a linear combination of coeff_model_dccv */ | |
203 for (pt=0; pt<2; pt++) | |
204 for (ctx=0; ctx<3; ctx++) | |
205 for (node=0; node<5; node++) | |
206 s->coeff_model_dcct[pt][ctx][node] = clip(((s->coeff_model_dccv[pt][node] * vp6_dccv_lc[ctx][node][0] + 128) >> 8) + vp6_dccv_lc[ctx][node][1], 1, 255); | |
207 } | |
208 | |
3697 | 209 static void vp6_parse_vector_adjustment(vp56_context_t *s, vp56_mv_t *vect) |
3695 | 210 { |
211 vp56_range_coder_t *c = &s->c; | |
212 int comp; | |
213 | |
3697 | 214 *vect = (vp56_mv_t) {0,0}; |
3695 | 215 if (s->vector_candidate_pos < 2) |
3697 | 216 *vect = s->vector_candidate[0]; |
3695 | 217 |
218 for (comp=0; comp<2; comp++) { | |
219 int i, delta = 0; | |
220 | |
221 if (vp56_rac_get_prob(c, s->vector_model_dct[comp])) { | |
222 static const uint8_t prob_order[] = {0, 1, 2, 7, 6, 5, 4}; | |
223 for (i=0; i<sizeof(prob_order); i++) { | |
224 int j = prob_order[i]; | |
225 delta |= vp56_rac_get_prob(c, s->vector_model_fdv[comp][j])<<j; | |
226 } | |
227 if (delta & 0xF0) | |
228 delta |= vp56_rac_get_prob(c, s->vector_model_fdv[comp][3])<<3; | |
229 else | |
230 delta |= 8; | |
231 } else { | |
232 delta = vp56_rac_get_tree(c, vp56_pva_tree, | |
233 s->vector_model_pdv[comp]); | |
234 } | |
235 | |
236 if (delta && vp56_rac_get_prob(c, s->vector_model_sig[comp])) | |
237 delta = -delta; | |
238 | |
239 if (!comp) | |
3697 | 240 vect->x += delta; |
3695 | 241 else |
3697 | 242 vect->y += delta; |
3695 | 243 } |
244 } | |
245 | |
246 static void vp6_parse_coeff(vp56_context_t *s) | |
247 { | |
248 vp56_range_coder_t *c = &s->c; | |
249 uint8_t *permute = s->scantable.permutated; | |
250 uint8_t *model, *model2, *model3; | |
251 int coeff, sign, coeff_idx; | |
252 int b, i, cg, idx, ctx; | |
253 int pt = 0; /* plane type (0 for Y, 1 for U or V) */ | |
254 | |
255 for (b=0; b<6; b++) { | |
256 int ct = 1; /* code type */ | |
257 int run = 1; | |
258 | |
259 if (b > 3) pt = 1; | |
260 | |
261 ctx = s->left_block[vp56_b6to4[b]].not_null_dc | |
262 + s->above_blocks[s->above_block_idx[b]].not_null_dc; | |
263 model = s->coeff_model_dccv[pt]; | |
264 model2 = s->coeff_model_dcct[pt][ctx]; | |
265 | |
266 for (coeff_idx=0; coeff_idx<64; ) { | |
267 if ((coeff_idx>1 && ct==0) || vp56_rac_get_prob(c, model2[0])) { | |
268 /* parse a coeff */ | |
269 if (coeff_idx == 0) { | |
270 s->left_block[vp56_b6to4[b]].not_null_dc = 1; | |
271 s->above_blocks[s->above_block_idx[b]].not_null_dc = 1; | |
272 } | |
273 | |
274 if (vp56_rac_get_prob(c, model2[2])) { | |
275 if (vp56_rac_get_prob(c, model2[3])) { | |
276 idx = vp56_rac_get_tree(c, vp56_pc_tree, model); | |
277 coeff = vp56_coeff_bias[idx]; | |
278 for (i=vp56_coeff_bit_length[idx]; i>=0; i--) | |
279 coeff += vp56_rac_get_prob(c, vp56_coeff_parse_table[idx][i]) << i; | |
280 } else { | |
281 if (vp56_rac_get_prob(c, model2[4])) | |
282 coeff = 3 + vp56_rac_get_prob(c, model[5]); | |
283 else | |
284 coeff = 2; | |
285 } | |
286 ct = 2; | |
287 } else { | |
288 ct = 1; | |
289 coeff = 1; | |
290 } | |
291 sign = vp56_rac_get(c); | |
292 coeff = (coeff ^ -sign) + sign; | |
293 if (coeff_idx) | |
294 coeff *= s->dequant_ac; | |
295 idx = s->coeff_index_to_pos[coeff_idx]; | |
296 s->block_coeff[b][permute[idx]] = coeff; | |
297 run = 1; | |
298 } else { | |
299 /* parse a run */ | |
300 ct = 0; | |
301 if (coeff_idx == 0) { | |
302 s->left_block[vp56_b6to4[b]].not_null_dc = 0; | |
303 s->above_blocks[s->above_block_idx[b]].not_null_dc = 0; | |
304 } else { | |
305 if (!vp56_rac_get_prob(c, model2[1])) | |
306 break; | |
307 | |
308 model3 = s->coeff_model_runv[coeff_idx >= 6]; | |
309 run = vp56_rac_get_tree(c, vp6_pcr_tree, model3); | |
310 if (!run) | |
311 for (run=9, i=0; i<6; i++) | |
312 run += vp56_rac_get_prob(c, model3[i+8]) << i; | |
313 } | |
314 } | |
315 | |
316 cg = vp6_coeff_groups[coeff_idx+=run]; | |
317 model = model2 = s->coeff_model_ract[pt][ct][cg]; | |
318 } | |
319 } | |
320 } | |
321 | |
322 static int vp6_adjust(int v, int t) | |
323 { | |
324 int V = v, s = v >> 31; | |
325 V ^= s; | |
326 V -= s; | |
327 if (V-t-1 >= (unsigned)(t-1)) | |
328 return v; | |
329 V = 2*t - V; | |
330 V += s; | |
331 V ^= s; | |
332 return V; | |
333 } | |
334 | |
335 static int vp6_block_variance(uint8_t *src, int stride) | |
336 { | |
337 int sum = 0, square_sum = 0; | |
338 int y, x; | |
339 | |
340 for (y=0; y<8; y+=2) { | |
341 for (x=0; x<8; x+=2) { | |
342 sum += src[x]; | |
343 square_sum += src[x]*src[x]; | |
344 } | |
345 src += 2*stride; | |
346 } | |
347 return (16*square_sum - sum*sum) / (16*16); | |
348 } | |
349 | |
350 static void vp6_filter_hv2(vp56_context_t *s, uint8_t *dst, uint8_t *src, | |
351 int stride, int delta, int16_t weight) | |
352 { | |
353 s->dsp.put_pixels_tab[1][0](dst, src, stride, 8); | |
354 s->dsp.biweight_h264_pixels_tab[3](dst, src+delta, stride, 2, | |
355 8-weight, weight, 0); | |
356 } | |
357 | |
358 static void vp6_filter_hv4(uint8_t *dst, uint8_t *src, int stride, | |
359 int delta, const int16_t *weights) | |
360 { | |
361 int x, y; | |
362 | |
363 for (y=0; y<8; y++) { | |
364 for (x=0; x<8; x++) { | |
365 dst[x] = clip_uint8(( src[x-delta ] * weights[0] | |
366 + src[x ] * weights[1] | |
367 + src[x+delta ] * weights[2] | |
368 + src[x+2*delta] * weights[3] + 64) >> 7); | |
369 } | |
370 src += stride; | |
371 dst += stride; | |
372 } | |
373 } | |
374 | |
375 static void vp6_filter_diag2(vp56_context_t *s, uint8_t *dst, uint8_t *src, | |
376 int stride, int h_weight, int v_weight) | |
377 { | |
378 uint8_t *tmp = s->edge_emu_buffer+16; | |
379 int x, xmax; | |
380 | |
381 s->dsp.put_pixels_tab[1][0](tmp, src, stride, 8); | |
382 s->dsp.biweight_h264_pixels_tab[3](tmp, src+1, stride, 2, | |
383 8-h_weight, h_weight, 0); | |
384 /* we need a 8x9 block to do vertical filter, so compute one more line */ | |
385 for (x=8*stride, xmax=x+8; x<xmax; x++) | |
386 tmp[x] = (src[x]*(8-h_weight) + src[x+1]*h_weight + 4) >> 3; | |
387 | |
388 s->dsp.put_pixels_tab[1][0](dst, tmp, stride, 8); | |
389 s->dsp.biweight_h264_pixels_tab[3](dst, tmp+stride, stride, 2, | |
390 8-v_weight, v_weight, 0); | |
391 } | |
392 | |
393 static void vp6_filter_diag4(uint8_t *dst, uint8_t *src, int stride, | |
394 const int16_t *h_weights,const int16_t *v_weights) | |
395 { | |
396 int x, y; | |
397 int tmp[8*11]; | |
398 int *t = tmp; | |
399 | |
400 src -= stride; | |
401 | |
402 for (y=0; y<11; y++) { | |
403 for (x=0; x<8; x++) { | |
404 t[x] = clip_uint8(( src[x-1] * h_weights[0] | |
405 + src[x ] * h_weights[1] | |
406 + src[x+1] * h_weights[2] | |
407 + src[x+2] * h_weights[3] + 64) >> 7); | |
408 } | |
409 src += stride; | |
410 t += 8; | |
411 } | |
412 | |
413 t = tmp + 8; | |
414 for (y=0; y<8; y++) { | |
415 for (x=0; x<8; x++) { | |
416 dst[x] = clip_uint8(( t[x-8 ] * v_weights[0] | |
417 + t[x ] * v_weights[1] | |
418 + t[x+8 ] * v_weights[2] | |
419 + t[x+16] * v_weights[3] + 64) >> 7); | |
420 } | |
421 dst += stride; | |
422 t += 8; | |
423 } | |
424 } | |
425 | |
426 static void vp6_filter(vp56_context_t *s, uint8_t *dst, uint8_t *src, | |
427 int offset1, int offset2, int stride, | |
428 vp56_mv_t mv, int mask, int select, int luma) | |
429 { | |
430 int filter4 = 0; | |
431 int x8 = mv.x & mask; | |
432 int y8 = mv.y & mask; | |
433 | |
434 if (luma) { | |
435 x8 *= 2; | |
436 y8 *= 2; | |
437 filter4 = s->filter_mode; | |
438 if (filter4 == 2) { | |
439 if (s->max_vector_length && | |
4001 | 440 (FFABS(mv.x) > s->max_vector_length || |
441 FFABS(mv.y) > s->max_vector_length)) { | |
3695 | 442 filter4 = 0; |
443 } else if (!s->sample_variance_threshold | |
444 || (vp6_block_variance(src+offset1, stride) | |
445 < s->sample_variance_threshold)) { | |
446 filter4 = 0; | |
447 } | |
448 } | |
449 } | |
450 | |
451 if ((y8 && (offset2-offset1)*s->flip<0) || (!y8 && offset1 > offset2)) { | |
452 offset1 = offset2; | |
453 } | |
454 | |
455 if (filter4) { | |
456 if (!y8) { /* left or right combine */ | |
457 vp6_filter_hv4(dst, src+offset1, stride, 1, | |
458 vp6_block_copy_filter[select][x8]); | |
459 } else if (!x8) { /* above or below combine */ | |
460 vp6_filter_hv4(dst, src+offset1, stride, stride, | |
461 vp6_block_copy_filter[select][y8]); | |
462 } else if ((mv.x^mv.y) >> 31) { /* lower-left or upper-right combine */ | |
463 vp6_filter_diag4(dst, src+offset1-1, stride, | |
464 vp6_block_copy_filter[select][x8], | |
465 vp6_block_copy_filter[select][y8]); | |
466 } else { /* lower-right or upper-left combine */ | |
467 vp6_filter_diag4(dst, src+offset1, stride, | |
468 vp6_block_copy_filter[select][x8], | |
469 vp6_block_copy_filter[select][y8]); | |
470 } | |
471 } else { | |
472 if (!y8) { /* left or right combine */ | |
473 vp6_filter_hv2(s, dst, src+offset1, stride, 1, x8); | |
474 } else if (!x8) { /* above or below combine */ | |
475 vp6_filter_hv2(s, dst, src+offset1, stride, stride, y8); | |
476 } else if ((mv.x^mv.y) >> 31) { /* lower-left or upper-right combine */ | |
477 vp6_filter_diag2(s, dst, src+offset1-1, stride, x8, y8); | |
478 } else { /* lower-right or upper-left combine */ | |
479 vp6_filter_diag2(s, dst, src+offset1, stride, x8, y8); | |
480 } | |
481 } | |
482 } | |
483 | |
484 static int vp6_decode_init(AVCodecContext *avctx) | |
485 { | |
486 vp56_context_t *s = avctx->priv_data; | |
487 | |
488 vp56_init(s, avctx, avctx->codec->id == CODEC_ID_VP6); | |
489 s->vp56_coord_div = vp6_coord_div; | |
490 s->parse_vector_adjustment = vp6_parse_vector_adjustment; | |
491 s->adjust = vp6_adjust; | |
492 s->filter = vp6_filter; | |
493 s->parse_coeff = vp6_parse_coeff; | |
494 s->default_models_init = vp6_default_models_init; | |
495 s->parse_vector_models = vp6_parse_vector_models; | |
496 s->parse_coeff_models = vp6_parse_coeff_models; | |
497 s->parse_header = vp6_parse_header; | |
498 | |
499 return 0; | |
500 } | |
501 | |
502 AVCodec vp6_decoder = { | |
503 "vp6", | |
504 CODEC_TYPE_VIDEO, | |
505 CODEC_ID_VP6, | |
506 sizeof(vp56_context_t), | |
507 vp6_decode_init, | |
508 NULL, | |
509 vp56_free, | |
510 vp56_decode_frame, | |
511 }; | |
512 | |
513 /* flash version, not flipped upside-down */ | |
514 AVCodec vp6f_decoder = { | |
515 "vp6f", | |
516 CODEC_TYPE_VIDEO, | |
517 CODEC_ID_VP6F, | |
518 sizeof(vp56_context_t), | |
519 vp6_decode_init, | |
520 NULL, | |
521 vp56_free, | |
522 vp56_decode_frame, | |
523 }; |