<?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 Bug?  Reed-Solomon ippsRSEncode works in IPP version 6 but not in version 7 in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Bug-Reed-Solomon-ippsRSEncode-works-in-IPP-version-6-but-not-in/m-p/820114#M4653</link>
    <description>&lt;P&gt;I have tried to use your Reed-Solomon functions. This has not been easy (and I may have it wrong) because there are no examples or detailed descriptions of how to form the Galois field, etc. -- so please excuse my ignorance.&lt;BR /&gt;&lt;BR /&gt;I got the code to work and successfully encode messages in 64-byte chunks with a code length of 69 bytes under IPP version6. The same functions (with no modifications) fail under version7. The offending line is:&lt;BR /&gt;&lt;BR /&gt;"stat = ippsRSEncodeInit_8u(codelen, msgChunkLen, pGF, root, rseSpec);"&lt;BR /&gt;&lt;BR /&gt;where codelen = 69, and msgChunkLen=64. Under version6, this function would return "stat = ippStsNoErr", but under version 7, it returns "ippStsRangeErr". I looked up this error for the ippsRSEncodeInit_8u function and the error should not occur as long as "codelen" and "msgChunkLen" obey the inequalities: 2  codelen &amp;lt; &lt;EM&gt;orderof&lt;/EM&gt;(GF); 0 &amp;lt; msgChunkLen &amp;lt; codelen. These criteria are met, so I do not understand why the message. I have also tried this functionwith a wide variety of values for "codelen" and "msgChunkLen", and I always get "stat = ippStsRangeErr". Could you please enlighten me?&lt;BR /&gt;&lt;BR /&gt;I have included the relevant function code below:&lt;BR /&gt;&lt;BR /&gt;----------------------------------------------------------------------------------------------------------&lt;BR /&gt;char eSpec[1024];&lt;BR /&gt;char eBuf[2048];&lt;BR /&gt;IppsRSEncodeSpec_8u *rseSpec = (IppsRSEncodeSpec_8u *)eSpec;&lt;BR /&gt;Ipp8u *rseBuffer = (Ipp8u *)eBuf;&lt;BR /&gt;&lt;BR /&gt;IppStatus ippRSEncode(char *codeAndMsg, char *msg, int chunksize, int codeBytes, int msglen, int *totalCodeLen) {&lt;BR /&gt; int contextSize;&lt;BR /&gt; int gfSize;&lt;BR /&gt; int feBitSize = 8;&lt;BR /&gt; Ipp8u root = 1;&lt;BR /&gt;&lt;BR /&gt; IppStatus stat = ippsGFGetSize_8u(feBitSize, &amp;amp;gfSize);&lt;BR /&gt; if (stat!=ippStsNoErr) return stat;&lt;/P&gt;&lt;P&gt; Ipp8u pPoly[] = { 1, 0, 1, 1, 1, 0, 0, 0, 1 };&lt;BR /&gt;&lt;BR /&gt; IppsGFSpec_8u* pGF = (IppsGFSpec_8u *) malloc(gfSize); // Ptr to finite field context to be initialized.&lt;BR /&gt; stat = ippsGFInit_8u(feBitSize, pPoly, pGF);&lt;BR /&gt; if (stat!=ippStsNoErr) return stat;&lt;BR /&gt;&lt;BR /&gt; int bufSize;&lt;BR /&gt; int remMsgLen = msglen;&lt;BR /&gt; int msgChunkLen = min(chunksize, remMsgLen);&lt;BR /&gt; int codelen = msgChunkLen + codeBytes;&lt;BR /&gt; *totalCodeLen = msglen + (msglen/chunksize)*codeBytes;&lt;BR /&gt;&lt;BR /&gt; if (remMsgLen &amp;gt;= chunksize) {&lt;BR /&gt; stat = ippsRSEncodeInit_8u(codelen, msgChunkLen, pGF, root, rseSpec);&lt;BR /&gt; if (stat!=ippStsNoErr) return stat;&lt;BR /&gt;&lt;BR /&gt; while (remMsgLen &amp;gt;= chunksize) {&lt;BR /&gt; stat = ippsRSEncode_8u((Ipp8u *)msg, (Ipp8u *)codeAndMsg, rseSpec, rseBuffer);&lt;BR /&gt; msg += chunksize;&lt;BR /&gt; codeAndMsg += codelen;&lt;BR /&gt; remMsgLen -= chunksize;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; if (remMsgLen &amp;gt; 0) {&lt;BR /&gt; codelen = remMsgLen + codeBytes;&lt;BR /&gt; stat = ippsRSEncodeInit_8u(codelen, remMsgLen, pGF, root, rseSpec);&lt;BR /&gt; if (stat!=ippStsNoErr) return stat;&lt;BR /&gt; stat = ippsRSEncode_8u((Ipp8u *)msg, (Ipp8u *)codeAndMsg, rseSpec, rseBuffer);&lt;BR /&gt; *totalCodeLen += codeBytes;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; return stat;&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Sat, 01 Oct 2011 23:46:41 GMT</pubDate>
    <dc:creator>sdsuds</dc:creator>
    <dc:date>2011-10-01T23:46:41Z</dc:date>
    <item>
      <title>Bug?  Reed-Solomon ippsRSEncode works in IPP version 6 but not in version 7</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Bug-Reed-Solomon-ippsRSEncode-works-in-IPP-version-6-but-not-in/m-p/820114#M4653</link>
      <description>&lt;P&gt;I have tried to use your Reed-Solomon functions. This has not been easy (and I may have it wrong) because there are no examples or detailed descriptions of how to form the Galois field, etc. -- so please excuse my ignorance.&lt;BR /&gt;&lt;BR /&gt;I got the code to work and successfully encode messages in 64-byte chunks with a code length of 69 bytes under IPP version6. The same functions (with no modifications) fail under version7. The offending line is:&lt;BR /&gt;&lt;BR /&gt;"stat = ippsRSEncodeInit_8u(codelen, msgChunkLen, pGF, root, rseSpec);"&lt;BR /&gt;&lt;BR /&gt;where codelen = 69, and msgChunkLen=64. Under version6, this function would return "stat = ippStsNoErr", but under version 7, it returns "ippStsRangeErr". I looked up this error for the ippsRSEncodeInit_8u function and the error should not occur as long as "codelen" and "msgChunkLen" obey the inequalities: 2  codelen &amp;lt; &lt;EM&gt;orderof&lt;/EM&gt;(GF); 0 &amp;lt; msgChunkLen &amp;lt; codelen. These criteria are met, so I do not understand why the message. I have also tried this functionwith a wide variety of values for "codelen" and "msgChunkLen", and I always get "stat = ippStsRangeErr". Could you please enlighten me?&lt;BR /&gt;&lt;BR /&gt;I have included the relevant function code below:&lt;BR /&gt;&lt;BR /&gt;----------------------------------------------------------------------------------------------------------&lt;BR /&gt;char eSpec[1024];&lt;BR /&gt;char eBuf[2048];&lt;BR /&gt;IppsRSEncodeSpec_8u *rseSpec = (IppsRSEncodeSpec_8u *)eSpec;&lt;BR /&gt;Ipp8u *rseBuffer = (Ipp8u *)eBuf;&lt;BR /&gt;&lt;BR /&gt;IppStatus ippRSEncode(char *codeAndMsg, char *msg, int chunksize, int codeBytes, int msglen, int *totalCodeLen) {&lt;BR /&gt; int contextSize;&lt;BR /&gt; int gfSize;&lt;BR /&gt; int feBitSize = 8;&lt;BR /&gt; Ipp8u root = 1;&lt;BR /&gt;&lt;BR /&gt; IppStatus stat = ippsGFGetSize_8u(feBitSize, &amp;amp;gfSize);&lt;BR /&gt; if (stat!=ippStsNoErr) return stat;&lt;/P&gt;&lt;P&gt; Ipp8u pPoly[] = { 1, 0, 1, 1, 1, 0, 0, 0, 1 };&lt;BR /&gt;&lt;BR /&gt; IppsGFSpec_8u* pGF = (IppsGFSpec_8u *) malloc(gfSize); // Ptr to finite field context to be initialized.&lt;BR /&gt; stat = ippsGFInit_8u(feBitSize, pPoly, pGF);&lt;BR /&gt; if (stat!=ippStsNoErr) return stat;&lt;BR /&gt;&lt;BR /&gt; int bufSize;&lt;BR /&gt; int remMsgLen = msglen;&lt;BR /&gt; int msgChunkLen = min(chunksize, remMsgLen);&lt;BR /&gt; int codelen = msgChunkLen + codeBytes;&lt;BR /&gt; *totalCodeLen = msglen + (msglen/chunksize)*codeBytes;&lt;BR /&gt;&lt;BR /&gt; if (remMsgLen &amp;gt;= chunksize) {&lt;BR /&gt; stat = ippsRSEncodeInit_8u(codelen, msgChunkLen, pGF, root, rseSpec);&lt;BR /&gt; if (stat!=ippStsNoErr) return stat;&lt;BR /&gt;&lt;BR /&gt; while (remMsgLen &amp;gt;= chunksize) {&lt;BR /&gt; stat = ippsRSEncode_8u((Ipp8u *)msg, (Ipp8u *)codeAndMsg, rseSpec, rseBuffer);&lt;BR /&gt; msg += chunksize;&lt;BR /&gt; codeAndMsg += codelen;&lt;BR /&gt; remMsgLen -= chunksize;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; if (remMsgLen &amp;gt; 0) {&lt;BR /&gt; codelen = remMsgLen + codeBytes;&lt;BR /&gt; stat = ippsRSEncodeInit_8u(codelen, remMsgLen, pGF, root, rseSpec);&lt;BR /&gt; if (stat!=ippStsNoErr) return stat;&lt;BR /&gt; stat = ippsRSEncode_8u((Ipp8u *)msg, (Ipp8u *)codeAndMsg, rseSpec, rseBuffer);&lt;BR /&gt; *totalCodeLen += codeBytes;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; return stat;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2011 23:46:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Bug-Reed-Solomon-ippsRSEncode-works-in-IPP-version-6-but-not-in/m-p/820114#M4653</guid>
      <dc:creator>sdsuds</dc:creator>
      <dc:date>2011-10-01T23:46:41Z</dc:date>
    </item>
  </channel>
</rss>

