Mercurial > libavcodec.hg
diff dsputil.c @ 1264:2fa34e615c76 libavcodec
cleanup
author | michaelni |
---|---|
date | Wed, 14 May 2003 23:08:01 +0000 |
parents | e8c3884f2c7e |
children | 85b71f9f7450 |
line wrap: on
line diff
--- a/dsputil.c Wed May 14 22:38:58 2003 +0000 +++ b/dsputil.c Wed May 14 23:08:01 2003 +0000 @@ -494,10 +494,10 @@ uint32_t a,b;\ a= LD32(&src1[i*src_stride1 ]);\ b= LD32(&src2[i*src_stride2 ]);\ - OP(*((uint32_t*)&dst[i*dst_stride ]), (a&b) + (((a^b)&0xFEFEFEFEUL)>>1));\ + OP(*((uint32_t*)&dst[i*dst_stride ]), no_rnd_avg32(a, b));\ a= LD32(&src1[i*src_stride1+4]);\ b= LD32(&src2[i*src_stride2+4]);\ - OP(*((uint32_t*)&dst[i*dst_stride+4]), (a&b) + (((a^b)&0xFEFEFEFEUL)>>1));\ + OP(*((uint32_t*)&dst[i*dst_stride+4]), no_rnd_avg32(a, b));\ }\ }\ \ @@ -508,10 +508,10 @@ uint32_t a,b;\ a= LD32(&src1[i*src_stride1 ]);\ b= LD32(&src2[i*src_stride2 ]);\ - OP(*((uint32_t*)&dst[i*dst_stride ]), (a|b) - (((a^b)&0xFEFEFEFEUL)>>1));\ + OP(*((uint32_t*)&dst[i*dst_stride ]), rnd_avg32(a, b));\ a= LD32(&src1[i*src_stride1+4]);\ b= LD32(&src2[i*src_stride2+4]);\ - OP(*((uint32_t*)&dst[i*dst_stride+4]), (a|b) - (((a^b)&0xFEFEFEFEUL)>>1));\ + OP(*((uint32_t*)&dst[i*dst_stride+4]), rnd_avg32(a, b));\ }\ }\ \ @@ -522,7 +522,7 @@ uint32_t a,b;\ a= LD32(&src1[i*src_stride1 ]);\ b= LD32(&src2[i*src_stride2 ]);\ - OP(*((uint32_t*)&dst[i*dst_stride ]), (a|b) - (((a^b)&0xFEFEFEFEUL)>>1));\ + OP(*((uint32_t*)&dst[i*dst_stride ]), rnd_avg32(a, b));\ }\ }\ \ @@ -726,7 +726,7 @@ CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_y2_c , OPNAME ## _no_rnd_pixels8_y2_c , 8)\ CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_xy2_c, OPNAME ## _no_rnd_pixels8_xy2_c, 8)\ -#define op_avg(a, b) a = ( ((a)|(b)) - ((((a)^(b))&0xFEFEFEFEUL)>>1) ) +#define op_avg(a, b) a = rnd_avg32(a, b) #endif #define op_put(a, b) a = b