Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6711 Discussions

Fast thumbnails generation from large JPEG images

gilbert_soucy
Beginner
288 Views

Hi, I posted something very similar yesterday but it did not show up in the forum... So I try again, sorry for the inconvenience if you saw my posting form yesterday.

~~~

I need to generate fast thumbnails images from large JPEG images. I downloaded and installed IPP 5.3 with the intel compiler. I tried the djpeg sample program provided in the ipp samples (image-codecs section).

I also tried the original IJG sample code ( http://www.ijg.org/) which I compiled with gcc. I run in Linux ( Fedora 6, Intel Xeon CPU 1.70GHz ).

I got the following timing for the total execution time:

IPP: 0.639 sec

IJG: 0.114 sec

If I consider only the time between the start_decompress and destroy decompress, I get:

IPP: 0.122 sec

IJG : 0.074 sec.

I must have done something wrong to get better performance with the original IJG then with the IPP version but I am not sure what. I used exactly the same commandline in both cases. Is there anything I can do to configure IPP for speed (speed is bigger concern than quality in this application) ?

Thanks in advance for your time!

Gilbert

0 Kudos
3 Replies
Vladimir_Dudnik
Employee
288 Views

Hi Gilbert,

This is not expected result, let's try to figure out what is the problem. Could you please attach your JPEG image and specify command line parameters? It also would be nice if you can run ijg_timing application (it is part of IPP IJG sample) and specify IPP version info it prints on console.

Note,you also may want to take a look on JPEGView sample which contain IPP implementation of JPEG codec (different from IJG library). It was designed to provide the max of performance and also utilize threading (when it built with Intel Compiler)when several processor cores available.

Regards,
Vladimir

0 Kudos
gilbert_soucy
Beginner
288 Views

Hi Valdimir,

For some reason, I cannot attach a file to that message (seems to die after about 20seconds of upload, many it is too big , ~ 5.5 MB ? ). Could I send it to you directly via email ? Also, because the original picture described in my original posting is from one of our customers, I cannot send you exactly that one. The other one that Ican send to you shows also a problem but not as much.

The command line I useis:

time ./djpeg -bmp -scale 1/8 -fast /home/gsoucy/DSC_0076.JPG /home/gsoucy/out.bmp

for both djpeg programs (the IPP flavor and the original IJG).

The output of ijg_timing is:

Test program for IJG library boosted with
Intel Integrated Performance Primitives
Copyright(c) 2001-2006 Intel Corporation. All Rights Reserved.
Intel Integrated Performance Primitives
libippcore.so.5.3, 5.3 Update 3 build 85.25 {5.3.85.471}, build date Apr 26 2008
libippsw7.so.5.3, 5.3 Update 3 build 85.25 {5.3.85.508}, build date Apr 26 2008
libippiw7.so.5.3, 5.3 Update 3 build 85.25 {5.3.85.506}, build date Apr 26 2008
libippjw7.so.5.3, 5.3 Update 3 build 85.25 {5.3.85.484}, build date Apr 26 2008

I tried the ijgview. The timing I get there seems better. In fact, when I load that JPEG file (full resolution, i.e. no down scaling by 1/8), it takes about 0.7 sec. If I try djpeg without scaling or fast option, i.e:

time ./djpeg -bmp /home/gsoucy/DSC_0076.JPG /home/gsoucy/test.bmp

it takes more then 7 secs. What could explain such a difference? How could I set JPEGview to also do a down scaling to compare with djpeg?

Gilbert

0 Kudos
Vladimir_Dudnik
Employee
288 Views

Gilbert,

you can use Intel Premier Support to fill the issue report and apply sample data.

The IPP JPEG codec was designed to get the maximum performance on modern Intel processors (also it work good on other processors). You may want to take a look on picnic application (in IPP 6.0 beta) where it is possible to use IPP JPEG codec to scale down image. The Linux version of JPEGView sample does not show that possibility (though codec itself still support that feature). You also may take a look on Windows JPGView sample to see how to call IPP JPEG codec to scale down image.

Regards,
Vladimir

0 Kudos
Reply