30 static void put_pixels_clamped_mvi(
const int16_t *
block,
uint8_t *pixels,
34 uint64_t clampmask =
zap(-1, 0xaa);
37 uint64_t shorts0, shorts1;
40 shorts0 =
maxsw4(shorts0, 0);
41 shorts0 =
minsw4(shorts0, clampmask);
44 shorts1 =
ldq(block + 4);
45 shorts1 =
maxsw4(shorts1, 0);
46 shorts1 =
minsw4(shorts1, clampmask);
54 void add_pixels_clamped_mvi(
const int16_t *block,
uint8_t *pixels,
60 uint64_t clampmask =
zap(-1, 0xaa);
61 uint64_t signmask =
zap(-1, 0x33);
62 signmask ^= signmask >> 1;
65 uint64_t shorts0, pix0, signs0;
66 uint64_t shorts1, pix1, signs1;
69 shorts1 =
ldq(block + 4);
73 signs0 = shorts0 & signmask;
78 shorts0 =
maxsw4(shorts0, 0);
79 shorts0 =
minsw4(shorts0, clampmask);
83 signs1 = shorts1 & signmask;
87 shorts1 =
maxsw4(shorts1, 0);
88 shorts1 =
minsw4(shorts1, clampmask);