jpeg SIMD (MMX) success!
jpeg SIMD (MMX) success!
Howdy,
I spent several days a few months back trying to get the MJPEG project's jpeg-mmx package to work with ZM. I came to the realization that it is incomplete and unworkable. I even took a look at Intel's IPP package, but the licensing was restrictive, and the packaging was yucky.
Then, a couple of days ago I stumbled accross this:
http://cetus.sakura.ne.jp/softlab/jpeg- ... gsimd.html
an IJG JPEG library with x86 SIMD extensions. It's not AMD64 ready yet (but maybe soon!), so I spent the morning getting it set up on my home machine with a single camera attached.
And, it works! At least it seems to so far. I'm getting video, no crashes, and performance is excellent. The zmc process is now taking 21% cpu on top instead of 45%, and load is down by half.
So give it a shot, and if someone knows japanese, thank the author for me.
-David
I spent several days a few months back trying to get the MJPEG project's jpeg-mmx package to work with ZM. I came to the realization that it is incomplete and unworkable. I even took a look at Intel's IPP package, but the licensing was restrictive, and the packaging was yucky.
Then, a couple of days ago I stumbled accross this:
http://cetus.sakura.ne.jp/softlab/jpeg- ... gsimd.html
an IJG JPEG library with x86 SIMD extensions. It's not AMD64 ready yet (but maybe soon!), so I spent the morning getting it set up on my home machine with a single camera attached.
And, it works! At least it seems to so far. I'm getting video, no crashes, and performance is excellent. The zmc process is now taking 21% cpu on top instead of 45%, and load is down by half.
So give it a shot, and if someone knows japanese, thank the author for me.
-David
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
very very interseting mate. Very well done. I hav ebeen hoping for mmx option as i dont think it can be there by default due to arch issues, but bloody well done mate. Dont suppose you fancy documenting what you did?
Pretty please
James
Pretty please
James
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
It's a drop in replacement for the standard IJG libs. I'm using Gentoo, so I created an ebuild that used the SIMD source instead of the standard source.
The ebuild is pretty hacky right now, so I'm not going to release it, but I'll try and clean it up when I get back from vacation next week.
You should be able to just compile the SIMD source and drop the resulting libs over your existing ones.
-David
The ebuild is pretty hacky right now, so I'm not going to release it, but I'll try and clean it up when I get back from vacation next week.
You should be able to just compile the SIMD source and drop the resulting libs over your existing ones.
-David
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
ok i will try thankyou v. much
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
ok then slightl;y out my depth here i think!!!
Downloaded source
./configure --enable-shared
make
make test
make install
Now i assume i have a shared jpeg lib
How do i make the system use the new library?
Cheers again
Downloaded source
./configure --enable-shared
make
make test
make install
Now i assume i have a shared jpeg lib
How do i make the system use the new library?
Cheers again
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Well, if make install copied them over your previous libraries then all you'd need to do is run ldconfig and restart ZM.
Does anyone on this board speak Japanese? I've emailed the author on the status of the AMD64 source, but received no response. I'd love it if someone would email or post to the support forum he has in Japanese to find out what the status is.
-David
Does anyone on this board speak Japanese? I've emailed the author on the status of the AMD64 source, but received no response. I'd love it if someone would email or post to the support forum he has in Japanese to find out what the status is.
-David
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
it didnt but i copied them over my old libs and wow what a difference on a celeron 3.2 gig went form 29% idle to 54% idle
Well done on the find and the share mate!!
Cheers
Well done on the find and the share mate!!
Cheers
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
i would have thought so, wasnt the original cyrix (m1) pin compatible with a p1mmx
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
-
- Posts: 74
- Joined: Wed Feb 25, 2004 5:06 pm
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
just tested thins on my big test rig
1 megapixel 1280x1024 running at 10 fps + 6 x 640x480 at 2 fps on an fx60
55%% user 4.6%user 37.9% idle (ish)
Had 3% idle before mmx library.
1 megapixel 1280x1024 running at 10 fps + 6 x 640x480 at 2 fps on an fx60
55%% user 4.6%user 37.9% idle (ish)
Had 3% idle before mmx library.
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
has with me on amd x2, celeron, and p4. Have yet to test a sempron and a pentiumd
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk