Intel IPP 2017 release - PNG compressions

Intel IPP 2017 release - PNG compressions


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.





Thread Topic: 

Bug Report
3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Vinay, 

​I move your post from other forum  to the IPP forum. We will  investigate it and contact you later. 

Best Regards,


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 */
                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 );
            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);
            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!

Leave a Comment

Please sign in to add a comment. Not a member? Join today