Closed iseahound closed 1 year ago
Current implementation of SSE2 causes pixels to be double or triple counted.
Only occurs when the number of side by side colors is more than 3:
#include *i ImagePut%A_TrayMenu%.ahk #include *i ImagePut (for v%true%).ahk #singleinstance force pic := ImagePutBuffer("d.png") ; Load image pic.show() ; or ImageShow(pic) ; Show image if xys := pic.PixelSearchAll([0xED1C24, 1, 2, 0x000000]) { ; Get [x, y] of 0xFFFFFF MouseMove(xys[1]*) ; Move cursor Send "{MButton}" MsgBox xys.length } else Reload ; Restart
for the image: https://github.com/iseahound/ImagePut/assets/9779668/9d3c78a9-5ba5-4e3a-b178-c0616966a0fe
The solutions are here: pixelsearchall3: https://godbolt.org/z/evaxq93fd pixelsearch3: https://godbolt.org/z/drTev8Kx3
In addition: optimizations have also been made such that the SIMD instructions exist one after the other, which produced a 20% increase in speed in my testing.
Fixed by 33c2a9a2d94f39f1fc1b0e464903fa63bc5d6afd
Current implementation of SSE2 causes pixels to be double or triple counted.
Only occurs when the number of side by side colors is more than 3:
for the image: https://github.com/iseahound/ImagePut/assets/9779668/9d3c78a9-5ba5-4e3a-b178-c0616966a0fe
The solutions are here: pixelsearchall3: https://godbolt.org/z/evaxq93fd pixelsearch3: https://godbolt.org/z/drTev8Kx3
In addition: optimizations have also been made such that the SIMD instructions exist one after the other, which produced a 20% increase in speed in my testing.