~ubuntu-branches/ubuntu/precise/libav/precise-updates

« back to all changes in this revision

Viewing changes to libavcodec/cavs.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:30:00 UTC
  • mfrom: (1.2.8) (1.1.13 experimental)
  • Revision ID: package-import@ubuntu.com-20120112223000-cmfo7w78q13i2fd9
Tags: 4:0.8~beta2-1ubuntu1
* Merge from debian, remaining changes:
  - don't build against libdirac, lame, libopenjpeg, librtmp, 
    x264, and xvid  (all in universe)

Show diffs side-by-side

added added

removed removed

Lines of Context:
333
333
    const int mx= mv->x + src_x_offset*8;
334
334
    const int my= mv->y + src_y_offset*8;
335
335
    const int luma_xy= (mx&3) + ((my&3)<<2);
336
 
    uint8_t * src_y = pic->data[0] + (mx>>2) + (my>>2)*h->l_stride;
337
 
    uint8_t * src_cb= pic->data[1] + (mx>>3) + (my>>3)*h->c_stride;
338
 
    uint8_t * src_cr= pic->data[2] + (mx>>3) + (my>>3)*h->c_stride;
 
336
    uint8_t * src_y  = pic->f.data[0] + (mx >> 2) + (my >> 2) * h->l_stride;
 
337
    uint8_t * src_cb = pic->f.data[1] + (mx >> 3) + (my >> 3) * h->c_stride;
 
338
    uint8_t * src_cr = pic->f.data[2] + (mx >> 3) + (my >> 3) * h->c_stride;
339
339
    int extra_width= 0; //(s->flags&CODEC_FLAG_EMU_EDGE) ? 0 : 16;
340
340
    int extra_height= extra_width;
341
341
    int emu=0;
344
344
    const int pic_width  = 16*h->mb_width;
345
345
    const int pic_height = 16*h->mb_height;
346
346
 
347
 
    if(!pic->data[0])
 
347
    if(!pic->f.data[0])
348
348
        return;
349
349
    if(mx&7) extra_width -= 3;
350
350
    if(my&7) extra_height -= 3;
602
602
        h->mbx = 0;
603
603
        h->mby++;
604
604
        /* re-calculate sample pointers */
605
 
        h->cy = h->picture.data[0] + h->mby*16*h->l_stride;
606
 
        h->cu = h->picture.data[1] + h->mby*8*h->c_stride;
607
 
        h->cv = h->picture.data[2] + h->mby*8*h->c_stride;
 
605
        h->cy = h->picture.f.data[0] + h->mby * 16 * h->l_stride;
 
606
        h->cu = h->picture.f.data[1] + h->mby *  8 * h->c_stride;
 
607
        h->cv = h->picture.f.data[2] + h->mby *  8 * h->c_stride;
608
608
        if(h->mby == h->mb_height) { //frame end
609
609
            return 0;
610
610
        }
629
629
    h->mv[MV_FWD_X0] = ff_cavs_dir_mv;
630
630
    set_mvs(&h->mv[MV_FWD_X0], BLK_16X16);
631
631
    h->pred_mode_Y[3] = h->pred_mode_Y[6] = NOT_AVAIL;
632
 
    h->cy = h->picture.data[0];
633
 
    h->cu = h->picture.data[1];
634
 
    h->cv = h->picture.data[2];
635
 
    h->l_stride = h->picture.linesize[0];
636
 
    h->c_stride = h->picture.linesize[1];
 
632
    h->cy           = h->picture.f.data[0];
 
633
    h->cu           = h->picture.f.data[1];
 
634
    h->cv           = h->picture.f.data[2];
 
635
    h->l_stride     = h->picture.f.linesize[0];
 
636
    h->c_stride     = h->picture.f.linesize[1];
637
637
    h->luma_scan[2] = 8*h->l_stride;
638
638
    h->luma_scan[3] = 8*h->l_stride+8;
639
639
    h->mbx = h->mby = h->mbidx = 0;
658
658
    h->top_mv[1]    = av_malloc((h->mb_width*2+1)*sizeof(cavs_vector));
659
659
    h->top_pred_Y   = av_malloc( h->mb_width*2*sizeof(*h->top_pred_Y));
660
660
    h->top_border_y = av_malloc((h->mb_width+1)*16);
661
 
    h->top_border_u = av_malloc((h->mb_width)*10);
662
 
    h->top_border_v = av_malloc((h->mb_width)*10);
 
661
    h->top_border_u = av_malloc( h->mb_width * 10);
 
662
    h->top_border_v = av_malloc( h->mb_width * 10);
663
663
 
664
664
    /* alloc space for co-located MVs and types */
665
665
    h->col_mv       = av_malloc( h->mb_width*h->mb_height*4*sizeof(cavs_vector));