22 #ifndef AVCODEC_RND_AVG_H 23 #define AVCODEC_RND_AVG_H 28 #define BYTE_VEC32(c) ((c) * 0x01010101UL) 29 #define BYTE_VEC64(c) ((c) * 0x0001000100010001UL) 33 return (a | b) - (((a ^
b) & ~
BYTE_VEC32(0x01)) >> 1);
38 return (a & b) + (((a ^
b) & ~
BYTE_VEC32(0x01)) >> 1);
43 return (a | b) - (((a ^
b) & ~
BYTE_VEC64(0x01)) >> 1);
48 return (a & b) + (((a ^
b) & ~
BYTE_VEC64(0x01)) >> 1);
static uint64_t no_rnd_avg64(uint64_t a, uint64_t b)
static uint32_t no_rnd_avg32(uint32_t a, uint32_t b)
static uint32_t rnd_avg32(uint32_t a, uint32_t b)
static uint64_t rnd_avg64(uint64_t a, uint64_t b)