- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you are right, I forgot to move the decoding position after the RST marker when restart occured too.
Thank you very much,
Kamil
Thank you very much,
Kamil
Message Edited by mac_kal@alnet.pl on 04-13-200607:22 AM

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page