[cairo] SSE support in pixman
Jeff Muizelaar
jeff at infidigm.net
Tue Mar 11 07:40:12 PDT 2008
On Mon, Mar 10, 2008 at 11:20:14PM -0300, André Tupinambá wrote:
> + /* pix_multiply */
> + mulLo = _mm_mulhi_epu16 (xmmDstLo, xmmAlphaLo);
> + mulHi = _mm_mulhi_epu16 (xmmDstHi, xmmAlphaHi);
> + mulLo = _mm_adds_epu16 (mulLo, xmmMask0080);
> + mulHi = _mm_adds_epu16 (mulHi, xmmMask0080);
> + mulLo = _mm_adds_epu16 (mulLo, _mm_srli_epi16 (mulLo,8));
> + mulHi = _mm_adds_epu16 (mulHi, _mm_srli_epi16 (mulHi,8));
> + mulLo = _mm_srli_epi16 (mulLo, 8);
> + mulHi = _mm_srli_epi16 (mulHi, 8);
The hunk above should be faster if you use something like:
> + mulLo = _mm_mulhi_epu16 (mulLo, xmmMask0101);
> + mulHi = _mm_mulhi_epu16 (mulHi, xmmMask0101);
i.e (a+a>>8)>>8 == (a*257)>>16
-Jeff
More information about the cairo
mailing list