Changeset 11716
- Timestamp:
- Feb 8, 2007, 2:22:55 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/fft/psImageFFT.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/fft/psImageFFT.c
r11714 r11716 6 6 /// @author Robert DeSonia, MHPCC 7 7 /// 8 /// @version $Revision: 1.2 2$ $Name: not supported by cvs2svn $9 /// @date $Date: 2007-02-0 8 23:56:02$8 /// @version $Revision: 1.23 $ $Name: not supported by cvs2svn $ 9 /// @date $Date: 2007-02-09 00:22:55 $ 10 10 /// 11 11 /// Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 149 149 fftwf_free(in); 150 150 151 // Copy the target pixels into the output 151 152 if (!(*out) || !(*out)->parent) { 152 153 *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 161 161 psFree(target); 162 162
Note:
See TracChangeset
for help on using the changeset viewer.
