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

IPP 5.2 jpegview 16bit JPEG2000 broken?

jamse101
Beginner
490 Views

Anyone knows if decoding of 16bit JPEG2000 in IPP 5.2 samples is broken? I have license for IPP 5.2 and I've been trying to use decoder from jpegview but I can't get it to load 16bit JPEG2000 files that were made using encoder from same samples...

0 Kudos
13 Replies
Vladimir_Dudnik
Employee
490 Views
Hello,
there was some issue on sample level (IPP functions does work correctly) which should be fixed in the latest, IPP 6.0 version.
Regards,
Vladimir

0 Kudos
jamse101
Beginner
490 Views
Well, I got 16bit loading to work with 5.2 samples after replacing:

Ipp16s* ptr = *image;

status = ippsConvert_32s16s(i.Data(), ptr, roi.width*roi.height);

with

Ipp16s* ptr = *image;
Ipp32s* src = (Ipp32s*)i.Data();

jerr = IppConvert32s16u(src, i.LineStep(), (Ipp16u*)ptr, image->Step(), roi);

which is taken from 6.0 samples.
0 Kudos
jamse101
Beginner
490 Views

But now problem is that I see artefacts in loaded 16bit images. White areas in image get black pixels around their borders. If I open same image with IrfanView there are no black pixels and it looks like the original image.

0 Kudos
jamse101
Beginner
490 Views

Ok, changing WT53 -> WT97 removed the artefacts.

0 Kudos
Vladimir_Dudnik
Employee
490 Views
Do you see the same issue with the latest IPP 6.0 samples?
Vladimir

0 Kudos
jamse101
Beginner
490 Views

I can't test with 6.0 right now. I tried jpegview from 5.3 and it showed those same artefacts that I see with 5.2.

0 Kudos
Vladimir_Dudnik
Employee
490 Views
Could you please attach your test image so we can investigate the issue?
Vladimir

0 Kudos
jamse101
Beginner
490 Views
I built jpegview from 6.0 samples against IPP 5.2 and got exactly same artefacts.

Here is the JPEG2000 file produced:


And here are the artefacts:


If I load the same JP2 file with ImageMagick IMDisplay or IrfanView, no artefacts can be seen.

0 Kudos
jamse101
Beginner
490 Views
Quoting - jamse101
I built jpegview from 6.0 samples against IPP 5.2 and got exactly same artefacts.

I meant that I took jpeg2000 encoder/decoder from 6.0 samples and not the whole jpegview.

0 Kudos
Vladimir_Dudnik
Employee
490 Views
could you please try this file with j2kit application or JPEGView application or picnic application from IPP 6.0?
Vladimir

0 Kudos
jamse101
Beginner
490 Views

I installed these:

w_ipp_em64t_p_6.0.0.062.exe

w_ipp-samples_p_6.0.0.117.zi

And built jpegview with Visual Studio 2005 (x64) and I can see same artefacts when I try to load the JP2 file.

0 Kudos
jamse101
Beginner
490 Views

Oh, I earlier used Borland C++ Builder 2006 and built for Win32 target.

0 Kudos
jamse101
Beginner
490 Views

Problem solved. It turns out that the JPEG2000 encoder ignores mode field from PARAMS_JPEG2K and quality field is not actually quality between 1% and 100% but compression ratio and it has to be set to zero to get lossless compression.

0 Kudos
Reply