libjpeg-turbo


Introduction:

LIBJPEG-TURBO is an accelerated version of the LIBJPEG library
for the creation, compression, decompression, and manipulation
of graphics data in the JPEG format.

JPEG is a very widely used format for storing compressed versions of
images and photographs. JPEG compression is lossy; the user can
control the amount of compression by specifying the "quality", as
an integer percentage between 0 and 100, but even at 100 percent quality,
there will still be some irrecoverable data loss during compression.

The LIBJPEG library is the standard implementation of the utilities
that compress, store, decompress, and manipulate graphics data in
accordance with the JPEG format. The LIBJPEG-TURBO library is
a version of LIBJPEG which has been accelerated by the use of SIMD
instructions. The LIBJPEG-TURBO library claims to achieve speeds
2 to 6 times faster than the standard LIBJPEG library.

Web Site:


http://libjpeg-turbo.virtualgl.org/

Reference:

Usage:

On any ARC cluster, check the installation details
by typing "module spider libjpeg-turbo".

LIBJPEG-TURBO requires that the appropriate modules be loaded before it can be run.
One version of the appropriate commands for use on NewRiver is:

module purge
module load gcc/5.2.0
module load libjpeg-turbo/1.5.1
    

Examples:

The following batch file compiles a user program, links it to the
LIBJPEG-TURBO library, and runs the resulting executable, which
computes some image data and writes it to a JPG image file.

#! /bin/bash
#
#PBS -l walltime=00:05:00
#PBS -l nodes=1:ppn=1
#PBS -W group_list=newriver
#PBS -q open_q
#PBS -j oe
#
cd $PBS_O_WORKDIR
#
module purge
module load gcc/5.2.0
module load libjpeg-turbo/1.5.1
#
gcc -c -I$LIBJPEG_TURBO_INC libjpeg-turbo_test.c
#
gcc libjpeg-turbo_test.o -L$LIBJPEG_TURBO_LIB -ljpeg -lturbojpeg -lm
#
mv a.out libjpeg-turbo_test
#
./libjpeg-turbo_test
#
rm libjpeg-turbo_test.o
rm libjpeg-turbo_test

A complete set of files to carry out a similar process are available in
libjpeg-turbo_example.tar