<?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 Re: Drawing Lines with IPP in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Drawing-Lines-with-IPP/m-p/914377#M14797</link>
    <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
reportbase,&lt;BR /&gt;&lt;BR /&gt;IPP is not meant be a graphics drawing library, while it is very good for processing images, videos, and other signals.&lt;BR /&gt;IPP provides a high performance processing array/matrix based data.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Tamer&lt;BR /&gt;</description>
    <pubDate>Wed, 06 Jan 2010 18:38:16 GMT</pubDate>
    <dc:creator>Tamer_Assad</dc:creator>
    <dc:date>2010-01-06T18:38:16Z</dc:date>
    <item>
      <title>Drawing Lines with IPP</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Drawing-Lines-with-IPP/m-p/914376#M14796</link>
      <description>I wrote a line drawing algorithm using the wu technique.  It works but has issues.  See below. &lt;BR /&gt;&lt;BR /&gt;What I'm wondering is if anyone has tackled the problem of drawing anti-aliased lines using IPP.   Or better yet, does IPP have this ability?&lt;BR /&gt;&lt;BR /&gt;If anyone wants sample code for the following function let me know.  It does not use IPP.  I'm hoping to replace this with a more robust function, but I have not found one yet.  &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;&lt;BR /&gt;void wuline(xya*&amp;amp; out, int x0, int y0, int x1, int y1)&lt;BR /&gt;{&lt;BR /&gt; short DeltaX, DeltaY, XDir;&lt;BR /&gt; static const int intensity = 8;&lt;BR /&gt; &lt;BR /&gt; if (y0 &amp;gt; y1)&lt;BR /&gt; {&lt;BR /&gt; short Temp = y0; &lt;BR /&gt; y0 = y1; &lt;BR /&gt; y1 = Temp;&lt;BR /&gt; Temp = x0; &lt;BR /&gt; x0 = x1; &lt;BR /&gt; x1 = Temp;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; *out++ = xya(x0,y0,255);&lt;BR /&gt;&lt;BR /&gt; if ((DeltaX = x1 - x0) &amp;gt;= 0)&lt;BR /&gt; {&lt;BR /&gt; XDir = 1;&lt;BR /&gt; } &lt;BR /&gt; else &lt;BR /&gt; {&lt;BR /&gt; XDir = -1;&lt;BR /&gt; DeltaX = -DeltaX; &lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; if ((DeltaY = y1 - y0) == 0)&lt;BR /&gt; {&lt;BR /&gt; while (DeltaX-- != 0) &lt;BR /&gt; {&lt;BR /&gt; x0 += XDir;&lt;BR /&gt; *out++ = xya(x0,y0,255);			&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; return;&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; if (DeltaX == 0) &lt;BR /&gt; {&lt;BR /&gt; do &lt;BR /&gt; {&lt;BR /&gt; y0++;&lt;BR /&gt; *out++ = xya(x0,y0,255);			&lt;BR /&gt; } &lt;BR /&gt; while (--DeltaY != 0);&lt;BR /&gt;&lt;BR /&gt; return;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; if (DeltaX == DeltaY) &lt;BR /&gt; {&lt;BR /&gt; do &lt;BR /&gt; {&lt;BR /&gt; x0 += XDir;&lt;BR /&gt; y0++;&lt;BR /&gt; *out++ = xya(x0,y0,255);			&lt;BR /&gt; } &lt;BR /&gt; while (--DeltaY != 0);&lt;BR /&gt;&lt;BR /&gt; return;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; if (DeltaY &amp;gt; DeltaX) &lt;BR /&gt; {&lt;BR /&gt; unsigned short ErrorAcc = 0;  &lt;BR /&gt; unsigned short ErrorAdj = ((unsigned long) DeltaX &amp;lt;&amp;lt; 16) / (unsigned long) DeltaY;&lt;BR /&gt;&lt;BR /&gt; while (--DeltaY) &lt;BR /&gt; {&lt;BR /&gt; unsigned short ErrorAccTemp = ErrorAcc;   &lt;BR /&gt; ErrorAcc += ErrorAdj;     &lt;BR /&gt; &lt;BR /&gt; if (ErrorAcc &amp;lt;= ErrorAccTemp) &lt;BR /&gt; x0 += XDir;&lt;BR /&gt; &lt;BR /&gt; y0++;&lt;BR /&gt;&lt;BR /&gt; unsigned short Weighting = ErrorAcc &amp;gt;&amp;gt; intensity;&lt;BR /&gt; *out++ = xya(x0,y0,Weighting ^ 255);&lt;BR /&gt; *out++ = xya(x0+XDir,y0,Weighting);&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; *out++ = xya(x1,y1,255);			&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; unsigned short ErrorAcc = 0;  &lt;BR /&gt; unsigned short ErrorAdj = ((unsigned long) DeltaY &amp;lt;&amp;lt; 16) / (unsigned long) DeltaX;&lt;BR /&gt;&lt;BR /&gt; while (--DeltaX) &lt;BR /&gt; {&lt;BR /&gt; unsigned short ErrorAccTemp = ErrorAcc;   &lt;BR /&gt; ErrorAcc += ErrorAdj;     &lt;BR /&gt; &lt;BR /&gt; if (ErrorAcc &amp;lt;= ErrorAccTemp) &lt;BR /&gt; y0++;&lt;BR /&gt;&lt;BR /&gt; x0 += XDir;&lt;BR /&gt; &lt;BR /&gt; unsigned short Weighting = ErrorAcc &amp;gt;&amp;gt; intensity;&lt;BR /&gt; *out++ = xya(x0,y0,Weighting ^ 255);			&lt;BR /&gt; *out++ = xya(x0,y0+1,Weighting);&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; *out++ = xya(x1,y1,255);&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jan 2010 17:21:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Drawing-Lines-with-IPP/m-p/914376#M14796</guid>
      <dc:creator>reportbase</dc:creator>
      <dc:date>2010-01-06T17:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Lines with IPP</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Drawing-Lines-with-IPP/m-p/914377#M14797</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
reportbase,&lt;BR /&gt;&lt;BR /&gt;IPP is not meant be a graphics drawing library, while it is very good for processing images, videos, and other signals.&lt;BR /&gt;IPP provides a high performance processing array/matrix based data.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Tamer&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Jan 2010 18:38:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Drawing-Lines-with-IPP/m-p/914377#M14797</guid>
      <dc:creator>Tamer_Assad</dc:creator>
      <dc:date>2010-01-06T18:38:16Z</dc:date>
    </item>
  </channel>
</rss>

