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

IPP 6.0 sample : Deflate (Access Violation in ippsCopy_8u)

matthieu_darbois
New Contributor III
531 Views

Hello,

I have some code which encode multiple images (of the same size) in PNG format with only one header. Basically, it does as follow :

Create PNG Struct

Write PNG header

Write 1st image (n*png_write_row, deflateReset at the end)

Reinitialize some fields in png struct

Write 2nd image (n*png_write_row, deflateReset at the end)

Reinitialize some fields in png struct and so on...

Destroy PNG struct

When using standard zlib, all is working fine.

When using ipp_zlib, I get an access violation in ippsCopy_8u (deflate function, line 107 of the function).

It seems that deflateReset has missed something.

I get it to work fine with the following workaround :

[cpp]s = (deflate_state *)strm->state;
s->in_tmpbuff_avail = TMP_BUF_SIZE;
s->in_tmpbuff_next = s->in_tmpbuff_ptr;
s->in_tmpbuff_valid = 1;
s->pending = 0;
s->pending_out = s->pending_buf;

[/cpp]

I've never really looked at the code in zlib nor in ipp_zlib so I don't know if that workaround is really valid or if another correction should be made elsewhere. If someone more enlightened than me could have a look to see if using deflateReset really works or if I missed something, it would be great.

Thanks.

0 Kudos
3 Replies
Ying_S_Intel
Employee
531 Views
Thanks for your report, our engineeirng team has indicated that this issue will be fixed in next update of IPP 6.0 which will be available in few weeks.

Regards,
Ying
0 Kudos
matthieu_darbois
New Contributor III
531 Views
Quoting - YING S (Intel)
Thanks for your report, our engineeirng team has indicated that this issue will be fixed in next update of IPP 6.0 which will be available in few weeks.

Regards,
Ying

Thanks for your answer,

I'll wait for the next update.

Regards,

Matthieu

0 Kudos
matthieu_darbois
New Contributor III
531 Views

Hi,

I've just downloaded IPP 6.0 update 1 along with the new sample and deflate now seems to work properly.

Thanks.

Matthieu

0 Kudos
Reply