Mercurial > libavcodec.hg
comparison dsputil.c @ 1264:2fa34e615c76 libavcodec
cleanup
| author | michaelni |
|---|---|
| date | Wed, 14 May 2003 23:08:01 +0000 |
| parents | e8c3884f2c7e |
| children | 85b71f9f7450 |
comparison
equal
deleted
inserted
replaced
| 1263:9fce515e9894 | 1264:2fa34e615c76 |
|---|---|
| 492 int i;\ | 492 int i;\ |
| 493 for(i=0; i<h; i++){\ | 493 for(i=0; i<h; i++){\ |
| 494 uint32_t a,b;\ | 494 uint32_t a,b;\ |
| 495 a= LD32(&src1[i*src_stride1 ]);\ | 495 a= LD32(&src1[i*src_stride1 ]);\ |
| 496 b= LD32(&src2[i*src_stride2 ]);\ | 496 b= LD32(&src2[i*src_stride2 ]);\ |
| 497 OP(*((uint32_t*)&dst[i*dst_stride ]), (a&b) + (((a^b)&0xFEFEFEFEUL)>>1));\ | 497 OP(*((uint32_t*)&dst[i*dst_stride ]), no_rnd_avg32(a, b));\ |
| 498 a= LD32(&src1[i*src_stride1+4]);\ | 498 a= LD32(&src1[i*src_stride1+4]);\ |
| 499 b= LD32(&src2[i*src_stride2+4]);\ | 499 b= LD32(&src2[i*src_stride2+4]);\ |
| 500 OP(*((uint32_t*)&dst[i*dst_stride+4]), (a&b) + (((a^b)&0xFEFEFEFEUL)>>1));\ | 500 OP(*((uint32_t*)&dst[i*dst_stride+4]), no_rnd_avg32(a, b));\ |
| 501 }\ | 501 }\ |
| 502 }\ | 502 }\ |
| 503 \ | 503 \ |
| 504 static inline void OPNAME ## _pixels8_l2(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, \ | 504 static inline void OPNAME ## _pixels8_l2(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, \ |
| 505 int src_stride1, int src_stride2, int h){\ | 505 int src_stride1, int src_stride2, int h){\ |
| 506 int i;\ | 506 int i;\ |
| 507 for(i=0; i<h; i++){\ | 507 for(i=0; i<h; i++){\ |
| 508 uint32_t a,b;\ | 508 uint32_t a,b;\ |
| 509 a= LD32(&src1[i*src_stride1 ]);\ | 509 a= LD32(&src1[i*src_stride1 ]);\ |
| 510 b= LD32(&src2[i*src_stride2 ]);\ | 510 b= LD32(&src2[i*src_stride2 ]);\ |
| 511 OP(*((uint32_t*)&dst[i*dst_stride ]), (a|b) - (((a^b)&0xFEFEFEFEUL)>>1));\ | 511 OP(*((uint32_t*)&dst[i*dst_stride ]), rnd_avg32(a, b));\ |
| 512 a= LD32(&src1[i*src_stride1+4]);\ | 512 a= LD32(&src1[i*src_stride1+4]);\ |
| 513 b= LD32(&src2[i*src_stride2+4]);\ | 513 b= LD32(&src2[i*src_stride2+4]);\ |
| 514 OP(*((uint32_t*)&dst[i*dst_stride+4]), (a|b) - (((a^b)&0xFEFEFEFEUL)>>1));\ | 514 OP(*((uint32_t*)&dst[i*dst_stride+4]), rnd_avg32(a, b));\ |
| 515 }\ | 515 }\ |
| 516 }\ | 516 }\ |
| 517 \ | 517 \ |
| 518 static inline void OPNAME ## _pixels4_l2(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, \ | 518 static inline void OPNAME ## _pixels4_l2(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, \ |
| 519 int src_stride1, int src_stride2, int h){\ | 519 int src_stride1, int src_stride2, int h){\ |
| 520 int i;\ | 520 int i;\ |
| 521 for(i=0; i<h; i++){\ | 521 for(i=0; i<h; i++){\ |
| 522 uint32_t a,b;\ | 522 uint32_t a,b;\ |
| 523 a= LD32(&src1[i*src_stride1 ]);\ | 523 a= LD32(&src1[i*src_stride1 ]);\ |
| 524 b= LD32(&src2[i*src_stride2 ]);\ | 524 b= LD32(&src2[i*src_stride2 ]);\ |
| 525 OP(*((uint32_t*)&dst[i*dst_stride ]), (a|b) - (((a^b)&0xFEFEFEFEUL)>>1));\ | 525 OP(*((uint32_t*)&dst[i*dst_stride ]), rnd_avg32(a, b));\ |
| 526 }\ | 526 }\ |
| 527 }\ | 527 }\ |
| 528 \ | 528 \ |
| 529 static inline void OPNAME ## _pixels16_l2(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, \ | 529 static inline void OPNAME ## _pixels16_l2(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, \ |
| 530 int src_stride1, int src_stride2, int h){\ | 530 int src_stride1, int src_stride2, int h){\ |
| 724 CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_c , OPNAME ## _pixels8_c , 8)\ | 724 CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_c , OPNAME ## _pixels8_c , 8)\ |
| 725 CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_x2_c , OPNAME ## _no_rnd_pixels8_x2_c , 8)\ | 725 CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_x2_c , OPNAME ## _no_rnd_pixels8_x2_c , 8)\ |
| 726 CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_y2_c , OPNAME ## _no_rnd_pixels8_y2_c , 8)\ | 726 CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_y2_c , OPNAME ## _no_rnd_pixels8_y2_c , 8)\ |
| 727 CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_xy2_c, OPNAME ## _no_rnd_pixels8_xy2_c, 8)\ | 727 CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_xy2_c, OPNAME ## _no_rnd_pixels8_xy2_c, 8)\ |
| 728 | 728 |
| 729 #define op_avg(a, b) a = ( ((a)|(b)) - ((((a)^(b))&0xFEFEFEFEUL)>>1) ) | 729 #define op_avg(a, b) a = rnd_avg32(a, b) |
| 730 #endif | 730 #endif |
| 731 #define op_put(a, b) a = b | 731 #define op_put(a, b) a = b |
| 732 | 732 |
| 733 PIXOP2(avg, op_avg) | 733 PIXOP2(avg, op_avg) |
| 734 PIXOP2(put, op_put) | 734 PIXOP2(put, op_put) |
