IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 12, 2008, 12:42:42 PM (18 years ago)
Author:
Paul Price
Message:

Dereferencing in the hope things will go faster.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmSubtraction.c

    r19532 r19540  
    586586          psVector *poly = preCalc->data[2]; // Polynomial values
    587587          int num = uCoords->n;         // Number of pixels
     588          psS32 *uData = uCoords->data.S32, *vData = vCoords->data.S32; // Dereference u,v coordinates
     589          psF32 *polyData = poly->data.F32; // Dereference polynomial values
     590          psF32 **imageData = image->kernel;  // Dereference image
     591          psF32 **convData = convolved->kernel; // Dereference convolved image
    588592          for (int y = -footprint; y <= footprint; y++) {
    589593              for (int x = -footprint; x <= footprint; x++) {
    590594                  double sum = 0.0;             // Accumulated sum from convolution
    591595                  for (int j = 0; j < num; j++) {
    592                       int u = uCoords->data.S32[j], v = vCoords->data.S32[j]; // Kernel coordinates
    593                       sum += image->kernel[y - v][x - u] * poly->data.F32[j];
     596                      int u = uData[j], v = vData[j]; // Kernel coordinates
     597                      sum += imageData[y - v][x - u] * polyData[j];
    594598                  }
    595                   convolved->kernel[y][x] = sum;
     599                  convData[y][x] = sum;
    596600                  // Photometric scaling is built into the kernel --- no subtraction!
    597601              }
Note: See TracChangeset for help on using the changeset viewer.