- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are working on evaluating the performance and compression of PNG files on intel IPP 2017 released version.
The numbers with various compression levels seem to have beaten the competitions(cloud flare and zlib-ng) but the newly introduced flag for fastest compression (-2) seems to get us in an infinite loop after we are done with patching and updating zlib 1.2.8. The code changes are only expected to go in zlib library and the integration to libPNG remains unaffected. The patched code seems to be incomplete in this case.
local block_state deflate_common(deflate_state* s, int flush){
...
while ( (s->lookahead > 0) || (s->strm->avail_in > 0) ) {
...
lz77_encode_window( s, flush );
Lookahead remains at the same value.
Please share any numbers for the PNG compression and details on how to enable the fastest compression.
Regards,
Vinay
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vinay,
I move your post from other forum to the IPP forum. We will investigate it and contact you later.
Best Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vinay,
We found the fix in lz77_encode_call function in deflate.c as follow:
if(s->deflate_table == Z_NULL) { /* deflate table is absent, look if statistics is collected */ if(s->deflate_stat) custDeflateUpdateTable(s, *src, *src_len); //// DBG #if 0 status = ippsDeflateLZ77Fastest_8u( (const Ipp8u**)src, src_len, &s->match_start, s->window + s->strstart, s->w_size, (int*)s->head, s->hash_size, &s->bi_buf, (Ipp32u*)&s->bi_valid, s->strm->next_out, s->strm->avail_out, (Ipp32u*)&dst_indx, NULL, NULL, ( flush == Z_NO_FLUSH ) ? IppLZ77NoFlush : IppLZ77FullFlush ); #else status = ippsDeflateLZ77Fastest_8u((const Ipp8u**)src, src_len, &s->match_start, s->window + s->strstart, s->w_size, (int*)s->head, s->hash_size, &s->bi_buf, (Ipp32u*)&s->bi_valid, s->pending_out, s->pending_buf_size - s->pending, (Ipp32u*)&s->pending, NULL, NULL, (flush == Z_NO_FLUSH) ? IppLZ77NoFlush : IppLZ77FullFlush); flush_pending(s->strm); #endif s->strm->next_out += dst_indx; s->strm->avail_out -= dst_indx; s->strm->total_out += dst_indx; }
Could you try the above code and let us know how it works? Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I had the same issue with the latest IPP (2020.0.166), zlib 1.2.11 and libpng 1.6.37.
This fix does the trick, I think you should include it into official distribution.
Best regards,
Eugene
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, thanks for the reminder. We will check the implementation once again and update this thread accordingly.
![](/skins/images/D2683F18326913BBA0436CB7114DD569/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page