[PATCH 3/3] winex11: Use TINN algorithm to speed up colour lookups. (try 3)

Vitaly Budovski vbudovski at gmail.com
Wed May 9 08:30:22 CDT 2007


Make use of the Triangle Inequality Nearest Neighbour algorithm to find the
nearest colour more efficiently than a simple linear search. The improvements
are most noticeable with a palette of 256 colours. Testing shows approximately
3-4x performance increase for 256 colours.
---
   dlls/winex11.drv/dib.c |  573 +++++++++++++++++++++++++++++-------------------
   1 files changed, 343 insertions(+), 230 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: d01ca3642f6f72d5a1589ab07348b1032151c731.diff
Type: text/x-patch
Size: 41630 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070509/acb0387d/d01ca3642f6f72d5a1589ab07348b1032151c731-0001.bin


More information about the wine-patches mailing list