<?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: Problem with FFT - wrong amplitudes in calculated magnitude in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-FFT-wrong-amplitudes-in-calculated-magnitude/m-p/898515#M12428</link>
    <description>&lt;P&gt;Hello Leon,&lt;/P&gt;
&lt;P&gt;there is comment from our experts:&lt;/P&gt;
&lt;P&gt;it seems you are trying to apply complex magnitude to results from real FFT transform.&lt;/P&gt;
&lt;P&gt;Please try to convert CCS data to complex format or perform complex FFT operation.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
    <pubDate>Mon, 05 Nov 2007 09:35:41 GMT</pubDate>
    <dc:creator>Vladimir_Dudnik</dc:creator>
    <dc:date>2007-11-05T09:35:41Z</dc:date>
    <item>
      <title>Problem with FFT - wrong amplitudes in calculated magnitude spectrum</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-FFT-wrong-amplitudes-in-calculated-magnitude/m-p/898514#M12427</link>
      <description>Hi,&lt;BR /&gt;I'm developing an application for Xscale processor. The goal is to perform FFT of already acquired block of data.&lt;BR /&gt;&lt;BR /&gt;Below is a snippet of the code I'm using:&lt;BR /&gt;&lt;P&gt;&lt;FONT size="2"&gt;IppsFFTSpec_R_32s *pFFTSpec = NULL;&lt;BR /&gt;Ipp8u *pWorkBuf = NULL;&lt;BR /&gt;&lt;BR /&gt;Ipp32s* pDst = ippsMalloc_32s(blockSize + 2);&lt;BR /&gt;Ipp32s* pDstMag = ippsMalloc_32s(blockSize/2);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;status = ippsFFTInitAlloc_R_32s(&amp;amp;pFFTSpec, order, IPP_FFT_DIV_FWD_BY_N, ippAlgHintNone);&lt;BR /&gt;status = ippsFFTGetBufSize_R_32s(pFFTSpec, &amp;amp;bufSize);&lt;BR /&gt;pWorkBuf = (Ipp8u*)malloc(bufSize);&lt;BR /&gt;ippsFFTFwd_RToCCS_32s_Sfs(pSrc, (Ipp32s*)pDst, pFFTSpec, 0, pWorkBuf);&lt;BR /&gt;ippsMagnitude_32sc_Sfs((Ipp32sc*)pDst, pDstMag, blockSize/2, 0);&lt;/FONT&gt;&lt;/P&gt;I apply windows on the raw data and don't expect result amplitudes to be exactly correct, but what I get is not quite right. Frequencies are all in right places of the spectrum, but amplitudes are wrong&lt;BR /&gt;&lt;BR /&gt;Hope somebody in the forum has done similar processing, and will be kind enough to look at the code snippet to point at my mistake. I think I'm doing something wrong.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Leon Kosovsky&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Oct 2007 16:20:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-FFT-wrong-amplitudes-in-calculated-magnitude/m-p/898514#M12427</guid>
      <dc:creator>lkosovsky</dc:creator>
      <dc:date>2007-10-26T16:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with FFT - wrong amplitudes in calculated magnitude</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-FFT-wrong-amplitudes-in-calculated-magnitude/m-p/898515#M12428</link>
      <description>&lt;P&gt;Hello Leon,&lt;/P&gt;
&lt;P&gt;there is comment from our experts:&lt;/P&gt;
&lt;P&gt;it seems you are trying to apply complex magnitude to results from real FFT transform.&lt;/P&gt;
&lt;P&gt;Please try to convert CCS data to complex format or perform complex FFT operation.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2007 09:35:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-FFT-wrong-amplitudes-in-calculated-magnitude/m-p/898515#M12428</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2007-11-05T09:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with FFT - wrong amplitudes in calculated magnitude</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-FFT-wrong-amplitudes-in-calculated-magnitude/m-p/898516#M12429</link>
      <description>&lt;P&gt;there is additional comment from our expert:&lt;/P&gt;
&lt;P&gt;if you are interested only in first half of FFT results you may use CCS format.&lt;/P&gt;
&lt;P&gt;It is not clear what seems to be wrong for you, FFT results or subsequent Magnitude results?&lt;/P&gt;
&lt;P&gt;BTW, please note that in your code FFT contains blockSize/2 + 1 complex elements whereas Magnitude calculates 1 elements less.&lt;/P&gt;
&lt;P&gt;The results of FFT is divided by 2**order (IPP_FFT_DIV_FWD_BY_N) so results of Magnitude will be also N times less. If you need Magnitude results in correct range you may use IPP_FFT_NODIV_BY_ANY at FFT call or you can apply scalefactor = -order at Magnitude call.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2007 11:19:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-FFT-wrong-amplitudes-in-calculated-magnitude/m-p/898516#M12429</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2007-11-05T11:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with FFT - wrong amplitudes in calculated magnitude</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-FFT-wrong-amplitudes-in-calculated-magnitude/m-p/898517#M12430</link>
      <description>Hello Vladimir, thank you for your help.&lt;BR /&gt;&lt;BR /&gt;I was trying to imitate an Example 7-5, from page 7-38 from the latest (v5.2) ippsman.pdf. I am interested in only first part of FFT. That is why I was using CCS format and  ippsMagnitude function.&lt;BR /&gt;&lt;BR /&gt;Now, the FFT result was correct only partially: frequencies were all in right spots but amplitudes ( and subsequently magnitudes) were  off.&lt;BR /&gt;&lt;BR /&gt;It turned out, and &lt;B&gt;I have to apologizes for this&lt;/B&gt;, I had a problem with raw data that was processed by my FFT implementation. I expected to see specific spectrum magnitudes assuming known input signals. But these signals were corrupted due to problem in DAQ driver. That is why results were wrong. When I fixed the driver everything became correct.&lt;BR /&gt;&lt;BR /&gt;I've applied the advice you give in your post. Here is the final stripped code snippet that works for me:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Ipp32s* pDst = ippsMalloc_32s(blockSize + 2);&lt;BR /&gt;Ipp32s* pDstMag = ippsMalloc_32s(blockSize/2 + 1);&lt;BR /&gt;&lt;BR /&gt;status = ippsFFTInitAlloc_R_32s(&amp;amp;pFFTSpec, order, IPP_FFT_DIV_FWD_BY_N, ippAlgHintNone);&lt;BR /&gt;status = ippsFFTGetBufSize_R_32s(pFFTSpec, &amp;amp;bufSize);&lt;BR /&gt;pWorkBuf = (Ipp8u*)malloc(bufSize);&lt;BR /&gt;ippsFFTFwd_RToCCS_32s_Sfs(pSrc, pDst, pFFTSpec, 0, pWorkBuf);&lt;BR /&gt;ippsMagnitude_32sc_Sfs((Ipp32sc*)pDst, pDstMag, (blockSize/2 + 1), -1);&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;Hope it'll be useful for our online community :-)&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Wed, 07 Nov 2007 15:17:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-FFT-wrong-amplitudes-in-calculated-magnitude/m-p/898517#M12430</guid>
      <dc:creator>lkosovsky</dc:creator>
      <dc:date>2007-11-07T15:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with FFT - wrong amplitudes in calculated magnitude</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-FFT-wrong-amplitudes-in-calculated-magnitude/m-p/898518#M12431</link>
      <description>&lt;P&gt;thank you for sharing your findings here, definetely it may help others to use IPP functions in their applications&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2007 16:35:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-FFT-wrong-amplitudes-in-calculated-magnitude/m-p/898518#M12431</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2007-11-12T16:35:02Z</dc:date>
    </item>
  </channel>
</rss>

