~ubuntu-branches/ubuntu/trusty/libav/trusty-proposed

« back to all changes in this revision

Viewing changes to libavcodec/wmv2dec.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2013-10-22 23:24:08 UTC
  • mfrom: (1.3.36 sid)
  • Revision ID: package-import@ubuntu.com-20131022232408-b8tvvn4pyzri9mi3
Tags: 6:9.10-1ubuntu1
* Build all -extra flavors from this source package, as libav got demoted
  from main to universe, cf LP: #1243235
* Simplify debian/rules to follow exactly the code that debian executes
* New upstream (LP: #1180288) fixes lots of security issues (LP: #1242802)
* Merge from unstable, remaining changes:
  - build-depend on libtiff5-dev rather than libtiff4-dev,
    avoids FTBFS caused by imlib
  - follow the regular debian codepaths

Show diffs side-by-side

added added

removed removed

Lines of Context:
244
244
    else
245
245
        w->hshift= 0;
246
246
 
247
 
//printf("%d %d  ", *mx_ptr, *my_ptr);
248
 
 
249
247
    return 0;
250
248
}
251
249
 
314
312
//        const uint8_t *scantable= w->abt_type-1 ? w->abt_scantable[1].permutated : w->abt_scantable[0].scantable;
315
313
 
316
314
        sub_cbp= sub_cbp_table[ decode012(&s->gb) ];
317
 
//        printf("S%d", sub_cbp);
318
315
 
319
316
        if(sub_cbp&1){
320
317
            if (ff_msmpeg4_decode_block(s, block, n, 1, scantable) < 0)
385
382
 
386
383
    if (!s->mb_intra) {
387
384
        int mx, my;
388
 
//printf("P at %d %d\n", s->mb_x, s->mb_y);
389
385
        wmv2_pred_motion(w, &mx, &my);
390
386
 
391
387
        if(cbp){
419
415
            }
420
416
        }
421
417
    } else {
422
 
//if(s->pict_type==AV_PICTURE_TYPE_P)
423
 
//   printf("%d%d ", s->inter_intra_pred, cbp);
424
 
//printf("I at %d %d %d %06X\n", s->mb_x, s->mb_y, ((cbp&3)? 1 : 0) +((cbp&0x3C)? 2 : 0), show_bits(&s->gb, 24));
 
418
        if (s->pict_type==AV_PICTURE_TYPE_P)
 
419
            av_dlog(s->avctx, "%d%d ", s->inter_intra_pred, cbp);
 
420
        av_dlog(s->avctx, "I at %d %d %d %06X\n", s->mb_x, s->mb_y,
 
421
                ((cbp & 3) ? 1 : 0) +((cbp & 0x3C)? 2 : 0),
 
422
                show_bits(&s->gb, 24));
425
423
        s->ac_pred = get_bits1(&s->gb);
426
424
        if(s->inter_intra_pred){
427
425
            s->h263_aic_dir= get_vlc2(&s->gb, ff_inter_intra_vlc.table, INTER_INTRA_VLC_BITS, 1);
428
 
//            printf("%d%d %d %d/", s->ac_pred, s->h263_aic_dir, s->mb_x, s->mb_y);
 
426
            av_dlog(s->avctx, "%d%d %d %d/",
 
427
                    s->ac_pred, s->h263_aic_dir, s->mb_x, s->mb_y);
429
428
        }
430
429
        if(s->per_mb_rl_table && cbp){
431
430
            s->rl_table_index = decode012(&s->gb);
473
472
AVCodec ff_wmv2_decoder = {
474
473
    .name           = "wmv2",
475
474
    .type           = AVMEDIA_TYPE_VIDEO,
476
 
    .id             = CODEC_ID_WMV2,
 
475
    .id             = AV_CODEC_ID_WMV2,
477
476
    .priv_data_size = sizeof(Wmv2Context),
478
477
    .init           = wmv2_decode_init,
479
478
    .close          = wmv2_decode_end,
480
479
    .decode         = ff_h263_decode_frame,
481
480
    .capabilities   = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
482
 
    .max_lowres = 3,
483
 
    .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"),
484
 
    .pix_fmts= ff_pixfmt_list_420,
 
481
    .long_name      = NULL_IF_CONFIG_SMALL("Windows Media Video 8"),
 
482
    .pix_fmts       = ff_pixfmt_list_420,
485
483
};