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

JPEG Grayscale Lossless compresion distortion

jboaz123
Beginner
1,083 Views

Hi,

I am trying to make lossless compression ofgrayscale 8 to 16 bitimages.

I set the restart interval to theimage width value so ippiDiffPredFirstRow_JPEG_16s_C1 done for all rows.

Problem is that for image with presicion > 8 compression result is distorted in a way that look like one line crash another.

In case I change logic so ippiDiffPredRow_JPEG_16s_C1 will done for all rows (except the first line) than distortion not occur but pixel valus overlapping occur.

Please advice

0 Kudos
16 Replies
Vladimir_Dudnik
Employee
1,083 Views

What version of IPP and sample package do you use? Have you tried IPP UIC sample to see if the problem can be reproduced with UIC picnic application or uic_transcoder_con application?

Regards,
Vladimir

0 Kudos
jboaz123
Beginner
1,083 Views

I update IPP version to 6.1.2.041 and I am using UIC sample I download a week ago from Interl site.

After update IPP version problem occur only in 16 bit image (8, 10, 12 and 14 it's ok).

See attached files.

10x

0 Kudos
Vladimir_Dudnik
Employee
1,082 Views

Thanks for your update. I can't see the first image but there is no problem with the rest. Could you please also describe what steps did you take running picnic application. (I'm looking for the way for us to reproduce the problem quickly). So, we need to know exact parameters applyied for UIC JPEG compression

Vladimir

0 Kudos
jboaz123
Beginner
1,083 Views
I download w_ipp-uic_p_6.1.3.052 and operate picnic.exe from C:\Documents and Settings\boaz\Desktop\w_ipp-uic_p_6.1.3.052\ipp-samples\image-codecs\uic\bin\win32
0 Kudos
Vladimir_Dudnik
Employee
1,083 Views

Thanks, could you please also describe in steps how do you compress your image with picnic application. I'm lookiing for something like this:

1. Open source image (is that available in your attachment in forum post?) through FileOpen dialog
2. Set compression options (which exactly?) through View\Options dialog. Note, this is most important section, so we can check issue following exactly your steps.
3. Store image with SaveAs dialog (what is corresponding file name in your attachment?)

Regards,
Vladimir

0 Kudos
jboaz123
Beginner
1,082 Views

1. See 985bd046-26fe-475d-aaf4-9c210ecdf03c.dcm attached file

2. Bit per pixel - 16

Image width - 1536, image height - 1536(same values set on IppiSize roi)

m_mcuWidth = 1;

m_mcuHeight = 1;

m_numxMCU = (1536 + (m_mcuWidth - 1)) / m_mcuWidth;

m_numyMCU = (1536 + (mcuHeight - 1)) / m_mcuHeight;

m_jpeg_restart_interval = 1536 (or0)

m_restarts_to_go = m_jpeg_restart_interval

predictor - 1

Step - 1536*sizeof(Ipp16s)

3. Gray, 444, LSL, restart interval checked and use optimal huffman table.

Anyhow duplicating problem occur for images withbit per pixel> 8

10x

0 Kudos
jboaz123
Beginner
1,083 Views

See source code file

10x

0 Kudos
Sergey_Ryadno
New Contributor I
1,083 Views
Hi, i try to open attached DICOM filewith picnic and it return me error.Are you sure that attached file is correct?
0 Kudos
jboaz123
Beginner
1,083 Views

Yes, this file open correctlly using Osirisand Rubo viewer.

Try attached file 16bit_Comppressed_to_Jpeg_Lossless_using_Osiris.dcm

Comppressedjpeg DICOM image that done by osiris is displayed correctlly in the osiris and in Rubo viewer but the picnic fail.

0 Kudos
Vladimir_Dudnik
Employee
1,083 Views

Thanks,

we can reproduce issue with this file, so we will investigate and come back to you soon.

Regards,
Vladimir

0 Kudos
Sergey_Ryadno
New Contributor I
1,083 Views

Hi jboaz123,

i think i found the problem. In file jpeg.cpp in function ReadImageJPEG() change line #251 from

dataOrder.LineStep() [0] = ((geometry.RefGridRect().Width() * nOfComponents + 3) & ~3);

to

dataOrder.LineStep() [0] = ((geometry.RefGridRect().Width() * nOfComponents * du + 3) & ~3);

Please write here if this changes help to resolve you issue or not.

i also attach jpeg.cpp file itself with this changes.

0 Kudos
jboaz123
Beginner
1,083 Views

Hi Sryadno,

I am not beside my workstation, does it solved to you?

0 Kudos
jboaz123
Beginner
1,082 Views

Hi,

I have problem in my environment to compile the picnic.

Can you add the compiled picnic.

10x

0 Kudos
Sergey_Ryadno
New Contributor I
1,083 Views

Hi,

I attach picnic application with corresponded chenges.

0 Kudos
jboaz123
Beginner
1,083 Views

Hi,

Problem solved using attached picnic.

Thank you very much.

0 Kudos
Chao_Y_Intel
Moderator
1,083 Views


IPP 6.1 update5 includes the fix for this problem. Check here to learn more on IPP 6.1 bug fix list:
http://software.intel.com/en-us/articles/intel-ipp-library-61-fixes-list/

Thanks,
Chao
0 Kudos
Reply