• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavcodec/vp6.c

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

Generated on Sat Feb 16 2013 09:23:14 for ffmpeg by  doxygen 1.7.1