_mm_sad_pu8
Classification
SSE_ALL, Miscellaneous, CPUID Test: SSE
Header File
Instruction
PSADBW mm, mm
Synopsis
_mm_sad_pu8(__m64 a, __m64 b);
Description
Compute the absolute differences of packed unsigned 8-bit integers in "a" and "b", then horizontally sum each consecutive 8 differences to produce four unsigned 16-bit integers, and pack these unsigned 16-bit integers in the low 16 bits of "dst".
Operation
FOR j := 0 to 7
i := j*8
tmp[i+7:i] := ABS(a[i+7:i] - b[i+7:i])
ENDFOR
dst[15:0] := tmp[7:0] + tmp[15:8] + tmp[23:16] + tmp[31:24] + tmp[39:32] + tmp[47:40] + tmp[55:48] + tmp[63:56]
dst[63:16] := 0