~ubuntu-branches/ubuntu/lucid/ffmpeg/lucid-security

« back to all changes in this revision

Viewing changes to libavcodec/vp6.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-03-13 09:18:28 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090313091828-n4ktby5eca487uhv
Tags: 3:0.svn20090303-1ubuntu1+unstripped1
merge from ubuntu.jaunty branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
531
531
    s->dsp.put_h264_chroma_pixels_tab[0](dst, tmp, stride, 8, 0, v_weight);
532
532
}
533
533
 
534
 
static void vp6_filter_diag4(uint8_t *dst, uint8_t *src, int stride,
535
 
                             const int16_t *h_weights,const int16_t *v_weights)
536
 
{
537
 
    int x, y;
538
 
    int tmp[8*11];
539
 
    int *t = tmp;
540
 
 
541
 
    src -= stride;
542
 
 
543
 
    for (y=0; y<11; y++) {
544
 
        for (x=0; x<8; x++) {
545
 
            t[x] = av_clip_uint8((  src[x-1] * h_weights[0]
546
 
                               + src[x  ] * h_weights[1]
547
 
                               + src[x+1] * h_weights[2]
548
 
                               + src[x+2] * h_weights[3] + 64) >> 7);
549
 
        }
550
 
        src += stride;
551
 
        t += 8;
552
 
    }
553
 
 
554
 
    t = tmp + 8;
555
 
    for (y=0; y<8; y++) {
556
 
        for (x=0; x<8; x++) {
557
 
            dst[x] = av_clip_uint8((  t[x-8 ] * v_weights[0]
558
 
                                 + t[x   ] * v_weights[1]
559
 
                                 + t[x+8 ] * v_weights[2]
560
 
                                 + t[x+16] * v_weights[3] + 64) >> 7);
561
 
        }
562
 
        dst += stride;
563
 
        t += 8;
564
 
    }
565
 
}
566
 
 
567
534
static void vp6_filter(VP56Context *s, uint8_t *dst, uint8_t *src,
568
535
                       int offset1, int offset2, int stride,
569
536
                       VP56mv mv, int mask, int select, int luma)
601
568
            vp6_filter_hv4(dst, src+offset1, stride, stride,
602
569
                           vp6_block_copy_filter[select][y8]);
603
570
        } else {
604
 
            vp6_filter_diag4(dst, src+offset1 + ((mv.x^mv.y)>>31), stride,
 
571
            s->dsp.vp6_filter_diag4(dst, src+offset1+((mv.x^mv.y)>>31), stride,
605
572
                             vp6_block_copy_filter[select][x8],
606
573
                             vp6_block_copy_filter[select][y8]);
607
574
        }