MMX optimizations for KImageEffect

FredrikHöglund fredrik at kde.org
Thu Apr 10 23:18:54 CEST 2003


Hi,

Attached is a patch that adds MMX inline assembly optimizations to
the blending functions in KImageEffect that are used to blend the
transclucent menus, as well as MMX code for the intensity() function,
generously donated to KDE by Benjamin Roe.

The reason I'm posting it here before committing it is that once this
has been committed it will no longer be possible to use the stable
version of Valgrind with CVS HEAD.

The CVS version of Valgrind now supports MMX, but I'd like to know
if anyone depends on the stable release and would prefer to only
have this code enabled when kdelibs is compiled with --disable-debug.

For those interested in numbers, the performance improvements on
a Pentium4 processor are:
9x for blend(QColor, QImage, float)
7x for blend(QImage, QImage, float)
6x for intensity(QImage, float)

The Intel C++ compiler is supposed to support GNU inline assembly,
so if someone could verify that the code works with that compiler we
can add an additional #ifdef that enables the code for that as well.

Also, this patch has only been tested with GCC on the IA32
architecture, so please let me know if it causes problems for anyone
not using that.

Thanks,
Fredrik


-------------- next part --------------
A non-text attachment was scrubbed...
Name: kimageeffect.diff
Type: text/x-diff
Size: 29478 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-optimize/attachments/20030410/5656d4ed/kimageeffect-0001.bin


More information about the Kde-optimize mailing list