comparison snow.c @ 2224:11d54cb7ac4e libavcodec

100l (forgot to set the 8x8 mc functions, so ME did use the mpeg ones ...)
author michael
date Sun, 12 Sep 2004 23:09:54 +0000
parents b26474e72d6d
children 960e3552e418
comparison
equal deleted inserted replaced
2223:b26474e72d6d 2224:11d54cb7ac4e
1987 } 1987 }
1988 STOP_TIMER("mc_block") 1988 STOP_TIMER("mc_block")
1989 } 1989 }
1990 1990
1991 #define mca(dx,dy,b_w)\ 1991 #define mca(dx,dy,b_w)\
1992 static void mc_block_hpel ## dx ## dy(uint8_t *dst, uint8_t *src, int stride, int h){\ 1992 static void mc_block_hpel ## dx ## dy ## b_w(uint8_t *dst, uint8_t *src, int stride, int h){\
1993 uint8_t tmp[stride*(b_w+5)];\ 1993 uint8_t tmp[stride*(b_w+5)];\
1994 assert(h==b_w);\ 1994 assert(h==b_w);\
1995 mc_block(dst, src-2-2*stride, tmp, stride, b_w, b_w, dx, dy);\ 1995 mc_block(dst, src-2-2*stride, tmp, stride, b_w, b_w, dx, dy);\
1996 } 1996 }
1997 1997
1998 mca( 0, 0,16) 1998 mca( 0, 0,16)
1999 mca( 8, 0,16) 1999 mca( 8, 0,16)
2000 mca( 0, 8,16) 2000 mca( 0, 8,16)
2001 mca( 8, 8,16) 2001 mca( 8, 8,16)
2002 mca( 0, 0,8)
2003 mca( 8, 0,8)
2004 mca( 0, 8,8)
2005 mca( 8, 8,8)
2002 2006
2003 static void pred_block(SnowContext *s, uint8_t *dst, uint8_t *src, uint8_t *tmp, int stride, int sx, int sy, int b_w, int b_h, BlockNode *block, int plane_index, int w, int h){ 2007 static void pred_block(SnowContext *s, uint8_t *dst, uint8_t *src, uint8_t *tmp, int stride, int sx, int sy, int b_w, int b_h, BlockNode *block, int plane_index, int w, int h){
2004 if(block->type){ 2008 if(block->type){
2005 int x, y; 2009 int x, y;
2006 const int color= block->color[plane_index]; 2010 const int color= block->color[plane_index];
2444 dsputil_init(&s->dsp, avctx); 2448 dsputil_init(&s->dsp, avctx);
2445 2449
2446 #define mcf(dx,dy)\ 2450 #define mcf(dx,dy)\
2447 s->dsp.put_qpel_pixels_tab [0][dy+dx/4]=\ 2451 s->dsp.put_qpel_pixels_tab [0][dy+dx/4]=\
2448 s->dsp.put_no_rnd_qpel_pixels_tab[0][dy+dx/4]=\ 2452 s->dsp.put_no_rnd_qpel_pixels_tab[0][dy+dx/4]=\
2449 s->dsp.put_h264_qpel_pixels_tab[0][dy+dx/4]; 2453 s->dsp.put_h264_qpel_pixels_tab[0][dy+dx/4];\
2454 s->dsp.put_qpel_pixels_tab [1][dy+dx/4]=\
2455 s->dsp.put_no_rnd_qpel_pixels_tab[1][dy+dx/4]=\
2456 s->dsp.put_h264_qpel_pixels_tab[1][dy+dx/4];
2450 2457
2451 mcf( 0, 0) 2458 mcf( 0, 0)
2452 mcf( 4, 0) 2459 mcf( 4, 0)
2453 mcf( 8, 0) 2460 mcf( 8, 0)
2454 mcf(12, 0) 2461 mcf(12, 0)
2466 mcf(12,12) 2473 mcf(12,12)
2467 2474
2468 #define mcfh(dx,dy)\ 2475 #define mcfh(dx,dy)\
2469 s->dsp.put_pixels_tab [0][dy/4+dx/8]=\ 2476 s->dsp.put_pixels_tab [0][dy/4+dx/8]=\
2470 s->dsp.put_no_rnd_pixels_tab[0][dy/4+dx/8]=\ 2477 s->dsp.put_no_rnd_pixels_tab[0][dy/4+dx/8]=\
2471 mc_block_hpel ## dx ## dy; 2478 mc_block_hpel ## dx ## dy ## 16;\
2479 s->dsp.put_pixels_tab [1][dy/4+dx/8]=\
2480 s->dsp.put_no_rnd_pixels_tab[1][dy/4+dx/8]=\
2481 mc_block_hpel ## dx ## dy ## 8;
2472 2482
2473 mcfh(0, 0) 2483 mcfh(0, 0)
2474 mcfh(8, 0) 2484 mcfh(8, 0)
2475 mcfh(0, 8) 2485 mcfh(0, 8)
2476 mcfh(8, 8) 2486 mcfh(8, 8)