00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00030 #include <stdlib.h>
00031
00032 #include "avcodec.h"
00033 #include "dsputil.h"
00034 #include "get_bits.h"
00035 #include "huffman.h"
00036
00037 #include "vp56.h"
00038 #include "vp56data.h"
00039 #include "vp6data.h"
00040
00041 #define VP6_MAX_HUFF_SIZE 12
00042
00043 static void vp6_parse_coeff(VP56Context *s);
00044 static void vp6_parse_coeff_huffman(VP56Context *s);
00045
00046 static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
00047 int *golden_frame)
00048 {
00049 VP56RangeCoder *c = &s->c;
00050 int parse_filter_info = 0;
00051 int coeff_offset = 0;
00052 int vrt_shift = 0;
00053 int sub_version;
00054 int rows, cols;
00055 int res = 1;
00056 int separated_coeff = buf[0] & 1;
00057
00058 s->framep[VP56_FRAME_CURRENT]->key_frame = !(buf[0] & 0x80);
00059 ff_vp56_init_dequant(s, (buf[0] >> 1) & 0x3F);
00060
00061 if (s->framep[VP56_FRAME_CURRENT]->key_frame) {
00062 sub_version = buf[1] >> 3;
00063 if (sub_version > 8)
00064 return 0;
00065 s->filter_header = buf[1] & 0x06;
00066 if (buf[1] & 1) {
00067 av_log(s->avctx, AV_LOG_ERROR, "interlacing not supported\n");
00068 return 0;
00069 }
00070 if (separated_coeff || !s->filter_header) {
00071 coeff_offset = AV_RB16(buf+2) - 2;
00072 buf += 2;
00073 buf_size -= 2;
00074 }
00075
00076 rows = buf[2];
00077 cols = buf[3];
00078
00079
00080
00081 if (!s->macroblocks ||
00082 16*cols != s->avctx->coded_width ||
00083 16*rows != s->avctx->coded_height) {
00084 avcodec_set_dimensions(s->avctx, 16*cols, 16*rows);
00085 if (s->avctx->extradata_size == 1) {
00086 s->avctx->width -= s->avctx->extradata[0] >> 4;
00087 s->avctx->height -= s->avctx->extradata[0] & 0x0F;
00088 }
00089 res = 2;
00090 }
00091
00092 ff_vp56_init_range_decoder(c, buf+6, buf_size-6);
00093 vp56_rac_gets(c, 2);
00094
00095 parse_filter_info = s->filter_header;
00096 if (sub_version < 8)
00097 vrt_shift = 5;
00098 s->sub_version = sub_version;
00099 } else {
00100 if (!s->sub_version)
00101 return 0;
00102
00103 if (separated_coeff || !s->filter_header) {
00104 coeff_offset = AV_RB16(buf+1) - 2;
00105 buf += 2;
00106 buf_size -= 2;
00107 }
00108 ff_vp56_init_range_decoder(c, buf+1, buf_size-1);
00109
00110 *golden_frame = vp56_rac_get(c);
00111 if (s->filter_header) {
00112 s->deblock_filtering = vp56_rac_get(c);
00113 if (s->deblock_filtering)
00114 vp56_rac_get(c);
00115 if (s->sub_version > 7)
00116 parse_filter_info = vp56_rac_get(c);
00117 }
00118 }
00119
00120 if (parse_filter_info) {
00121 if (vp56_rac_get(c)) {
00122 s->filter_mode = 2;
00123 s->sample_variance_threshold = vp56_rac_gets(c, 5) << vrt_shift;
00124 s->max_vector_length = 2 << vp56_rac_gets(c, 3);
00125 } else if (vp56_rac_get(c)) {
00126 s->filter_mode = 1;
00127 } else {
00128 s->filter_mode = 0;
00129 }
00130 if (s->sub_version > 7)
00131 s->filter_selection = vp56_rac_gets(c, 4);
00132 else
00133 s->filter_selection = 16;
00134 }
00135
00136 s->use_huffman = vp56_rac_get(c);
00137
00138 s->parse_coeff = vp6_parse_coeff;
00139 if (coeff_offset) {
00140 buf += coeff_offset;
00141 buf_size -= coeff_offset;
00142 if (buf_size < 0) {
00143 if (s->framep[VP56_FRAME_CURRENT]->key_frame)
00144 avcodec_set_dimensions(s->avctx, 0, 0);
00145 return 0;
00146 }
00147 if (s->use_huffman) {
00148 s->parse_coeff = vp6_parse_coeff_huffman;
00149 init_get_bits(&s->gb, buf, buf_size<<3);
00150 } else {
00151 ff_vp56_init_range_decoder(&s->cc, buf, buf_size);
00152 s->ccp = &s->cc;
00153 }
00154 } else {
00155 s->ccp = &s->c;
00156 }
00157
00158 return res;
00159 }
00160
00161 static void vp6_coeff_order_table_init(VP56Context *s)
00162 {
00163 int i, pos, idx = 1;
00164
00165 s->modelp->coeff_index_to_pos[0] = 0;
00166 for (i=0; i<16; i++)
00167 for (pos=1; pos<64; pos++)
00168 if (s->modelp->coeff_reorder[pos] == i)
00169 s->modelp->coeff_index_to_pos[idx++] = pos;
00170 }
00171
00172 static void vp6_default_models_init(VP56Context *s)
00173 {
00174 VP56Model *model = s->modelp;
00175
00176 model->vector_dct[0] = 0xA2;
00177 model->vector_dct[1] = 0xA4;
00178 model->vector_sig[0] = 0x80;
00179 model->vector_sig[1] = 0x80;
00180
00181 memcpy(model->mb_types_stats, vp56_def_mb_types_stats, sizeof(model->mb_types_stats));
00182 memcpy(model->vector_fdv, vp6_def_fdv_vector_model, sizeof(model->vector_fdv));
00183 memcpy(model->vector_pdv, vp6_def_pdv_vector_model, sizeof(model->vector_pdv));
00184 memcpy(model->coeff_runv, vp6_def_runv_coeff_model, sizeof(model->coeff_runv));
00185 memcpy(model->coeff_reorder, vp6_def_coeff_reorder, sizeof(model->coeff_reorder));
00186
00187 vp6_coeff_order_table_init(s);
00188 }
00189
00190 static void vp6_parse_vector_models(VP56Context *s)
00191 {
00192 VP56RangeCoder *c = &s->c;
00193 VP56Model *model = s->modelp;
00194 int comp, node;
00195
00196 for (comp=0; comp<2; comp++) {
00197 if (vp56_rac_get_prob(c, vp6_sig_dct_pct[comp][0]))
00198 model->vector_dct[comp] = vp56_rac_gets_nn(c, 7);
00199 if (vp56_rac_get_prob(c, vp6_sig_dct_pct[comp][1]))
00200 model->vector_sig[comp] = vp56_rac_gets_nn(c, 7);
00201 }
00202
00203 for (comp=0; comp<2; comp++)
00204 for (node=0; node<7; node++)
00205 if (vp56_rac_get_prob(c, vp6_pdv_pct[comp][node]))
00206 model->vector_pdv[comp][node] = vp56_rac_gets_nn(c, 7);
00207
00208 for (comp=0; comp<2; comp++)
00209 for (node=0; node<8; node++)
00210 if (vp56_rac_get_prob(c, vp6_fdv_pct[comp][node]))
00211 model->vector_fdv[comp][node] = vp56_rac_gets_nn(c, 7);
00212 }
00213
00214
00215 static int vp6_huff_cmp(const void *va, const void *vb)
00216 {
00217 const Node *a = va, *b = vb;
00218 return (a->count - b->count)*16 + (b->sym - a->sym);
00219 }
00220
00221 static int vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[],
00222 const uint8_t *map, unsigned size, VLC *vlc)
00223 {
00224 Node nodes[2*VP6_MAX_HUFF_SIZE], *tmp = &nodes[size];
00225 int a, b, i;
00226
00227
00228 tmp[0].count = 256;
00229 for (i=0; i<size-1; i++) {
00230 a = tmp[i].count * coeff_model[i] >> 8;
00231 b = tmp[i].count * (255 - coeff_model[i]) >> 8;
00232 nodes[map[2*i ]].count = a + !a;
00233 nodes[map[2*i+1]].count = b + !b;
00234 }
00235
00236 free_vlc(vlc);
00237
00238 return ff_huff_build_tree(s->avctx, vlc, size, nodes, vp6_huff_cmp,
00239 FF_HUFFMAN_FLAG_HNODE_FIRST);
00240 }
00241
00242 static int vp6_parse_coeff_models(VP56Context *s)
00243 {
00244 VP56RangeCoder *c = &s->c;
00245 VP56Model *model = s->modelp;
00246 int def_prob[11];
00247 int node, cg, ctx, pos;
00248 int ct;
00249 int pt;
00250
00251 memset(def_prob, 0x80, sizeof(def_prob));
00252
00253 for (pt=0; pt<2; pt++)
00254 for (node=0; node<11; node++)
00255 if (vp56_rac_get_prob(c, vp6_dccv_pct[pt][node])) {
00256 def_prob[node] = vp56_rac_gets_nn(c, 7);
00257 model->coeff_dccv[pt][node] = def_prob[node];
00258 } else if (s->framep[VP56_FRAME_CURRENT]->key_frame) {
00259 model->coeff_dccv[pt][node] = def_prob[node];
00260 }
00261
00262 if (vp56_rac_get(c)) {
00263 for (pos=1; pos<64; pos++)
00264 if (vp56_rac_get_prob(c, vp6_coeff_reorder_pct[pos]))
00265 model->coeff_reorder[pos] = vp56_rac_gets(c, 4);
00266 vp6_coeff_order_table_init(s);
00267 }
00268
00269 for (cg=0; cg<2; cg++)
00270 for (node=0; node<14; node++)
00271 if (vp56_rac_get_prob(c, vp6_runv_pct[cg][node]))
00272 model->coeff_runv[cg][node] = vp56_rac_gets_nn(c, 7);
00273
00274 for (ct=0; ct<3; ct++)
00275 for (pt=0; pt<2; pt++)
00276 for (cg=0; cg<6; cg++)
00277 for (node=0; node<11; node++)
00278 if (vp56_rac_get_prob(c, vp6_ract_pct[ct][pt][cg][node])) {
00279 def_prob[node] = vp56_rac_gets_nn(c, 7);
00280 model->coeff_ract[pt][ct][cg][node] = def_prob[node];
00281 } else if (s->framep[VP56_FRAME_CURRENT]->key_frame) {
00282 model->coeff_ract[pt][ct][cg][node] = def_prob[node];
00283 }
00284
00285 if (s->use_huffman) {
00286 for (pt=0; pt<2; pt++) {
00287 if (vp6_build_huff_tree(s, model->coeff_dccv[pt],
00288 vp6_huff_coeff_map, 12, &s->dccv_vlc[pt]))
00289 return -1;
00290 if (vp6_build_huff_tree(s, model->coeff_runv[pt],
00291 vp6_huff_run_map, 9, &s->runv_vlc[pt]))
00292 return -1;
00293 for (ct=0; ct<3; ct++)
00294 for (cg = 0; cg < 6; cg++)
00295 if (vp6_build_huff_tree(s, model->coeff_ract[pt][ct][cg],
00296 vp6_huff_coeff_map, 12,
00297 &s->ract_vlc[pt][ct][cg]))
00298 return -1;
00299 }
00300 memset(s->nb_null, 0, sizeof(s->nb_null));
00301 } else {
00302
00303 for (pt=0; pt<2; pt++)
00304 for (ctx=0; ctx<3; ctx++)
00305 for (node=0; node<5; node++)
00306 model->coeff_dcct[pt][ctx][node] = av_clip(((model->coeff_dccv[pt][node] * vp6_dccv_lc[ctx][node][0] + 128) >> 8) + vp6_dccv_lc[ctx][node][1], 1, 255);
00307 }
00308 return 0;
00309 }
00310
00311 static void vp6_parse_vector_adjustment(VP56Context *s, VP56mv *vect)
00312 {
00313 VP56RangeCoder *c = &s->c;
00314 VP56Model *model = s->modelp;
00315 int comp;
00316
00317 *vect = (VP56mv) {0,0};
00318 if (s->vector_candidate_pos < 2)
00319 *vect = s->vector_candidate[0];
00320
00321 for (comp=0; comp<2; comp++) {
00322 int i, delta = 0;
00323
00324 if (vp56_rac_get_prob(c, model->vector_dct[comp])) {
00325 static const uint8_t prob_order[] = {0, 1, 2, 7, 6, 5, 4};
00326 for (i=0; i<sizeof(prob_order); i++) {
00327 int j = prob_order[i];
00328 delta |= vp56_rac_get_prob(c, model->vector_fdv[comp][j])<<j;
00329 }
00330 if (delta & 0xF0)
00331 delta |= vp56_rac_get_prob(c, model->vector_fdv[comp][3])<<3;
00332 else
00333 delta |= 8;
00334 } else {
00335 delta = vp56_rac_get_tree(c, vp56_pva_tree,
00336 model->vector_pdv[comp]);
00337 }
00338
00339 if (delta && vp56_rac_get_prob(c, model->vector_sig[comp]))
00340 delta = -delta;
00341
00342 if (!comp)
00343 vect->x += delta;
00344 else
00345 vect->y += delta;
00346 }
00347 }
00348
00353 static unsigned vp6_get_nb_null(VP56Context *s)
00354 {
00355 unsigned val = get_bits(&s->gb, 2);
00356 if (val == 2)
00357 val += get_bits(&s->gb, 2);
00358 else if (val == 3) {
00359 val = get_bits1(&s->gb) << 2;
00360 val = 6+val + get_bits(&s->gb, 2+val);
00361 }
00362 return val;
00363 }
00364
00365 static void vp6_parse_coeff_huffman(VP56Context *s)
00366 {
00367 VP56Model *model = s->modelp;
00368 uint8_t *permute = s->scantable.permutated;
00369 VLC *vlc_coeff;
00370 int coeff, sign, coeff_idx;
00371 int b, cg, idx;
00372 int pt = 0;
00373
00374 for (b=0; b<6; b++) {
00375 int ct = 0;
00376 if (b > 3) pt = 1;
00377 vlc_coeff = &s->dccv_vlc[pt];
00378
00379 for (coeff_idx = 0;;) {
00380 int run = 1;
00381 if (coeff_idx<2 && s->nb_null[coeff_idx][pt]) {
00382 s->nb_null[coeff_idx][pt]--;
00383 if (coeff_idx)
00384 break;
00385 } else {
00386 if (get_bits_count(&s->gb) >= s->gb.size_in_bits)
00387 return;
00388 coeff = get_vlc2(&s->gb, vlc_coeff->table, 9, 3);
00389 if (coeff == 0) {
00390 if (coeff_idx) {
00391 int pt = (coeff_idx >= 6);
00392 run += get_vlc2(&s->gb, s->runv_vlc[pt].table, 9, 3);
00393 if (run >= 9)
00394 run += get_bits(&s->gb, 6);
00395 } else
00396 s->nb_null[0][pt] = vp6_get_nb_null(s);
00397 ct = 0;
00398 } else if (coeff == 11) {
00399 if (coeff_idx == 1)
00400 s->nb_null[1][pt] = vp6_get_nb_null(s);
00401 break;
00402 } else {
00403 int coeff2 = vp56_coeff_bias[coeff];
00404 if (coeff > 4)
00405 coeff2 += get_bits(&s->gb, coeff <= 9 ? coeff - 4 : 11);
00406 ct = 1 + (coeff2 > 1);
00407 sign = get_bits1(&s->gb);
00408 coeff2 = (coeff2 ^ -sign) + sign;
00409 if (coeff_idx)
00410 coeff2 *= s->dequant_ac;
00411 idx = model->coeff_index_to_pos[coeff_idx];
00412 s->block_coeff[b][permute[idx]] = coeff2;
00413 }
00414 }
00415 coeff_idx+=run;
00416 if (coeff_idx >= 64)
00417 break;
00418 cg = FFMIN(vp6_coeff_groups[coeff_idx], 3);
00419 vlc_coeff = &s->ract_vlc[pt][ct][cg];
00420 }
00421 }
00422 }
00423
00424 static void vp6_parse_coeff(VP56Context *s)
00425 {
00426 VP56RangeCoder *c = s->ccp;
00427 VP56Model *model = s->modelp;
00428 uint8_t *permute = s->scantable.permutated;
00429 uint8_t *model1, *model2, *model3;
00430 int coeff, sign, coeff_idx;
00431 int b, i, cg, idx, ctx;
00432 int pt = 0;
00433
00434 for (b=0; b<6; b++) {
00435 int ct = 1;
00436 int run = 1;
00437
00438 if (b > 3) pt = 1;
00439
00440 ctx = s->left_block[vp56_b6to4[b]].not_null_dc
00441 + s->above_blocks[s->above_block_idx[b]].not_null_dc;
00442 model1 = model->coeff_dccv[pt];
00443 model2 = model->coeff_dcct[pt][ctx];
00444
00445 coeff_idx = 0;
00446 for (;;) {
00447 if ((coeff_idx>1 && ct==0) || vp56_rac_get_prob(c, model2[0])) {
00448
00449 if (vp56_rac_get_prob(c, model2[2])) {
00450 if (vp56_rac_get_prob(c, model2[3])) {
00451 idx = vp56_rac_get_tree(c, vp56_pc_tree, model1);
00452 coeff = vp56_coeff_bias[idx+5];
00453 for (i=vp56_coeff_bit_length[idx]; i>=0; i--)
00454 coeff += vp56_rac_get_prob(c, vp56_coeff_parse_table[idx][i]) << i;
00455 } else {
00456 if (vp56_rac_get_prob(c, model2[4]))
00457 coeff = 3 + vp56_rac_get_prob(c, model1[5]);
00458 else
00459 coeff = 2;
00460 }
00461 ct = 2;
00462 } else {
00463 ct = 1;
00464 coeff = 1;
00465 }
00466 sign = vp56_rac_get(c);
00467 coeff = (coeff ^ -sign) + sign;
00468 if (coeff_idx)
00469 coeff *= s->dequant_ac;
00470 idx = model->coeff_index_to_pos[coeff_idx];
00471 s->block_coeff[b][permute[idx]] = coeff;
00472 run = 1;
00473 } else {
00474
00475 ct = 0;
00476 if (coeff_idx > 0) {
00477 if (!vp56_rac_get_prob(c, model2[1]))
00478 break;
00479
00480 model3 = model->coeff_runv[coeff_idx >= 6];
00481 run = vp56_rac_get_tree(c, vp6_pcr_tree, model3);
00482 if (!run)
00483 for (run=9, i=0; i<6; i++)
00484 run += vp56_rac_get_prob(c, model3[i+8]) << i;
00485 }
00486 }
00487 coeff_idx += run;
00488 if (coeff_idx >= 64)
00489 break;
00490 cg = vp6_coeff_groups[coeff_idx];
00491 model1 = model2 = model->coeff_ract[pt][ct][cg];
00492 }
00493
00494 s->left_block[vp56_b6to4[b]].not_null_dc =
00495 s->above_blocks[s->above_block_idx[b]].not_null_dc = !!s->block_coeff[b][0];
00496 }
00497 }
00498
00499 static int vp6_block_variance(uint8_t *src, int stride)
00500 {
00501 int sum = 0, square_sum = 0;
00502 int y, x;
00503
00504 for (y=0; y<8; y+=2) {
00505 for (x=0; x<8; x+=2) {
00506 sum += src[x];
00507 square_sum += src[x]*src[x];
00508 }
00509 src += 2*stride;
00510 }
00511 return (16*square_sum - sum*sum) >> 8;
00512 }
00513
00514 static void vp6_filter_hv4(uint8_t *dst, uint8_t *src, int stride,
00515 int delta, const int16_t *weights)
00516 {
00517 int x, y;
00518
00519 for (y=0; y<8; y++) {
00520 for (x=0; x<8; x++) {
00521 dst[x] = av_clip_uint8(( src[x-delta ] * weights[0]
00522 + src[x ] * weights[1]
00523 + src[x+delta ] * weights[2]
00524 + src[x+2*delta] * weights[3] + 64) >> 7);
00525 }
00526 src += stride;
00527 dst += stride;
00528 }
00529 }
00530
00531 static void vp6_filter_diag2(VP56Context *s, uint8_t *dst, uint8_t *src,
00532 int stride, int h_weight, int v_weight)
00533 {
00534 uint8_t *tmp = s->edge_emu_buffer+16;
00535 s->dsp.put_h264_chroma_pixels_tab[0](tmp, src, stride, 9, h_weight, 0);
00536 s->dsp.put_h264_chroma_pixels_tab[0](dst, tmp, stride, 8, 0, v_weight);
00537 }
00538
00539 static void vp6_filter(VP56Context *s, uint8_t *dst, uint8_t *src,
00540 int offset1, int offset2, int stride,
00541 VP56mv mv, int mask, int select, int luma)
00542 {
00543 int filter4 = 0;
00544 int x8 = mv.x & mask;
00545 int y8 = mv.y & mask;
00546
00547 if (luma) {
00548 x8 *= 2;
00549 y8 *= 2;
00550 filter4 = s->filter_mode;
00551 if (filter4 == 2) {
00552 if (s->max_vector_length &&
00553 (FFABS(mv.x) > s->max_vector_length ||
00554 FFABS(mv.y) > s->max_vector_length)) {
00555 filter4 = 0;
00556 } else if (s->sample_variance_threshold
00557 && (vp6_block_variance(src+offset1, stride)
00558 < s->sample_variance_threshold)) {
00559 filter4 = 0;
00560 }
00561 }
00562 }
00563
00564 if ((y8 && (offset2-offset1)*s->flip<0) || (!y8 && offset1 > offset2)) {
00565 offset1 = offset2;
00566 }
00567
00568 if (filter4) {
00569 if (!y8) {
00570 vp6_filter_hv4(dst, src+offset1, stride, 1,
00571 vp6_block_copy_filter[select][x8]);
00572 } else if (!x8) {
00573 vp6_filter_hv4(dst, src+offset1, stride, stride,
00574 vp6_block_copy_filter[select][y8]);
00575 } else {
00576 s->vp56dsp.vp6_filter_diag4(dst, src+offset1+((mv.x^mv.y)>>31), stride,
00577 vp6_block_copy_filter[select][x8],
00578 vp6_block_copy_filter[select][y8]);
00579 }
00580 } else {
00581 if (!x8 || !y8) {
00582 s->dsp.put_h264_chroma_pixels_tab[0](dst, src+offset1, stride, 8, x8, y8);
00583 } else {
00584 vp6_filter_diag2(s, dst, src+offset1 + ((mv.x^mv.y)>>31), stride, x8, y8);
00585 }
00586 }
00587 }
00588
00589 static av_cold int vp6_decode_init(AVCodecContext *avctx)
00590 {
00591 VP56Context *s = avctx->priv_data;
00592
00593 ff_vp56_init(avctx, avctx->codec->id == CODEC_ID_VP6,
00594 avctx->codec->id == CODEC_ID_VP6A);
00595 s->vp56_coord_div = vp6_coord_div;
00596 s->parse_vector_adjustment = vp6_parse_vector_adjustment;
00597 s->filter = vp6_filter;
00598 s->default_models_init = vp6_default_models_init;
00599 s->parse_vector_models = vp6_parse_vector_models;
00600 s->parse_coeff_models = vp6_parse_coeff_models;
00601 s->parse_header = vp6_parse_header;
00602
00603 return 0;
00604 }
00605
00606 static av_cold int vp6_decode_free(AVCodecContext *avctx)
00607 {
00608 VP56Context *s = avctx->priv_data;
00609 int pt, ct, cg;
00610
00611 ff_vp56_free(avctx);
00612
00613 for (pt=0; pt<2; pt++) {
00614 free_vlc(&s->dccv_vlc[pt]);
00615 free_vlc(&s->runv_vlc[pt]);
00616 for (ct=0; ct<3; ct++)
00617 for (cg=0; cg<6; cg++)
00618 free_vlc(&s->ract_vlc[pt][ct][cg]);
00619 }
00620 return 0;
00621 }
00622
00623 AVCodec ff_vp6_decoder = {
00624 .name = "vp6",
00625 .type = AVMEDIA_TYPE_VIDEO,
00626 .id = CODEC_ID_VP6,
00627 .priv_data_size = sizeof(VP56Context),
00628 .init = vp6_decode_init,
00629 .close = vp6_decode_free,
00630 .decode = ff_vp56_decode_frame,
00631 .capabilities = CODEC_CAP_DR1,
00632 .long_name = NULL_IF_CONFIG_SMALL("On2 VP6"),
00633 };
00634
00635
00636 AVCodec ff_vp6f_decoder = {
00637 .name = "vp6f",
00638 .type = AVMEDIA_TYPE_VIDEO,
00639 .id = CODEC_ID_VP6F,
00640 .priv_data_size = sizeof(VP56Context),
00641 .init = vp6_decode_init,
00642 .close = vp6_decode_free,
00643 .decode = ff_vp56_decode_frame,
00644 .capabilities = CODEC_CAP_DR1,
00645 .long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version)"),
00646 };
00647
00648
00649 AVCodec ff_vp6a_decoder = {
00650 .name = "vp6a",
00651 .type = AVMEDIA_TYPE_VIDEO,
00652 .id = CODEC_ID_VP6A,
00653 .priv_data_size = sizeof(VP56Context),
00654 .init = vp6_decode_init,
00655 .close = vp6_decode_free,
00656 .decode = ff_vp56_decode_frame,
00657 .capabilities = CODEC_CAP_DR1,
00658 .long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version, with alpha channel)"),
00659 };