Here are some tests i did with the AlarmedPixels SSE2. Not much improvement over the non-SSE2 code because this part of the motion detection only accounts for about 10% of zma's cpu usage.
6th July 2011 EDIT:
The standard alarmedpixels code is now a lot faster than before, and also faster than the SSE2 AlarmedPixels. I updated the tests below to include this change (pointed by an arrow).
Processor: Intel Core 2 duo E6750 with SSSE3.
ZoneMinder compiled as 64bit with default compiler and linker flags
JPEG library installed: libjpeg-turbo v1.1.0
Monitor settings: 1280x800 JPEG image (File monitor) @ 20 fps, Modect mode.
The default zone covering up the whole picture.
Stock ZM 1.24.4:
Code: Select all
24bit - AlarmedPixels:
13465 apache 20 0 492m 305m 296m R 32 7.7 0:11.77 zmc
13497 apache 20 0 494m 306m 295m S 32 7.7 0:10.39 zma
Unable to test 8bit grayscale because it doesn't work.
Patch:
Code: Select all
32bit - AlarmedPixels SSE2:
5928 apache 20 0 562m 397m 393m R 29 10.0 0:25.81 zmc
5933 apache 20 0 563m 402m 393m S 14 10.2 0:12.57 zma
32bit - AlarmedPixels:
6552 apache 20 0 562m 397m 393m S 29 10.0 0:09.81 zmc
6585 apache 20 0 563m 402m 393m S 15 10.2 0:04.47 zma ------> is now 12% in patch v1f and newer.
24bit - AlarmedPixels SSE2:
6128 apache 20 0 463m 299m 296m S 29 7.6 0:13.25 zmc
6161 apache 20 0 464m 304m 295m S 17 7.7 0:06.83 zma
24bit - AlarmedPixels:
6353 apache 20 0 463m 299m 296m S 29 7.6 0:12.03 zmc
6389 apache 20 0 464m 304m 295m S 18 7.7 0:06.74 zma ------> is now 15% in patch v1f and newer.
8bit grayscale - AlarmedPixels SSE2:
6922 apache 20 0 266m 104m 100m S 20 2.6 0:04.22 zmc
6927 apache 20 0 267m 106m 100m S 8 2.7 0:01.55 zma
8bit grayscale - AlarmedPixels:
6721 apache 20 0 266m 104m 100m S 20 2.6 0:07.45 zmc
6726 apache 20 0 267m 106m 100m S 9 2.7 0:03.22 zma ------> is now 6% in patch v1f and newer.
mastertheknife
Kfir Itzhak.