IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 19, 2022, 8:45:29 AM (4 years ago)
Author:
eugene
Message:

some attempts to speed up rebinning; too much effort spent on an unused binned mask

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316/psModules/src/camera/pmFPABin.c

    r34843 r42215  
    6767            for (int y = yStart; y < yStop; y++) {
    6868                for (int x = xStart; x < xStop; x++) {
    69                   if (inMask && (inMask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] != 0)) {
     69                  if (false && inMask && (inMask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] != 0)) {
    7070                      for (int j = 0; j < Nbits; j++) {
    7171                        psImageMaskType M = (psImageMaskType) pow(2,j);
     
    8989            }
    9090           
    91            
    9291            // Values to set
    9392            float imageValue;
     
    101100            }
    102101            outImage->data.F32[yOut][xOut] = imageValue;
    103             if (0) {
     102            if (true) {
    104103              outMask->data.PS_TYPE_IMAGE_MASK_DATA[yOut][xOut] = maskValue;
    105104            } else {
    106105              outMask->data.PS_TYPE_IMAGE_MASK_DATA[yOut][xOut] = 0;
    107106            }
    108             for (int j = 0; j < Nbits; j++) {
    109               if (bitcounter[j] > 0.5 * pxlcount) {
    110                 outMask->data.PS_TYPE_IMAGE_MASK_DATA[yOut][xOut] |= (int) pow(2,j);
     107            // this loop is pointless if pxlcount == 0 (all masked)
     108            if (false) {
     109              if (pxlcount) {
     110                for (int j = 0; j < Nbits; j++) {
     111                  if (bitcounter[j] > 0.5 * pxlcount) {
     112                    outMask->data.PS_TYPE_IMAGE_MASK_DATA[yOut][xOut] |= (1 << j);
     113                  }
     114                }
     115              } else {
     116                outMask->data.PS_TYPE_IMAGE_MASK_DATA[yOut][xOut] = maskValue;
    111117              }
    112118            }
    113             xStart = xStop;
     119            xStart = xStop;
    114120        }
    115121        yStart = yStop;
Note: See TracChangeset for help on using the changeset viewer.