IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 11, 2008, 10:40:26 AM (17 years ago)
Author:
Paul Price
Message:

Sense of Theta wrt ROTANGLE was wrong.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroMaskUpdates.c

    r20950 r20960  
    66  return false; \
    77}
    8  
     8
    99pmCell *pmCellInChip (pmChip *chip, float x, float y);
    1010bool pmCellCoordsForChip (float *xCell, float *yCell, pmCell *cell, float xChip, float yChip);
     
    1717void psastroMaskRectangle (psImage *mask, char value, int x0, int y0, int x1, int y1);
    1818
    19 // create a mask or mask regions based on the collection of reference stars that are 
     19// create a mask or mask regions based on the collection of reference stars that are
    2020// in the vicinity of each chip
    2121bool psastroMaskUpdates (pmConfig *config) {
     
    5757    pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, "PSASTRO.INPUT");
    5858    if (!input) {
    59         psError(PSASTRO_ERR_CONFIG, true, "Can't find input data");
    60         return false;
     59        psError(PSASTRO_ERR_CONFIG, true, "Can't find input data");
     60        return false;
    6161    }
    6262    pmFPA *fpa = input->fpa;
     
    6464    // really error-out here?  or just skip?
    6565    if (!psastroZeroPointFromRecipe (&zeropt, &exptime, fpa, recipe)) {
    66         psLogMsg ("psastro", PS_LOG_INFO, "failed to load zeropt data from recipe");
    67         return false;
     66        psLogMsg ("psastro", PS_LOG_INFO, "failed to load zeropt data from recipe");
     67        return false;
    6868    }
    6969
     
    7979    pmFPAfile *outMask = psMetadataLookupPtr (NULL, config->files, "PSASTRO.OUTPUT.MASK");
    8080    if (!outMask) {
    81         psError(PSASTRO_ERR_CONFIG, true, "Can't find output mask");
    82         return false;
     81        psError(PSASTRO_ERR_CONFIG, true, "Can't find output mask");
     82        return false;
    8383    }
    8484    pmFPA *fpaMask = outMask->fpa;
     
    8787    pmFPAfile *refMask = psMetadataLookupPtr (NULL, config->files, "PSASTRO.REFMASK");
    8888    if (!refMask) {
    89         psError(PSASTRO_ERR_CONFIG, true, "Can't find mask reference");
    90         return false;
    91     }
    92 
    93     // double POSANGLE = PM_RAD_DEG * psMetadataLookupF64 (&status, fpa->concepts, "FPA.POSANGLE"); 
     89        psError(PSASTRO_ERR_CONFIG, true, "Can't find mask reference");
     90        return false;
     91    }
     92
     93    // double POSANGLE = PM_RAD_DEG * psMetadataLookupF64 (&status, fpa->concepts, "FPA.POSANGLE");
    9494    // psAssert (status, "POSANGLE missing");
    95     double ROTANGLE = PM_RAD_DEG * psMetadataLookupF64 (&status, fpa->concepts, "FPA.ROTANGLE"); 
     95    double ROTANGLE = PM_RAD_DEG * psMetadataLookupF64 (&status, fpa->concepts, "FPA.ROTANGLE");
    9696    psAssert (status, "ROTANGLE missing");
    9797
     
    112112        psTrace ("psastro", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
    113113        if (!chip->process || !chip->file_exists) { continue; }
    114         if (!chip->fromFPA) { continue; }
    115 
    116         if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE;
    117 
    118         // text region files for testing
    119         FILE *f = NULL;
    120         if (REFSTAR_MASK_REGIONS) {
    121           char *filename = NULL;
    122           char *chipname = psMetadataLookupStr (&status, chip->concepts, "CHIP.NAME");
    123           psStringAppend (&filename, "refstars.mask.%s.dat", chipname);
    124           FILE *f = fopen (filename, "w");
    125           if (!f) {
    126             psWarning ("cannot create refstar mask file %s\n", filename);
    127             continue;
    128           }
    129           psFree (filename);
    130         }
    131 
    132         pmChip *refChip  = pmFPAviewThisChip (view, refMask->fpa);
    133 
    134         // load sequence for mask corresponding to this chip (XXX this is needed if the input mask is not the same format as the astrometry file
    135         *viewMask = *view;
     114        if (!chip->fromFPA) { continue; }
     115
     116        if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE;
     117
     118        // text region files for testing
     119        FILE *f = NULL;
     120        if (REFSTAR_MASK_REGIONS) {
     121          char *filename = NULL;
     122          char *chipname = psMetadataLookupStr (&status, chip->concepts, "CHIP.NAME");
     123          psStringAppend (&filename, "refstars.mask.%s.dat", chipname);
     124          FILE *f = fopen (filename, "w");
     125          if (!f) {
     126            psWarning ("cannot create refstar mask file %s\n", filename);
     127            continue;
     128          }
     129          psFree (filename);
     130        }
     131
     132        pmChip *refChip  = pmFPAviewThisChip (view, refMask->fpa);
     133
     134        // load sequence for mask corresponding to this chip (XXX this is needed if the input mask is not the same format as the astrometry file
     135        *viewMask = *view;
    136136        while ((cell = pmFPAviewNextCell (viewMask, fpaMask, 1)) != NULL) {
    137137            psTrace ("psastro", 4, "Mask Cell %d: %x %x\n", viewMask->cell, cell->file_exists, cell->process);
    138138            if (!cell->process || !cell->file_exists) { continue; }
    139             if (!pmFPAfileIOChecks (config, viewMask, PM_FPA_BEFORE)) ESCAPE;
    140            
     139            if (!pmFPAfileIOChecks (config, viewMask, PM_FPA_BEFORE)) ESCAPE;
     140
    141141            while ((readout = pmFPAviewNextReadout (viewMask, fpaMask, 1)) != NULL) {
    142                 if (!pmFPAfileIOChecks (config, viewMask, PM_FPA_BEFORE)) ESCAPE;
     142                if (!pmFPAfileIOChecks (config, viewMask, PM_FPA_BEFORE)) ESCAPE;
    143143                if (! readout->data_exists) { continue; }
    144             }
    145         }
     144            }
     145        }
    146146
    147147        while ((cell = pmFPAviewNextCell (view, fpa, 1)) != NULL) {
     
    149149            if (!cell->process || !cell->file_exists) { continue; }
    150150
    151             // the input mask is a chip-mosaic image
    152             // the output mask is a chip-mosaic image
    153             // we mark the masked pixels in the chip space, BUT
    154             // we need to find the ends of the cells for the bleeds
    155 
    156             // we mask pixels on the input mask image (chip-mosaic)
    157             pmCell *cellMask = pmFPAviewThisCell(view, outMask->fpa);
    158             pmReadout *readoutMask = NULL;
    159             if (cellMask->readouts->n) {
    160                 readoutMask = cellMask->readouts->data[0];
    161             }
     151            // the input mask is a chip-mosaic image
     152            // the output mask is a chip-mosaic image
     153            // we mark the masked pixels in the chip space, BUT
     154            // we need to find the ends of the cells for the bleeds
     155
     156            // we mask pixels on the input mask image (chip-mosaic)
     157            pmCell *cellMask = pmFPAviewThisCell(view, outMask->fpa);
     158            pmReadout *readoutMask = NULL;
     159            if (cellMask->readouts->n) {
     160                readoutMask = cellMask->readouts->data[0];
     161            }
    162162
    163163            // process each of the readouts
     
    170170                if (refstars == NULL) { continue; }
    171171
    172                 // we need to generate the following masks regions:
    173                 // 1) circle around the saturated stars (scaled by magnitude)
    174                 // 2) diffraction spikes in direction ROT - ROTo
    175                 // 3) bleed trail in the direction of the readout
    176 
    177                 // XXX for the moment, let's just generate mana region-file objects in chip pixel space
    178                 for (int i = 0; i < refstars->n; i++) {
    179                     pmAstromObj *ref = refstars->data[i];
    180                     if (ref->Mag > REFSTAR_MASK_MAX_MAG) continue;
    181                    
    182                     // XXX convert ref->Mag to instrumental mags
    183 
    184                     // CIRCLE around the stars (scaled by magnitude)
    185                     float radius = REFSTAR_MASK_SATSTAR_MAG_SLOPE * (REFSTAR_MASK_SATSTAR_MAG_MAX - ref->Mag);
    186 
    187                     if (REFSTAR_MASK_REGIONS) {
    188                       fprintf (f, "CIRCLE %f %f  %f %f\n", ref->chip->x, ref->chip->y, radius, radius);
    189                     }
    190 
    191                     // XXX for now, assume cell binning is 1x1 relative to chip
    192                     if (readoutMask) {
    193                         psastroMaskCircle (readoutMask->mask, maskValue, ref->chip->x, ref->chip->y, radius, radius);
    194                     }
    195 
    196                     // LINE for boundaries of the saturation spikes (scaled by magnitude)
    197                     float spikeLength = REFSTAR_MASK_SATSPIKE_MAG_SLOPE * (REFSTAR_MASK_SATSPIKE_MAG_MAX - ref->Mag);
    198                     float spikeWidth = REFSTAR_MASK_SATSPIKE_WIDTH;
    199 
    200                     for (float theta = 0.0; theta < 2*M_PI; theta += M_PI / 2.0) {
    201                         float x0, y0, x1, y1, dx, dy;
    202 
    203                         float Theta = ROTANGLE - REFSTAR_MASK_SATSTAR_POS_ZERO + theta;
    204 
    205                         if (REFSTAR_MASK_REGIONS) {
    206                           // lower side
    207                           x0 = ref->chip->x + spikeWidth*sin(Theta);
    208                           y0 = ref->chip->y - spikeWidth*cos(Theta);
    209                           x1 = ref->chip->x + spikeLength*cos(Theta) + spikeWidth*sin(Theta);
    210                           y1 = ref->chip->y + spikeLength*sin(Theta) - spikeWidth*cos(Theta);
    211                           dx = x1 - x0;
    212                           dy = y1 - y0;
    213 
    214                           fprintf (f, "LINE %f %f  %f %f\n", x0, y0, dx, dy);
    215 
    216                           // upper side
    217                           x0 = ref->chip->x - spikeWidth*sin(Theta);
    218                           y0 = ref->chip->y + spikeWidth*cos(Theta);
    219                           x1 = ref->chip->x + spikeLength*cos(Theta) - spikeWidth*sin(Theta);
    220                           y1 = ref->chip->y + spikeLength*sin(Theta) + spikeWidth*cos(Theta);
    221                           dx = x1 - x0;
    222                           dy = y1 - y0;
    223                           fprintf (f, "LINE %f %f  %f %f\n", x0, y0, dx, dy);
    224                         }
    225 
    226                         if (readoutMask) {
    227                             psastroMaskBox (readoutMask->mask, maskValue, ref->chip->x, ref->chip->y, spikeLength, spikeWidth, Theta);
    228                         }
    229                     }
    230 
    231                     // convert x,y chip coordinates to cells in maskChip
    232                     pmCell *refCell = pmCellInChip (refChip, ref->chip->x, ref->chip->y);
    233 
    234                     // LINE for boundaries of the bleed lines
    235                     if (REFSTAR_MASK_REGIONS) {
    236                       fprintf (f, "LINE %f %f  %f %f\n", ref->chip->x, ref->chip->y, 0.0, -100.0);
    237                     }
    238 
    239                     if (readoutMask && refCell) {
    240                         float xCell = 0.0;
    241                         float yCell = 0.0;
    242                         float xEnd = 0.0;
    243                         float yEnd = 0.0;
    244                         // find coordinate of star on cell
    245                         pmCellCoordsForChip (&xCell, &yCell, refCell, ref->chip->x, ref->chip->y);
    246                         // find coordinate of end-point on chip
    247 
    248                         int ySize = psMetadataLookupS32(NULL, refCell->concepts, "CELL.YSIZE");
    249                         pmChipCoordsForCell (&xEnd, &yEnd, refCell, xCell, ySize);
    250 
    251                         float width = REFSTAR_MASK_BLEED_MAG_SLOPE*(REFSTAR_MASK_BLEED_MAG_MAX - ref->Mag);
    252                         psastroMaskRectangle (readoutMask->mask, maskValue, (int) ref->chip->x-0.5*width, (int) ref->chip->y, (int) ref->chip->x+0.5*width+1, yEnd);
    253                     }
    254                 }
     172                // we need to generate the following masks regions:
     173                // 1) circle around the saturated stars (scaled by magnitude)
     174                // 2) diffraction spikes in direction ROT - ROTo
     175                // 3) bleed trail in the direction of the readout
     176
     177                // XXX for the moment, let's just generate mana region-file objects in chip pixel space
     178                for (int i = 0; i < refstars->n; i++) {
     179                    pmAstromObj *ref = refstars->data[i];
     180                    if (ref->Mag > REFSTAR_MASK_MAX_MAG) continue;
     181
     182                    // XXX convert ref->Mag to instrumental mags
     183
     184                    // CIRCLE around the stars (scaled by magnitude)
     185                    float radius = REFSTAR_MASK_SATSTAR_MAG_SLOPE * (REFSTAR_MASK_SATSTAR_MAG_MAX - ref->Mag);
     186
     187                    if (REFSTAR_MASK_REGIONS) {
     188                      fprintf (f, "CIRCLE %f %f  %f %f\n", ref->chip->x, ref->chip->y, radius, radius);
     189                    }
     190
     191                    // XXX for now, assume cell binning is 1x1 relative to chip
     192                    if (readoutMask) {
     193                        psastroMaskCircle (readoutMask->mask, maskValue, ref->chip->x, ref->chip->y, radius, radius);
     194                    }
     195
     196                    // LINE for boundaries of the saturation spikes (scaled by magnitude)
     197                    float spikeLength = REFSTAR_MASK_SATSPIKE_MAG_SLOPE * (REFSTAR_MASK_SATSPIKE_MAG_MAX - ref->Mag);
     198                    float spikeWidth = REFSTAR_MASK_SATSPIKE_WIDTH;
     199
     200                    for (float theta = 0.0; theta < 2*M_PI; theta += M_PI / 2.0) {
     201                        float x0, y0, x1, y1, dx, dy;
     202
     203                        float Theta = theta - ROTANGLE - REFSTAR_MASK_SATSTAR_POS_ZERO;
     204
     205                        if (REFSTAR_MASK_REGIONS) {
     206                          // lower side
     207                          x0 = ref->chip->x + spikeWidth*sin(Theta);
     208                          y0 = ref->chip->y - spikeWidth*cos(Theta);
     209                          x1 = ref->chip->x + spikeLength*cos(Theta) + spikeWidth*sin(Theta);
     210                          y1 = ref->chip->y + spikeLength*sin(Theta) - spikeWidth*cos(Theta);
     211                          dx = x1 - x0;
     212                          dy = y1 - y0;
     213
     214                          fprintf (f, "LINE %f %f  %f %f\n", x0, y0, dx, dy);
     215
     216                          // upper side
     217                          x0 = ref->chip->x - spikeWidth*sin(Theta);
     218                          y0 = ref->chip->y + spikeWidth*cos(Theta);
     219                          x1 = ref->chip->x + spikeLength*cos(Theta) - spikeWidth*sin(Theta);
     220                          y1 = ref->chip->y + spikeLength*sin(Theta) + spikeWidth*cos(Theta);
     221                          dx = x1 - x0;
     222                          dy = y1 - y0;
     223                          fprintf (f, "LINE %f %f  %f %f\n", x0, y0, dx, dy);
     224                        }
     225
     226                        if (readoutMask) {
     227                            psastroMaskBox (readoutMask->mask, maskValue, ref->chip->x, ref->chip->y, spikeLength, spikeWidth, Theta);
     228                        }
     229                    }
     230
     231                    // convert x,y chip coordinates to cells in maskChip
     232                    pmCell *refCell = pmCellInChip (refChip, ref->chip->x, ref->chip->y);
     233
     234                    // LINE for boundaries of the bleed lines
     235                    if (REFSTAR_MASK_REGIONS) {
     236                      fprintf (f, "LINE %f %f  %f %f\n", ref->chip->x, ref->chip->y, 0.0, -100.0);
     237                    }
     238
     239                    if (readoutMask && refCell) {
     240                        float xCell = 0.0;
     241                        float yCell = 0.0;
     242                        float xEnd = 0.0;
     243                        float yEnd = 0.0;
     244                        // find coordinate of star on cell
     245                        pmCellCoordsForChip (&xCell, &yCell, refCell, ref->chip->x, ref->chip->y);
     246                        // find coordinate of end-point on chip
     247
     248                        int ySize = psMetadataLookupS32(NULL, refCell->concepts, "CELL.YSIZE");
     249                        pmChipCoordsForCell (&xEnd, &yEnd, refCell, xCell, ySize);
     250
     251                        float width = REFSTAR_MASK_BLEED_MAG_SLOPE*(REFSTAR_MASK_BLEED_MAG_MAX - ref->Mag);
     252                        psastroMaskRectangle (readoutMask->mask, maskValue, (int) ref->chip->x-0.5*width, (int) ref->chip->y, (int) ref->chip->x+0.5*width+1, yEnd);
     253                    }
     254                }
    255255            }
    256256        }
    257257
    258         // output sequence for mask corresponding to this chip
    259         *viewMask = *view;
     258        // output sequence for mask corresponding to this chip
     259        *viewMask = *view;
    260260        while ((cell = pmFPAviewNextCell (viewMask, outMask->fpa, 1)) != NULL) {
    261261            psTrace ("psastro", 4, "Mask Cell %d: %x %x\n", viewMask->cell, cell->file_exists, cell->process);
    262262            if (!cell->process || !cell->file_exists) { continue; }
    263            
     263
    264264            while ((readout = pmFPAviewNextReadout (viewMask, outMask->fpa, 1)) != NULL) {
    265265                if (! readout->data_exists) { continue; }
    266                 if (!pmFPAfileIOChecks (config, viewMask, PM_FPA_AFTER)) ESCAPE;
    267             }
    268             if (!pmFPAfileIOChecks (config, viewMask, PM_FPA_AFTER)) ESCAPE;
    269         }
    270 
    271         if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE;
    272         if (REFSTAR_MASK_REGIONS) {
    273           fclose (f);
    274         }
     266                if (!pmFPAfileIOChecks (config, viewMask, PM_FPA_AFTER)) ESCAPE;
     267            }
     268            if (!pmFPAfileIOChecks (config, viewMask, PM_FPA_AFTER)) ESCAPE;
     269        }
     270
     271        if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE;
     272        if (REFSTAR_MASK_REGIONS) {
     273          fclose (f);
     274        }
    275275    }
    276276    if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE;
     
    299299    int yBin = 1;
    300300
    301     // Position on the cell 
     301    // Position on the cell
    302302    float xCell = PM_CHIP_TO_CELL(xChip, x0Cell, xParityCell, xBin);
    303303    float yCell = PM_CHIP_TO_CELL(yChip, y0Cell, yParityCell, yBin);
     
    306306    for (int i = 0; i < chip->cells->n; i++) {
    307307
    308         pmCell *cell = chip->cells->data[i];
    309         psRegion *region = pmCellExtent (cell);
    310 
    311         if (x < region->x0) goto skip;
    312         if (x > region->x1) goto skip;
    313         if (y < region->y0) goto skip;
    314         if (y > region->y1) goto skip;
    315 
    316         psFree (region);
    317         return cell;
     308        pmCell *cell = chip->cells->data[i];
     309        psRegion *region = pmCellExtent (cell);
     310
     311        if (x < region->x0) goto skip;
     312        if (x > region->x1) goto skip;
     313        if (y < region->y0) goto skip;
     314        if (y > region->y1) goto skip;
     315
     316        psFree (region);
     317        return cell;
    318318
    319319    skip:
    320         psFree (region);
     320        psFree (region);
    321321    }
    322322    return NULL;
     
    337337    int yBin = 1;
    338338
    339     // Position on the cell 
     339    // Position on the cell
    340340    // ((pos)*(binning)*(cellParity) + (cell0))
    341341    // XXX this is probably totally wrong now....
     
    361361    int yBin = 1;
    362362
    363     // Position on the cell 
     363    // Position on the cell
    364364    // ((pos)*(binning)*(cellParity) + (cell0))
    365365    // XXX this is probably totally wrong now....
    366366    // ((pos) - (cell0))*(cellParity)/(binning))
    367     *xChip = xCell*xBin*xParityCell + x0Cell; 
    368     *yChip = yCell*yBin*yParityCell + y0Cell; 
     367    *xChip = xCell*xBin*xParityCell + x0Cell;
     368    *yChip = yCell*yBin*yParityCell + y0Cell;
    369369
    370370    return true;
     
    376376    // XXX need to worry about row0, col0
    377377    for (int ix = -dX; ix <= +dX; ix++) {
    378         int jx = ix + x0;
    379         if (jx < 0) continue;
    380         if (jx >= mask->numCols) continue;
    381         for (int iy = -dY; iy <= +dY; iy++) {
    382             int jy = iy + y0;
    383             if (jy < 0) continue;
    384             if (jy >= mask->numRows) continue;
    385 
    386             double r2 = PS_SQR(ix/dX) + PS_SQR(iy/dY);
    387             if (r2 > 1.0) continue;
    388            
    389             mask->data.U8[jy][jx] |= value;
    390         }
     378        int jx = ix + x0;
     379        if (jx < 0) continue;
     380        if (jx >= mask->numCols) continue;
     381        for (int iy = -dY; iy <= +dY; iy++) {
     382            int jy = iy + y0;
     383            if (jy < 0) continue;
     384            if (jy >= mask->numRows) continue;
     385
     386            double r2 = PS_SQR(ix/dX) + PS_SQR(iy/dY);
     387            if (r2 > 1.0) continue;
     388
     389            mask->data.U8[jy][jx] |= value;
     390        }
    391391    }
    392392    return true;
     
    415415
    416416  /* rather than draw the line from float positions, we find the closest
    417      integer end-points and draw the line between those pixels */ 
     417     integer end-points and draw the line between those pixels */
    418418
    419419  X1 = ROUND(x1);
     
    449449    e = 0;
    450450    for (X = X1; X <= X2; X++) {
    451         if (X > 0) {
    452             if (swapcoords) {
    453                 if (X >= mask->numRows) continue;
    454                 for (int y = Y - dW; y <= Y + dW; y++) {
    455                     if (y < 0) continue;
    456                     if (y >= mask->numCols) continue;
    457                     mask->data.U8[X][y] |= value;
    458                 }
    459             } else {
    460                 if (X >= mask->numCols) continue;
    461                 for (int y = Y - dW; y <= Y + dW; y++) {
    462                     if (y < 0) continue;
    463                     if (y >= mask->numRows) continue;
    464                     mask->data.U8[y][X] |= value;
    465                 }
    466             }
    467         }
    468         e += dY;
    469         e2 = 2 * e;
    470         if (e2 > dX) {
    471             Y++;
    472             e -= dX;
    473         }
    474         if (e2 < -dX) {
    475             Y--;
    476             e += dX;
    477         }
     451        if (X > 0) {
     452            if (swapcoords) {
     453                if (X >= mask->numRows) continue;
     454                for (int y = Y - dW; y <= Y + dW; y++) {
     455                    if (y < 0) continue;
     456                    if (y >= mask->numCols) continue;
     457                    mask->data.U8[X][y] |= value;
     458                }
     459            } else {
     460                if (X >= mask->numCols) continue;
     461                for (int y = Y - dW; y <= Y + dW; y++) {
     462                    if (y < 0) continue;
     463                    if (y >= mask->numRows) continue;
     464                    mask->data.U8[y][X] |= value;
     465                }
     466            }
     467        }
     468        e += dY;
     469        e2 = 2 * e;
     470        if (e2 > dX) {
     471            Y++;
     472            e -= dX;
     473        }
     474        if (e2 < -dX) {
     475            Y--;
     476            e += dX;
     477        }
    478478    }
    479479    return;
     
    481481
    482482void psastroMaskRectangle (psImage *mask, char value, int x0, int y0, int x1, int y1) {
    483    
     483
    484484    int xs = PS_MAX (0, PS_MIN (mask->numCols, PS_MIN (x0, x1)));
    485485    int xe = PS_MAX (0, PS_MIN (mask->numCols, PS_MAX (x0, x1)));
     
    488488
    489489    for (int iy = ys; iy < ye; iy++) {
    490         for (int ix = xs; ix < xe; ix++) {
    491             mask->data.U8[iy][ix] |= value;
    492         }
    493     }
    494 }
    495 
     490        for (int ix = xs; ix < xe; ix++) {
     491            mask->data.U8[iy][ix] |= value;
     492        }
     493    }
     494}
     495
Note: See TracChangeset for help on using the changeset viewer.