Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
6621 Discussions

Decoding overflow / failure in latest IPP JPEG code with attached image

johnt
Beginner
208 Views
Hi there,

The latest IPP JPEG code loads the following image incorrectly when using 1/8th size (JD_1_8):
http://www.jrmediacenter.com/DevZone/CustomApps/Temporary/Heroes_1b468487.jpg

The black area at the bottom of the image gets blown out to white (overflow?).

Please note that we're using IPP in a widely used, commercially shipping product, and this is the first image we've seen this on.

Thanks,
-John
0 Kudos
7 Replies
johnt
Beginner
208 Views

Vladimir_Dudnik
Employee
208 Views
Hi there,

The latest IPP JPEG code loads the following image incorrectly when using 1/8th size (JD_1_8):
http://www.jrmediacenter.com/DevZone/CustomApps/Temporary/Heroes_1b468487.jpg

The black area at the bottom of the image gets blown out to white (overflow?).

Please note that we're using IPP in a widely used, commercially shipping product, and this is the first image we've seen this on.

Thanks,
-John

Hi John,

What version of IPP do you use and what JPEG codec (is that from JPEGView sample or UIC codecs?)

Regards,
Vladimir
johnt
Beginner
208 Views

Hi John,

What version of IPP do you use and what JPEG codec (is that from JPEGView sample or UIC codecs?)

Regards,
Vladimir


Hi Vladimir,

We were using IPP 5.3 (with some custom patches we worked out together to fix existing bugs).

Because of this problem,we updated to IPP 6.0.1:
w_ipp_ia32_p_6.0.1.070.exe
w_ipp-samples_p_6.0.0.127.zip

The JPEG code is from JPEGView.

Updating to 6.0.1 did not change the problem in any way.

Thanks,
John
Vladimir_Dudnik
Employee
208 Views
Thanks for info, we were able to reproduce the issue. Please stay tuned, we will do our best to provide you fix.

Regards,
Vladimir
johnt
Beginner
208 Views
Thanks for info, we were able to reproduce the issue. Please stay tuned, we will do our best to provide you fix.

Regards,
Vladimir

Thanks Vladimir. We'll stand by for a fix.

John
Sergey_Ryadno
New Contributor I
208 Views
hiJohn.
Try to change in jpegdec.cpp definition ofDCT_QUANT_INV8x8To1x1LS macro from
#define DCT_QUANT_INV8x8To1x1LS(pMCUBuf, dst, qtbl)
{
int val = (Ipp8u)(((pMCUBuf[0] * qtbl[0]) >> 3) + 128);
dst[0] = (Ipp8u)(val > 255 ? 255 : (val < 0 ? 0 : val));
}

to this

#define DCT_QUANT_INV8x8To1x1LS(pMCUBuf, dst, qtbl)
{
int val = (((pMCUBuf[0] * qtbl[0]) >> 3) + 128);
dst[0] = (Ipp8u)(val > 255 ? 255 : (val < 0 ? 0 : val));
}
johnt
Beginner
208 Views
Quoting - sryadno
hiJohn.
Try to change in jpegdec.cpp definition ofDCT_QUANT_INV8x8To1x1LS macro from
#define DCT_QUANT_INV8x8To1x1LS(pMCUBuf, dst, qtbl)
{
int val = (Ipp8u)(((pMCUBuf[0] * qtbl[0]) >> 3) + 128);
dst[0] = (Ipp8u)(val > 255 ? 255 : (val < 0 ? 0 : val));
}

to this

#define DCT_QUANT_INV8x8To1x1LS(pMCUBuf, dst, qtbl)
{
int val = (((pMCUBuf[0] * qtbl[0]) >> 3) + 128);
dst[0] = (Ipp8u)(val > 255 ? 255 : (val < 0 ? 0 : val));
}

Thank you very much. That does the trick.

Cheers,
John
Reply