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

How to decode only DC coefficients from JPEG data.

kamildobk1
Beginner
397 Views
Currently I call :

::ippiDecodeHuffman8x8_JPEG_1u16s_C1()

to decode the stream and next I take DC coefficient, but this single function takes over 60% of JPEG decoder time, so speed gain is rather low. Maybe somebody knows how I can improve efficiency in that case ( what function should I use to decode Huffman stream or to find positions of DC coeffs whithin a compressed stream ).

Kamil
0 Kudos
1 Reply
Vladimir_Dudnik
Employee
397 Views

Hi Kamil,

we do not provide function to only decode DC coefficient from bitstream. In any case you have to decode all AC coefficients as well, otherwise there is no way to find the next DC coefficient, so I see no big opportunity for optimization here.

BTW, our measurement indicates that VLD decoding takes about 30% of time from whole JPEG decoding on Intel Pentium 4 and later processors.

Can you check that optimized version of code is used in your case? You can see it with that simple code:

 const IppLibraryVersion* ippj = ippjGetLibVersion();
 printf("Intel Integrated Performance Primitives
");
printf(" version: %s, [%d.%d.%d.%d] ",
ippj->Version, ippj->major, ippj->minor, ippj->build, ippj->majorBuild);
printf(" name: %s ", ippj->Name);
printf(" date: %s ", ippj->BuildDate);

Regards,
Vladimir

0 Kudos
Reply