- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello! I think there is a bug in ippsFFTFwd_RToCCS_32f_I function in IPP 6. I wrote an example, that reproduces error.
int FFTOrder = 16;
int SampleCount = 1 << FFTOrder;
int BufferSize = SampleCount+3;
Ipp32f* TestBuffer = new Ipp32f[BufferSize];
TestBuffer[BufferSize-3] = 30;
TestBuffer[BufferSize-2] = 20;
TestBuffer[BufferSize-1] = 10;
IppStatus ipps;
Ipp32f Phase = 0;
ipps = ippsTone_Direct_32f(TestBuffer, SampleCount, 1, 0.125, &Phase, ippAlgHintAccurate);
assert(ipps == ippStsNoErr);
assert(TestBuffer[BufferSize-3] == 30);
assert(TestBuffer[BufferSize-2] == 20);
assert(TestBuffer[BufferSize-1] == 10);
IppsFFTSpec_R_32f* FFTR16Spec;
ipps = ippsFFTInitAlloc_R_32f(&FFTR16Spec, 16, IPP_FFT_DIV_FWD_BY_N, ippAlgHintAccurate);
assert(ipps == ippStsNoErr);
ipps = ippsFFTFwd_RToCCS_32f_I(TestBuffer, FFTR16Spec, NULL);
assert(ipps == ippStsNoErr);
assert(TestBuffer[BufferSize-3] == 30);
assert(TestBuffer[BufferSize-2] == 20);
assert(TestBuffer[BufferSize-1] == 10);
ippsFFTFree_R_32f(FFTR16Spec);
if(TestBuffer[BufferSize-3] != 30)
printf("Error!\n");
else
printf("OK\n");
delete[] TestBuffer;
Using ippsMalloc instread of "new Ipp32f" changes nothing.
Can anyone correct me on correct IPP? :)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello! I think there is a bug in ippsFFTFwd_RToCCS_32f_I function in IPP 6. I wrote an example, that reproduces error.
int FFTOrder = 16;
int SampleCount = 1 << FFTOrder;
int BufferSize = SampleCount+3;
Ipp32f* TestBuffer = new Ipp32f[BufferSize];
TestBuffer[BufferSize-3] = 30;
TestBuffer[BufferSize-2] = 20;
TestBuffer[BufferSize-1] = 10;
IppStatus ipps;
Ipp32f Phase = 0;
ipps = ippsTone_Direct_32f(TestBuffer, SampleCount, 1, 0.125, &Phase, ippAlgHintAccurate);
assert(ipps == ippStsNoErr);
assert(TestBuffer[BufferSize-3] == 30);
assert(TestBuffer[BufferSize-2] == 20);
assert(TestBuffer[BufferSize-1] == 10);
IppsFFTSpec_R_32f* FFTR16Spec;
ipps = ippsFFTInitAlloc_R_32f(&FFTR16Spec, 16, IPP_FFT_DIV_FWD_BY_N, ippAlgHintAccurate);
assert(ipps == ippStsNoErr);
ipps = ippsFFTFwd_RToCCS_32f_I(TestBuffer, FFTR16Spec, NULL);
assert(ipps == ippStsNoErr);
assert(TestBuffer[BufferSize-3] == 30);
assert(TestBuffer[BufferSize-2] == 20);
assert(TestBuffer[BufferSize-1] == 10);
ippsFFTFree_R_32f(FFTR16Spec);
if(TestBuffer[BufferSize-3] != 30)
printf("Error!n");
else
printf("OKn");
delete[] TestBuffer;
Using ippsMalloc instread of "new Ipp32f" changes nothing.
Can anyone correct me on correct IPP? :)
Hello! CCS is packed format, it is N+2 long than original signal N if N is even. You call the FFT by in-place mode, that mean your input and output use same buffer. So it is expected the TestBuffer[65536],TestBuffer[65537] were used by output buffer. You may refer to ipps manual ippsman.pdf =>Table 7-4
Regards,
Ying
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page