_mm_sad_epu8

Microsoft Specific

Computes the absolute difference of the 16 unsigned 8-bit integers from a and the 16 unsigned 8-bit integers from b.

__m128i _mm_sad_epu8 (__m128i a, __m128i b);
PSADBW

Return Value

Sums the upper 8 differences and lower 8 differences and packs the resulting 2 unsigned 16-bit integers into the upper and lower 64-bit elements.

r0 := abs(a0 - b0) + abs(a1 - b1) +...+ abs(a7 - b7)
r1 := 0x0 ; r2 := 0x0 ; r3 := 0x0
r4 := abs(a8 - b8) + abs(a9 - b9) +...+ abs(a15 - b15)
r5 := 0x0 ; r6 := 0x0 ; r7 := 0x0

Requirements

Header: emmintrin.h

END Microsoft Specific

See Also

Concepts

Arithmetic Operations (Integer SSE2 Intrinsics)