Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

Decoding JPEG with RST markers

Maciej_K_
Beginner
1,188 Views
I don't know what I'm doing wrong:

I call:

ippiDecodeHuffman8x8_JPEG_1u16s_C1( m_inptr, len, &pos, block, &comp->dc_pred, &pMarker, huff_dc, huff_ac, m_huff_state );

It decodes image correctly up to first RST marker. It correctly returns pMarker = 0xd0 and ippStsNoErr. Now I call:

if ( m_restart_interval && n_left_to_restart == 0 )
{
m_comp[0].dc_pred = 0;
m_comp[1].dc_pred = 0;
m_comp[2].dc_pred = 0;
ippiDecodeHuffmanStateInit_JPEG_8u( m_huff_state );
n_left_to_restart = m_restart_interval;
}

But all next calls to ippiDecodeHuffman8x8_JPEG_1u16s_C1 return ippStsJPEGOutOfBufErr. JPEGs with no RST markers are decoded correctly. I'm using IPP4.1.

Am I missing something ?

Please help,
Kamil
0 Kudos
2 Replies
Vladimir_Dudnik
Employee
1,188 Views

Hi Kamil,

I can guess that you did not clear variable pointed by pMarker before decoding next restart interval. Note, that is input/output parameter for function ippiDecodeHuffman8x8.

You can refer to IPP JPEGView sample for details how to implement JPEG codec with IPP functions.

Regards,
Vladimir

0 Kudos
Maciej_K_
Beginner
1,188 Views
Yes, you are right, I forgot to move the decoding position after the RST marker when restart occured too.



Thank you very much,

Kamil

Message Edited by mac_kal@alnet.pl on 04-13-200607:22 AM

0 Kudos
Reply