libjpeg-mmx patch 
  Introduction 
I use motion for a webcam streaming server only with 3 cam's on an old Pentium 233 MMX with 3 frames per second
(one usb [pwc] and two video tv-cards [bttv and saa7134]).
The 
cpu uses nearly 
90% according to top (20% system). Yes it's working i get 3 frames for each cam but with 4 frames 
Most of cpu time is used by jpeg encoding, so i searched for a way to get more performance and found 
libjpeg-mmx.
Now my 
cpu uses nearly 
53% according to top (20% system).
  Description of Patch 
Reduce radical cpu time for jpeg handling (encode/decode).
  Installation of Patch 
patch<configure.in.diff
unpack 
MMX Jpeg from 
http://sourceforge.net/projects/mjpeg/ to a subdir of motion (ex. jpeg-mmx)
motion/jpeg-mmx$ ./configure
motion$ autoconf
motion$ ./configure --with-jpeg-mmx=./jpeg-mmx
or for 
debian apt-get libjpeg-mmx-dev (this is an older Version but woks for me)
motion$ ./configure --with-jpeg-mmx
  Change History of Patch 
 
-  motion-3.2.1-libjpegmmx-1 , 2 Jul 2005 
-  Initial Release against motion-3.2.1
 
 
  -  motion-3.2.1-libjpegmmx-2 , 3 Jul 2005 
-  cosmetic cleanup - patch against motion-3.2.1/motion-3.2.2_snap4
 
 
  -  motion-3.2.1-libjpegmmx-3 , 17 Jul 2005 
-  Patch again last snapshot motion-3.2.2_snap6
  -  Added autodetection feature and some cosmetic changes.
  -  Option to skip to use it ( to build RPM/DEB packages ).
 
 
 
 
Interesting patch. Very interesting.
The configure change you have made - how well does it cope with machine without this library?
Is the libjpeg-mmx available as RPMs and debs?
The libjpeg-mmx seems to be not a mature release version. Is it still in active development? Is it available for FC4 for example?
If I unstall your patch can I still make an RPM for distribution that does not require this library?
-- 
KennethLavrsen - 09 Jul 2005
Just to show that we do not ignore this patch 
http://koala.ilog.fr/twikiirc/bin/irclogger_log/motion?date=2005-07-10,Sun&sel=8#l4
-- 
KennethLavrsen - 10 Jul 2005
Patch finished as we discussed in above url. Now motion accepts the parameter --with-jpeg-mmx=DIR .
 
-  If this parameter is not passed to configure or is empty , tries to autodetect libjpeg-mmx in /usr/lib and /usr/local/lib if not found follows the old behaviour trying to find libjpeg.
  -  If this parameter is passed motion search the library in DIR.
  -  To skip use libjpeg-mmx --with-jpeg-mmx=no have to be passed to configure ( to build RPM / DEB i.ex ).
 
 
-- 
AngelCarpintero - 17 Jul 2005
Thanks Angel. That is great 
Small question: Will --without-jpeg-mmx also work like the other options?
-- 
KennethLavrsen - 17 Jul 2005
 Yes Kenneth , it works like 
--with-ffmpeg so   
--without-jpeg-mmx and 
--with-jpeg-mmx=no are equivalent.
-- 
AngelCarpintero - 17 Jul 2005
Will be in snap7
-- 
KennethLavrsen - 17 Jul 2005