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

Vitaly Budovski vbudovski at gmail.com
Sun May 6 09:19:54 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 |  609 ++++++++++++++++++++++++++++++------------------
  1 files changed, 381 insertions(+), 228 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a377e5c38e29ebdcd5f6bd98a8a03b9c5dc76336.diff
Type: text/x-patch
Size: 43482 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070507/50c00a5c/a377e5c38e29ebdcd5f6bd98a8a03b9c5dc76336-0001.bin

More information about the wine-patches mailing list