Real-Complex Pack2D format - corrections?

Real-Complex Pack2D format - corrections?

I have been using the ippiDFT* functions to do FFTs on real image data. These functions result in RCPack2D data, as described here:

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.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.


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 ;
// 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 );

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

Leave a Comment

Please sign in to add a comment. Not a member? Join today