IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3301


Ignore:
Timestamp:
Feb 22, 2005, 9:38:44 AM (21 years ago)
Author:
desonia
Message:

Bug #307 - numElementsSquared should not overflow given large images.

Location:
trunk/psLib/src
Files:
2 edited

Legend:

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

    r3264 r3301  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2005-02-17 19:26:24 $
     7 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-02-22 19:38:44 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    375375    psU32 numCols;
    376376    psU32 numRows;
    377     psS32 numElementsSquared;
    378377
    379378    if (in == NULL) {
     
    385384    numCols = in->numCols;
    386385    numRows = in->numRows;
    387     numElementsSquared = numCols * numCols * numRows * numRows;
    388386
    389387    if (type == PS_TYPE_C32) {
     
    392390        psF32 real;
    393391        psF32 imag;
     392        psF32 numElementsSquared = numCols * numCols * numRows * numRows;
    394393
    395394        out = psImageRecycle(out, numCols, numRows, PS_TYPE_F32);
     
    409408        psF64 real;
    410409        psF64 imag;
     410        psF64 numElementsSquared = numCols * numCols * numRows * numRows;
    411411
    412412        out = psImageRecycle(out, numCols, numRows, PS_TYPE_F64);
  • trunk/psLib/src/image/psImageFFT.c

    r3264 r3301  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2005-02-17 19:26:24 $
     7 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-02-22 19:38:44 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    375375    psU32 numCols;
    376376    psU32 numRows;
    377     psS32 numElementsSquared;
    378377
    379378    if (in == NULL) {
     
    385384    numCols = in->numCols;
    386385    numRows = in->numRows;
    387     numElementsSquared = numCols * numCols * numRows * numRows;
    388386
    389387    if (type == PS_TYPE_C32) {
     
    392390        psF32 real;
    393391        psF32 imag;
     392        psF32 numElementsSquared = numCols * numCols * numRows * numRows;
    394393
    395394        out = psImageRecycle(out, numCols, numRows, PS_TYPE_F32);
     
    409408        psF64 real;
    410409        psF64 imag;
     410        psF64 numElementsSquared = numCols * numCols * numRows * numRows;
    411411
    412412        out = psImageRecycle(out, numCols, numRows, PS_TYPE_F64);
Note: See TracChangeset for help on using the changeset viewer.