Go to the documentation of this file.
22 #ifndef AVCODEC_RND_AVG_H
23 #define AVCODEC_RND_AVG_H
28 #define CALL_2X_PIXELS(a, b, n)\
29 static void a(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h){\
30 b(block , pixels , line_size, h);\
31 b(block+n, pixels+n, line_size, h);\
34 #define BYTE_VEC32(c) ((c)*0x01010101UL)
35 #define BYTE_VEC64(c) ((c)*0x0001000100010001UL)
39 return (a | b) - (((a ^
b) & ~
BYTE_VEC32(0x01)) >> 1);
44 return (a & b) + (((a ^
b) & ~
BYTE_VEC32(0x01)) >> 1);
49 return (a | b) - (((a ^
b) & ~
BYTE_VEC64(0x01)) >> 1);
54 return (a & b) + (((a ^
b) & ~
BYTE_VEC64(0x01)) >> 1);