Community
cancel
Showing results for 
Search instead for 
Did you mean: 
nyryder
Beginner
74 Views

IPP samples ZLIB implementation issues.

I am trying to use the IPP ZLIB sample code with reduced memory window.
I changed the MAX_WBITS from 15 to 14 and MAX_MEM_LEVEL from 9 to 8 in zconf.h and recompiled the IPP and i linked with my application. The compressor produced the output but decompressor was giving always "invalid windows size " error.
I looked through the code, i did see a problem in deflate.c line number 714, the code should be header = (Z_DEFLATED+((s->w_bits-8)<<4)) <<8 instead of hardcoded value of (Z_DEFLATED+(7<<4)) <<8. After i changed the compressor and decompressor doesnt complain any errors, but decompressor produced the corrupted image. I am using the recent IPP libraries and sampales. Any idea?
0 Kudos
8 Replies
Vladimir_Dudnik
Employee
74 Views


What version of IPP do you use? I remember there were several bug fixes in IPP ZLIB sample in the latest IPP 6.0 update 1 sample.

Regards,
Vladimir
nyryder
Beginner
74 Views


What version of IPP do you use? I remember there were several bug fixes in IPP ZLIB sample in the latest IPP 6.0 update 1 sample.

Regards,
Vladimir
I am using samples package IPP ID: w_ipp_samples_p_6.0.0.127 for windows.
Any recent update on samples?. The web site(http://www.intel.com/cd/software/products/asmo-na/eng/219967.htm#download ) has 6.0.0.127 and i am using Intel IPP Library 6.0.



Vladimir_Dudnik
Employee
74 Views

Hello,

this is the latest one, thanks. Our experts are diving into this issue. You may help investigate this faster if provide simple test case.

Regards,
Vladimir
nyryder
Beginner
74 Views

Change the MAX_MEM_LEVEL to 8 , and MAX_WBITS to 14 then build the ipp_zlib.lib library then my input is simple 4 byte RGB array(made from BMP) give to the deflate and the output (of deflate) to the inflate..
My compression application uses
deflateInit2(&zlibpar, 1, Z_DEFLATED, MAX_WBITS, MAX_MEM_LEVEL, Z_BEST_SPEED); (Initialize only once)
deflate(&zlibpar, Z_ZYNC_FLUSH)

and my decompression application uses
inflateInit2(&decompStream, MAX_WBITS)
inflate(&decompStream, Z_SYNC_FLUSH)

Let me know if you need more info
nyryder
Beginner
74 Views

Quoting - nyryder
Change the MAX_MEM_LEVEL to 8 , and MAX_WBITS to 14 then build the ipp_zlib.lib library then my input is simple 4 byte RGB array(made from BMP) give to the deflate and the output (of deflate) to the inflate..
My compression application uses
deflateInit2(&zlibpar, 1, Z_DEFLATED, MAX_WBITS, MAX_MEM_LEVEL, Z_BEST_SPEED); (Initialize only once)
deflate(&zlibpar, Z_ZYNC_FLUSH)

and my decompression application uses
inflateInit2(&decompStream, MAX_WBITS)
inflate(&decompStream, Z_SYNC_FLUSH)

Let me know if you need more info
Vladmir,
Any update on this issue?

Sergey_K_Intel
Employee
74 Views

Quoting - nyryder
Vladmir,
Any update on this issue?

Hi,

Let me interprete our internal mailing regarding this issue.
The author of IPP ZLIB functions says that there are two ways

- In our upcoming 6.1 release, IPP ZLIB functions are redesigned and patched ZLIB won't have this issue. So, the first option is to wait for 6.1 release

- The second - workaround - option is to comment out 5 lines (627-631) of inflate.c as follows
// if (len > state->wbits) {
// strm->msg = (char *)"invalid window size";
// state->mode = BAD;
// break;
// }

Please, try this. Luck!
Sergey

nyryder
Beginner
74 Views

Quoting - sergey_kh
Hi,

Let me interprete our internal mailing regarding this issue.
The author of IPP ZLIB functions says that there are two ways

- In our upcoming 6.1 release, IPP ZLIB functions are redesigned and patched ZLIB won't have this issue. So, the first option is to wait for 6.1 release

- The second - workaround - option is to comment out 5 lines (627-631) of inflate.c as follows
// if (len > state->wbits) {
// strm->msg = (char *)"invalid window size";
// state->mode = BAD;
// break;
// }

Please, try this. Luck!
Sergey

After i changed the deflate.c (Z_DEFLATED+((s->w_bits-8)<<4)) <<8 (in line number 714) the inflate part does not report the invalid window size. reporting "Invalid window size" is not the issue.
The issue is corruption. Output of inflate is corrupted.

When do we get the 6.1 release?. Any time soon?. Thanks

Vladimir_Dudnik
Employee
74 Views

Hello,

IPP 6.1 release is expected sometime in Q2'2009

Regards,
Vladimir
Reply