cogl: Use SSE2 when possible for premultiplying
authorNeil Roberts <neil@linux.intel.com>
Fri, 18 Dec 2009 21:17:21 +0000 (21:17 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 9 Feb 2010 11:03:21 +0000 (11:03 +0000)
commit1b2ff7eff7e97d8542e35514bfa010be706973ee
treeee847ba68ecf3f220bc802ceea1fe1ecaa1a182f
parentbbb058df40a5e1acf7b8e42049c3cd5d966f762d
cogl: Use SSE2 when possible for premultiplying

This adds a fast path for premultiplying an RGBA image using SSE2
instructions. SSE registers are 128-bit and we need at least 16-bits
per component for the intermediate result of the multiplication so we
can do two pixels in parallel with one register. The function
interleaves 2 SSE registers to multiply 4 pixels in one function call
with the hope that this will pipeline better.

http://bugzilla.openedhand.com/show_bug.cgi?id=1939
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
clutter/cogl/cogl/cogl-bitmap-fallback.c