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

Comparing ray/src/util/radcompare.c (file contents):
Revision 2.33 by greg, Tue Nov 21 19:22:38 2023 UTC vs.
Revision 2.35 by greg, Mon Dec 9 00:29:30 2024 UTC

# Line 79 | Line 79 | const char     *hdr_ignkey[] = {
79                          "CAPDATE",
80                          "GMT",
81                          "FRAME",
82 +                        "TILED",
83                          NULL    /* terminator */
84                  };
85                                  /* header variable settings */
# Line 245 | Line 246 | color_check(COLOR c1, COLOR c2)
246          return(real_check(colval(c1,p), colval(c2,p)));
247   }
248  
249 + #if 1
250   /* Compare two color spectra for equivalence */
251   static int
252   spec_check(COLORV *sc1, COLORV *sc2)
# Line 261 | Line 263 | spec_check(COLORV *sc1, COLORV *sc2)
263  
264          return(real_check(sc1[p], sc2[p]));
265   }
266 + #else
267 + /* Compare two color spectra for equivalence */
268 + static int
269 + spec_check(COLORV *sc1, COLORV *sc2)
270 + {
271 +        COLOR   c1, c2;
272 +        int     p;
273 +
274 +        if (!real_check(scolor_mean(sc1), scolor_mean(sc2)))
275 +                return(0);
276 +                                        /* do comparisons in RGB space */
277 +        scolor_rgb(c1, sc1);
278 +        scolor_rgb(c2, sc2);
279 +
280 +        p = (colval(c1,GRN) > colval(c1,RED)) ? GRN : RED;
281 +        if (colval(c1,BLU) > colval(c1,p)) p = BLU;
282 +
283 +        return(real_check(colval(c1,p), colval(c2,p)));
284 + }
285 + #endif
286  
287   /* Compare two normal directions for equivalence */
288   static int

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines