<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PNG Encoder Filter Options in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883225#M10427</link>
    <description>Hi everyone,&lt;BR /&gt;&lt;BR /&gt;I am looking for the option to encode my png image with optional filtering (Sub, 	Average, Paeth).&lt;BR /&gt;&lt;BR /&gt;Does anyone have a pointer where I can start with that. THe UIC sample encoder do not offer filtering rigth now, do they?&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Norman</description>
    <pubDate>Tue, 17 Nov 2009 18:14:48 GMT</pubDate>
    <dc:creator>normanholz</dc:creator>
    <dc:date>2009-11-17T18:14:48Z</dc:date>
    <item>
      <title>PNG Encoder Filter Options</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883225#M10427</link>
      <description>Hi everyone,&lt;BR /&gt;&lt;BR /&gt;I am looking for the option to encode my png image with optional filtering (Sub, 	Average, Paeth).&lt;BR /&gt;&lt;BR /&gt;Does anyone have a pointer where I can start with that. THe UIC sample encoder do not offer filtering rigth now, do they?&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Norman</description>
      <pubDate>Tue, 17 Nov 2009 18:14:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883225#M10427</guid>
      <dc:creator>normanholz</dc:creator>
      <dc:date>2009-11-17T18:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: PNG Encoder Filter Options</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883226#M10428</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/450704"&gt;normanholz&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;Hi everyone,&lt;BR /&gt;&lt;BR /&gt;I am looking for the option to encode my png image with optional filtering (Sub, Average, Paeth).&lt;BR /&gt;&lt;BR /&gt;Does anyone have a pointer where I can start with that. THe UIC sample encoder do not offer filtering rigth now, do they?&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Norman&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;UIC doesn't support filtering by default, but you can easily fix that. &lt;BR /&gt;&lt;BR /&gt;Open file "UICcodecimagepngencsrcuic_png_enc.cpp",&lt;BR /&gt;find "ExcStatus WriteHeader()" function,&lt;BR /&gt;and just after thefunction "png_set_write_fn(m_png_ptr, &amp;amp;m_write_info, pngWriteFunc, NULL);"&lt;BR /&gt;add new filter function "png_set_filter(m_png_ptr, 0,PNG_FILTER_SUB | PNG_FILTER_AVG| PNG_FILTER_PAETH);".&lt;BR /&gt;&lt;BR /&gt;For detail information check "UICcodecimagepngcommonsrclibpng-1.2.35.txt" file.</description>
      <pubDate>Wed, 18 Nov 2009 11:31:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883226#M10428</guid>
      <dc:creator>Pavel_V_Intel</dc:creator>
      <dc:date>2009-11-18T11:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: PNG Encoder Filter Options</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883227#M10429</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/452692"&gt;Pavel Vlasov&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;UIC doesn't support filtering by default, but you can easily fix that. &lt;BR /&gt;&lt;BR /&gt;Open file "UICcodecimagepngencsrcuic_png_enc.cpp",&lt;BR /&gt;find "ExcStatus WriteHeader()" function,&lt;BR /&gt;and just after thefunction "png_set_write_fn(m_png_ptr, &amp;amp;m_write_info, pngWriteFunc, NULL);"&lt;BR /&gt;add new filter function "png_set_filter(m_png_ptr, 0,PNG_FILTER_SUB | PNG_FILTER_AVG| PNG_FILTER_PAETH);".&lt;BR /&gt;&lt;BR /&gt;For detail information check "UICcodecimagepngcommonsrclibpng-1.2.35.txt" file.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Hi Pavel,&lt;BR /&gt;&lt;BR /&gt;thanks for your quick reply.&lt;BR /&gt;&lt;BR /&gt;I changed the code to the following (just in order to force a change in the resulting file size):&lt;BR /&gt;&lt;BR /&gt; ExcStatus WriteHeader(void)&lt;BR /&gt; {&lt;BR /&gt; m_png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);&lt;BR /&gt; if(m_png_ptr == NULL)&lt;BR /&gt; return ExcStatusFail;&lt;BR /&gt;&lt;BR /&gt; m_info_ptr = png_create_info_struct(m_png_ptr);&lt;BR /&gt; if(m_info_ptr == NULL)&lt;BR /&gt; {&lt;BR /&gt; png_destroy_write_struct(&amp;amp;m_png_ptr,  png_infopp_NULL);&lt;BR /&gt; return ExcStatusFail;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; if(setjmp(png_jmpbuf(m_png_ptr)))&lt;BR /&gt; {&lt;BR /&gt; png_destroy_write_struct(&amp;amp;m_png_ptr, &amp;amp;m_info_ptr);&lt;BR /&gt; return ExcStatusFail;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; png_set_write_fn(m_png_ptr, &amp;amp;m_write_info, pngWriteFunc, NULL);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;png_set_filter(m_png_ptr, 0, PNG_ALL_FILTERS);&lt;BR /&gt;printf("filteringn");&lt;BR /&gt;&lt;BR /&gt; png_set_IHDR(&lt;BR /&gt; m_png_ptr, m_info_ptr, m_width, m_height, m_bit_depth, png_cmap[m_color],&lt;BR /&gt; PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);&lt;BR /&gt;&lt;BR /&gt; png_write_info(m_png_ptr, m_info_ptr);&lt;BR /&gt;&lt;BR /&gt; if(m_byteOrder)&lt;BR /&gt; png_set_swap(m_png_ptr);&lt;BR /&gt;&lt;BR /&gt; return ExcStatusOk;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;Unfortunately, the filtering does not change my resulting file size. Do I have to change the png_set_IHDR method accordingly? Do I miss something else?&lt;BR /&gt;&lt;BR /&gt;Many thanks in advance and kind regards,&lt;BR /&gt;Norman&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Nov 2009 17:48:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883227#M10429</guid>
      <dc:creator>normanholz</dc:creator>
      <dc:date>2009-11-18T17:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: PNG Encoder Filter Options</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883228#M10430</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/450704"&gt;normanholz&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;&lt;BR /&gt;Hi Pavel,&lt;BR /&gt;&lt;BR /&gt;thanks for your quick reply.&lt;BR /&gt;&lt;BR /&gt;skipped...&lt;BR /&gt;&lt;BR /&gt;Unfortunately, the filtering does not change my resulting file size. Do I have to change the png_set_IHDR method accordingly? Do I miss something else?&lt;BR /&gt;&lt;BR /&gt;Many thanks in advance and kind regards,&lt;BR /&gt;Norman&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Sorry, my mistake. I didn't notice what it turns onall filters by default in png_write_info() function.There isno changes beacuse itused PNG_ALL_FILTERSflag before.&lt;BR /&gt;So it seems that UIC used maximum filtrationall this time. :)&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Nov 2009 12:55:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883228#M10430</guid>
      <dc:creator>Pavel_V_Intel</dc:creator>
      <dc:date>2009-11-19T12:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: PNG Encoder Filter Options</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883229#M10431</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/452692"&gt;Pavel Vlasov&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Sorry, my mistake. I didn't notice what it turns onall filters by default in png_write_info() function.There isno changes beacuse itused PNG_ALL_FILTERSflag before.&lt;BR /&gt;So it seems that UIC used maximum filtrationall this time. :)&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Thanks for the insight. &lt;BR /&gt;&lt;BR /&gt;With this in mind, is there any possibility to configure the filtering in UIC. Lets say to disable to disable the filtering in order to get more encoding performance? I tried the NO_FILTER flag as well, without any result changing as well.&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Norman&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Nov 2009 13:10:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883229#M10431</guid>
      <dc:creator>normanholz</dc:creator>
      <dc:date>2009-11-20T13:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: PNG Encoder Filter Options</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883230#M10432</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/450704"&gt;normanholz&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;&lt;BR /&gt;Thanks for the insight. &lt;BR /&gt;&lt;BR /&gt;With this in mind, is there any possibility to configure the filtering in UIC. Lets say to disable to disable the filtering in order to get more encoding performance? I tried the NO_FILTER flag as well, without any result changing as well.&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Norman&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;There is no shuch flag as "NO_FILTER".&lt;BR /&gt;&lt;BR /&gt;Filter flags described in png.h as follow:&lt;BR /&gt;&lt;BR /&gt;#define PNG_FILTER_NONE 0x08&lt;BR /&gt;#define PNG_FILTER_SUB 0x10&lt;BR /&gt;#define PNG_FILTER_UP 0x20&lt;BR /&gt;#define PNG_FILTER_AVG 0x40&lt;BR /&gt;#define PNG_FILTER_PAETH 0x80&lt;BR /&gt;#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | &lt;BR /&gt;PNG_FILTER_AVG | PNG_FILTER_PAETH)&lt;BR /&gt;&lt;BR /&gt;They works for me just fine.</description>
      <pubDate>Mon, 23 Nov 2009 08:29:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883230#M10432</guid>
      <dc:creator>Pavel_V_Intel</dc:creator>
      <dc:date>2009-11-23T08:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: PNG Encoder Filter Options</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883231#M10433</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/452692"&gt;Pavel Vlasov&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;There is no shuch flag as "NO_FILTER".&lt;BR /&gt;&lt;BR /&gt;Filter flags described in png.h as follow:&lt;BR /&gt;&lt;BR /&gt;#define PNG_FILTER_NONE 0x08&lt;BR /&gt;#define PNG_FILTER_SUB 0x10&lt;BR /&gt;#define PNG_FILTER_UP 0x20&lt;BR /&gt;#define PNG_FILTER_AVG 0x40&lt;BR /&gt;#define PNG_FILTER_PAETH 0x80&lt;BR /&gt;#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | &lt;BR /&gt;PNG_FILTER_AVG | PNG_FILTER_PAETH)&lt;BR /&gt;&lt;BR /&gt;They works for me just fine.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Sorry, my fault. I indeed was using using the PNG_FILTER_NONE flag. Actually I tried every flag, rebuild the uic libs, started the encodign and got no changing file sizes.&lt;BR /&gt;&lt;BR /&gt;It feels like the flag has no impact at all.&lt;BR /&gt;&lt;BR /&gt;Do I have to configure something else? &lt;BR /&gt;&lt;BR /&gt;For instance, I tried:&lt;BR /&gt;&lt;BR /&gt;png_set_filter(m_png_ptr, 0, PNG_FILTER_VALUE_UP);&lt;BR /&gt;&lt;BR /&gt;Then, in png_set_IHDR() I can only keep the flag set to PNG_FILTER_TYPE_BASE (orPNG_FILTER_NONE) without getting an error from libpng.&lt;BR /&gt;&lt;BR /&gt;png_set_IHDR(&lt;BR /&gt; m_png_ptr, m_info_ptr, m_width, m_height, m_bit_depth, png_cmap[m_color],&lt;BR /&gt; PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);&lt;BR /&gt;&lt;BR /&gt;In insights would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Norman&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Nov 2009 10:15:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883231#M10433</guid>
      <dc:creator>normanholz</dc:creator>
      <dc:date>2009-11-23T10:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: PNG Encoder Filter Options</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883232#M10434</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/450704"&gt;normanholz&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;&lt;BR /&gt;Sorry, my fault. I indeed was using using the PNG_FILTER_NONE flag. Actually I tried every flag, rebuild the uic libs, started the encodign and got no changing file sizes.&lt;BR /&gt;&lt;BR /&gt;It feels like the flag has no impact at all.&lt;BR /&gt;&lt;BR /&gt;Do I have to configure something else? &lt;BR /&gt;&lt;BR /&gt;For instance, I tried:&lt;BR /&gt;&lt;BR /&gt;png_set_filter(m_png_ptr, 0, PNG_FILTER_VALUE_UP);&lt;BR /&gt;&lt;BR /&gt;Then, in png_set_IHDR() I can only keep the flag set to PNG_FILTER_TYPE_BASE (orPNG_FILTER_NONE) without getting an error from libpng.&lt;BR /&gt;&lt;BR /&gt;png_set_IHDR(&lt;BR /&gt;m_png_ptr, m_info_ptr, m_width, m_height, m_bit_depth, png_cmap[m_color],&lt;BR /&gt;PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);&lt;BR /&gt;&lt;BR /&gt;In insights would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Norman&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;You don't need to change png_set_IHDR() params, this function must use PNG_FILTER_TYPE_BASE flag.&lt;BR /&gt;&lt;BR /&gt;It's strange, I just inserted png_set_filter() function and nowfiltration changingproperly.&lt;BR /&gt;May be attached file willhelp.&lt;BR /&gt;&lt;BR /&gt;In next release UIC will bewithoption to control filtration.</description>
      <pubDate>Tue, 24 Nov 2009 08:46:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883232#M10434</guid>
      <dc:creator>Pavel_V_Intel</dc:creator>
      <dc:date>2009-11-24T08:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: PNG Encoder Filter Options</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883233#M10435</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/452692"&gt;Pavel Vlasov&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;You don't need to change png_set_IHDR() params, this function must use PNG_FILTER_TYPE_BASE flag.&lt;BR /&gt;&lt;BR /&gt;It's strange, I just inserted png_set_filter() function and nowfiltration changingproperly.&lt;BR /&gt;May be attached file willhelp.&lt;BR /&gt;&lt;BR /&gt;In next release UIC will bewithoption to control filtration.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Thanks for your help. The filtering works. The mistake was on my side.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Norman&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2009 08:58:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/PNG-Encoder-Filter-Options/m-p/883233#M10435</guid>
      <dc:creator>normanholz</dc:creator>
      <dc:date>2009-11-25T08:58:14Z</dc:date>
    </item>
  </channel>
</rss>

