Changeset 14332
- Timestamp:
- Jul 20, 2007, 10:12:44 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
psLib/src/imageops/psImageConvolve.c (modified) (5 diffs)
-
psLib/src/imageops/psImageConvolve.h (modified) (2 diffs)
-
psLib/test/imageops/convolutionBench.c (modified) (1 diff)
-
psLib/test/imageops/tap_psImageConvolve2.c (modified) (1 diff)
-
psModules/src/detrend/pmShifts.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageConvolve.c
r13350 r14332 7 7 /// @author Eugene Magnier, IfA 8 8 /// 9 /// @version $Revision: 1.5 2$ $Name: not supported by cvs2svn $10 /// @date $Date: 2007-0 5-11 16:48:31 $9 /// @version $Revision: 1.53 $ $Name: not supported by cvs2svn $ 10 /// @date $Date: 2007-07-20 20:12:31 $ 11 11 /// 12 12 /// Copyright 2004-2007 Institute for Astronomy, University of Hawaii … … 200 200 } 201 201 202 psImage *psImageConvolveDirect(const psImage *in, 202 psImage *psImageConvolveDirect(psImage *out, 203 const psImage *in, 203 204 const psKernel *kernel) 204 205 { … … 222 223 int numCols = in->numCols; // Number of columns 223 224 224 psImage *out; // Image to be returned225 226 225 #if 1 227 226 … … 231 230 case PS_TYPE_##TYPE: { \ 232 231 ps##TYPE **inData = in->data.TYPE; /* Dereference input data */ \ 233 out = psImage Alloc(numCols, numRows, PS_TYPE_##TYPE); \232 out = psImageRecycle(out, numCols, numRows, PS_TYPE_##TYPE); \ 234 233 for (int row = 0; row < numRows; row++) { \ 235 234 ps##TYPE *outRow = out->data.TYPE[row]; \ … … 253 252 case PS_TYPE_##TYPE: { \ 254 253 ps##TYPE **inData = in->data.TYPE; /* Dereference input data */ \ 255 out = psImage Alloc(numCols, numRows, PS_TYPE_##TYPE); \254 out = psImageRecycle(out, numCols, numRows, PS_TYPE_##TYPE); \ 256 255 psImageInit(out, 0.0); \ 257 256 for (int ky = yMin; ky <= yMax; ky++) { \ -
trunk/psLib/src/imageops/psImageConvolve.h
r12748 r14332 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $8 * @date $Date: 2007-0 4-05 03:02:21 $7 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2007-07-20 20:12:31 $ 9 9 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii 10 10 */ … … 112 112 /// 113 113 psImage *psImageConvolveDirect( 114 psImage *out, ///< return output to here 114 115 const psImage *in, ///< the psImage to convolve 115 116 const psKernel *kernel ///< kernel to colvolve with -
trunk/psLib/test/imageops/convolutionBench.c
r12180 r14332 35 35 psKernel *kernel = generateKernel(kernelCols, kernelRows); 36 36 psTimerStart("direct"); 37 psImage *convolved = psImageConvolveDirect( image, kernel);37 psImage *convolved = psImageConvolveDirect(NULL, image, kernel); 38 38 direct += psTimerMark("direct"); 39 39 psFree(convolved); -
trunk/psLib/test/imageops/tap_psImageConvolve2.c
r12179 r14332 71 71 psKernel *kernel = generateKernel(); 72 72 73 psImage *convolved = psImageConvolveDirect( image, kernel);73 psImage *convolved = psImageConvolveDirect(NULL, image, kernel); 74 74 ok(convolved, "convolution result"); 75 75 skip_start(!convolved, 3, "convolution failed"); -
trunk/psModules/src/detrend/pmShifts.c
r12696 r14332 441 441 #if 1 442 442 // Always do direct convolution (no fuss with edge effects) 443 psImage *convolved = psImageConvolveDirect( detrend->image, kernel);443 psImage *convolved = psImageConvolveDirect(NULL, detrend->image, kernel); 444 444 #else 445 445 // Kernel size-dependent convolution --- if it's big, use the FFT … … 448 448 psImage *convolved; 449 449 if (xSize * ySize < FFT_SIZE * FFT_SIZE) { 450 convolved = psImageConvolveDirect( detrend->image, kernel);450 convolved = psImageConvolveDirect(NULL, detrend->image, kernel); 451 451 } else { 452 452 // This is a little dodgy --- making choices about parameters without the user's input
Note:
See TracChangeset
for help on using the changeset viewer.
