- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what data type do you use? As you can see below - everything is OK for 32f:
#include
#include "ipps.h"
#include "ippi.h"
#define ORDER 3
#define SIZE 8
int main(){
Ipp32f cross[SIZE * SIZE] =
{ 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1,
0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0 };
Ipp32f crossFFT_FWD[SIZE * SIZE], crossFFT_INV[SIZE * SIZE];
IppiFFTSpec_R_32f *ctxFft = NULL;
int FftBufSize, i, j;
Ipp8u* pMemBuf;
IppStatus status;
status = ippiFFTInitAlloc_R_32f( &ctxFft, ORDER, ORDER, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone);
status = ippiFFTGetBufSize_R_32f( ctxFft, &FftBufSize );
pMemBuf = ippsMalloc_8u( FftBufSize );
status = ippiFFTFwd_RToPack_32f_C1R( cross, SIZE*sizeof(Ipp32f), crossFFT_FWD, SIZE*sizeof(Ipp32f), ctxFft, pMemBuf );
status = ippiFFTInv_PackToR_32f_C1R( crossFFT_FWD, SIZE*sizeof(Ipp32f), crossFFT_INV, SIZE*sizeof(Ipp32f), ctxFft, pMemBuf );
for( j = 0; j < SIZE; j++ ){
for( i = 0; i < SIZE; i++ ){
printf( " %.1f", crossFFT_INV[j * SIZE + i] );
}
printf("\n");
}
return 0;
}
Output:
0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0
Press any key to continue . . .
Regards ,
Igor
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page