views:

524

answers:

6

I am using c++, libjpeg for decoding jpeg file. I find it is not fast enough, is there any method to make it faster by setting some compile parameter? or are there any other lib can open jpeg files more faster?

now it takes about 750ms to open a 4368 * 2912 4m jpeg image. I wish this can be reduced to 150ms. Many thanks!

Added: IJL seems faster than libjpeg:)

+1  A: 

There's the Intel Performance Primitives which contains JPEG coding/decoding implementations

the_mandrill
it's not free .
Shay Erlichmen
@Shay: ok, but the sxingfeng asked for free or commercial software, so 'it must be free' wasn't a requirement.
Jesper
many thanks! jesper, I will try it.
+2  A: 

I use libjpeg from ijg. It's documented how to modify for your purposes, like coding/decoding in memory.

coelhudo
many thanks!I also tried to ijl it takes just 600ms on my AMD computer, maybe faster on intel cpu. I think manybe it is possible to take less then 400ms.
+2  A: 

The fastest way is not to decode it at all. Usually you can use a low-res preview first; that requires only the low frequencies. For a 546 x 289 pixel preview, you in fact only need the (0,0) (DC) component.

MSalters
A: 

I think DirectX and libSDL can decode jpegs - although libSDL might use libjpeg for decoding.

Tobias Langner
A: 

Also see http://sourceforge.net/projects/libjpeg-turbo/ for a drop-in replacement of libjpeg that uses SIMD instructions for a significant performance boost.

adzm
A: 

Try our website "instantimage.com" We just completed a lightening fast JPEG decompression. Dave Schroeder, Performance Imaging, Inc.

Dave Schroeder