Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Real-Complex Pack2D format - corrections?

skycle
Beginner
454 Views
I have been using the ippiDFT* functions to do FFTs on real image data. These functions result in RCPack2D data, as described here: http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/ippxe/ipp_manual_lnx/hh_goto.htm#IPPI/ippi_ch10/ch10_real_complex_packed_rcpack2d_format.htm

I believe there are many errors in that table. For example, shouldn't the bottom left entry be 'Re A(M-1, 0)', not 'Re A(M/2, 0)'? Certainly it should be the same as the rest of the row. And, there should be only real components in the first or last columns, correct?

For what its worth, I've been able to implement my filters with correct resultsbased on what seems natural for the RCPack2D format to do if 2D DFTs are performe real->complex for the rows, then complex->complex for the columns (N/2+1 of them). If my understanding is correct, which gives correct results in practice using the functions, then this table has many errors.
0 Kudos
3 Replies
igorastakhov
New Contributor II
454 Views
At least for the case with even width and even height and for the left-bottom element this table is correct - it MUST be Re A(M/2, 0) and it is.
You can check it with ippiCplxExtendToPack_32fc32f_C1R function.

Regards,
Igor
0 Kudos
brooke_s_
Beginner
454 Views

Can anyone shed some light as to why the following example will not work for "large" images (300x300) I got it to work for small sizes (up to 300x290), but when I use "big" data sizes, I get a stack overflow on ippiDFTFwd_RToPack_32f_C1R.  

// create sample data

int w=1024;
int h=1024;
float imgsize=w*h;
float* indata=new float[imgsize];
for(int i=0;i<w;i++){
   for(int j=0;j<h;j++){
       indata[i+j*w]= i*1.f;
    }
}

float *ipp_float=new float[imgsize]; // real result data

float *ipp_pack = new float[imgsize];//intermediate packed data

IppiSize ippSize={w,h};

IppiDFTSpec_R_32f* ippPlan ;
ippiDFTInitAlloc_R_32f(&ippPlan,ippSize,IPP_FFT_NODIV_BY_ANY,ippAlgHintFast);
// this is crashing horribly with stack overflow when indata is large 1024x1024
ippiDFTFwd_RToPack_32f_C1R(indata, w ,ipp_pack ,w ,ippPlan,0 );

ippiDFTInv_PackToR_32f_C1R(ipp_pack , w*sizeof(Ipp32f) ,ipp_float, w*sizeof(Ipp32f) ,ippPlan,0 );

0 Kudos
brooke_s_
Beginner
454 Views

*update* The above code seems to allow either width or height to be greater than 290, but not both.

0 Kudos
Reply