_mm_cvtps_pi8
Classification
Header File
Synopsis
_mm_cvtps_pi8(__m128 a);
Description
Convert packed single-precision (32-bit) floating-point elements in "a" to packed 8-bit integers, and store the results in lower 4 elements of "dst". Note: this intrinsic will generate 0x7F, rather than 0x80, for input values between 0x7F and 0x7FFFFFFF.
Operation
FOR j := 0 to 3
i := 8*j
k := 32*j
IF a[k+31:k] >= FP32(0x7F) && a[k+31:k] <= FP32(0x7FFFFFFF)
dst[i+7:i] := 0x7F
ELSE
dst[i+7:i] := Convert_FP32_To_Int8(a[k+31:k])
FI
ENDFOR