IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 8, 2007, 2:22:55 PM (19 years ago)
Author:
Paul Price
Message:

Row-by-row copy only necessary for children images.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/fft/psImageFFT.c

    r11714 r11716  
    66/// @author Robert DeSonia, MHPCC
    77///
    8 /// @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
    9 /// @date $Date: 2007-02-08 23:56:02 $
     8/// @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
     9/// @date $Date: 2007-02-09 00:22:55 $
    1010///
    1111/// Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    149149    fftwf_free(in);
    150150
     151    // Copy the target pixels into the output
    151152    if (!(*out) || !(*out)->parent) {
    152153        *out = psImageRecycle(*out, origCols, numRows, PS_TYPE_F32);
    153     }
    154 
    155     // Copy the target pixels into the output
    156     // There's a slight offset --- target has the additional padding required by FFTW,
    157     // while the output doesn't.
    158     for (int y = 0, index = 0; y < numRows; y++, index += origCols) {
    159         memcpy(&(*out)->data.F32[y][0], &target[index], numCols * PSELEMTYPE_SIZEOF(PS_TYPE_F32));
    160     }
     154        memcpy((*out)->p_rawDataBuffer, target, numRows * origCols * PSELEMTYPE_SIZEOF(PS_TYPE_F32));
     155    } else {
     156        for (int y = 0, index = 0; y < numRows; y++, index += origCols) {
     157            memcpy(&(*out)->data.F32[y][0], &target[index], origCols * PSELEMTYPE_SIZEOF(PS_TYPE_F32));
     158        }
     159    }
     160
    161161    psFree(target);
    162162
Note: See TracChangeset for help on using the changeset viewer.