Cross compiling libjpeg-turbo targeting ARM for software jpeg compression
In a quest to get faster software jpeg compression on ARM I cross compiled libjpeg-turbo 1.3.0 and pitted it against standard libjpeg (libjpeg-turbo can be used as a drop in replacement for libjpeg). For 24bit rbg images of size 4096×2000, libjpeg-turbo was about twice as fast as libjpeg. Here’s how I compiled libjpeg-turbo:
First get the source:
1 | wget http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-1.3.0.tar.gz |
Then un-tar it and cd into the main source directory. Then configure for ARM:
1 2 3 | ./configure --host=arm-linux-gnueabi CC=arm-linux-gnueabi-gcc AR=arm-linux-gnueabi-ar \ STRIP=arm-linux-gnueabi-strip RANLIB=arm-linux-gnueabi-ranlib \ --prefix=<abs. path to a directory for output files> |
And make:
1 2 | make make install |
The output files will be put under the directory that you specified when you configured, copy them onto your ARM device as appropriate.