ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/clrtab.c
(Generate patch)

Comparing ray/src/px/clrtab.c (file contents):
Revision 2.2 by greg, Tue Oct 13 09:07:51 1992 UTC vs.
Revision 2.3 by greg, Tue Oct 13 11:36:20 1992 UTC

# Line 279 | Line 279 | int    n;
279                  neigh[i][0] = i;                /* identity is terminator */
280          }
281                                          /* make neighbor lists */
282 <        for (r = 0; r < NRED-1; r++)
283 <            for (g = 0; g < NGRN-1; g++)
284 <                for (b = 0; b < NBLU-1; b++) {
285 <                    if (histo[r][g][b] != histo[r+1][g][b])
282 >        for (r = 0; r < NRED; r++)
283 >            for (g = 0; g < NGRN; g++)
284 >                for (b = 0; b < NBLU; b++) {
285 >                    if (r < NRED-1 && histo[r][g][b] != histo[r+1][g][b])
286                          addneigh(neigh, histo[r][g][b], histo[r+1][g][b]);
287 <                    if (histo[r][g][b] != histo[r][g+1][b])
287 >                    if (g < NGRN-1 && histo[r][g][b] != histo[r][g+1][b])
288                          addneigh(neigh, histo[r][g][b], histo[r][g+1][b]);
289 <                    if (histo[r][g][b] != histo[r][g][b+1])
289 >                    if (b < NBLU-1 && histo[r][g][b] != histo[r][g][b+1])
290                          addneigh(neigh, histo[r][g][b], histo[r][g][b+1]);
291                  }
292                                          /* assign closest values */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines