Revision 84705403 libavcodec/dsputil.c

View differences:

libavcodec/dsputil.c
2526 2526
        dst[i+0] = src1[i+0]-src2[i+0];
2527 2527
}
2528 2528

  
2529
static void sub_hfyu_median_prediction_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w, int *left, int *left_top){
2530
    int i;
2531
    uint8_t l, lt;
2532

  
2533
    l= *left;
2534
    lt= *left_top;
2535

  
2536
    for(i=0; i<w; i++){
2537
        const int pred= mid_pred(l, src1[i], (l + src1[i] - lt)&0xFF);
2538
        lt= src1[i];
2539
        l= src2[i];
2540
        dst[i]= l - pred;
2541
    }    
2542

  
2543
    *left= l;
2544
    *left_top= lt;
2545
}
2546

  
2529 2547
#define BUTTERFLY2(o1,o2,i1,i2) \
2530 2548
o1= (i1)+(i2);\
2531 2549
o2= (i1)-(i2);
......
3007 3025
        
3008 3026
    c->add_bytes= add_bytes_c;
3009 3027
    c->diff_bytes= diff_bytes_c;
3028
    c->sub_hfyu_median_prediction= sub_hfyu_median_prediction_c;
3010 3029
    c->bswap_buf= bswap_buf;
3011 3030

  
3012 3031
#ifdef HAVE_MMX

Also available in: Unified diff