35 static void put_pixels_clamped_mvi(
const int16_t *
block,
uint8_t *pixels,
39 uint64_t clampmask = zap(-1, 0xaa);
42 uint64_t shorts0, shorts1;
45 shorts0 = maxsw4(shorts0, 0);
46 shorts0 = minsw4(shorts0, clampmask);
47 stl(pkwb(shorts0), pixels);
49 shorts1 = ldq(block + 4);
50 shorts1 = maxsw4(shorts1, 0);
51 shorts1 = minsw4(shorts1, clampmask);
52 stl(pkwb(shorts1), pixels + 4);
59 void add_pixels_clamped_mvi(
const int16_t *
block,
uint8_t *pixels,
65 uint64_t clampmask = zap(-1, 0xaa);
66 uint64_t signmask = zap(-1, 0x33);
67 signmask ^= signmask >> 1;
70 uint64_t shorts0, pix0, signs0;
71 uint64_t shorts1, pix1, signs1;
74 shorts1 = ldq(block + 4);
76 pix0 = unpkbw(ldl(pixels));
78 signs0 = shorts0 & signmask;
83 shorts0 = maxsw4(shorts0, 0);
84 shorts0 = minsw4(shorts0, clampmask);
87 pix1 = unpkbw(ldl(pixels + 4));
88 signs1 = shorts1 & signmask;
92 shorts1 = maxsw4(shorts1, 0);
93 shorts1 = minsw4(shorts1, clampmask);
95 stl(pkwb(shorts0), pixels);
96 stl(pkwb(shorts1), pixels + 4);
105 uint64_t *p = (uint64_t *) blocks;
106 int n =
sizeof(int16_t) * 6 * 64;
126 if (!high_bit_depth) {