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.36 by greg, Tue Jun 3 21:31:51 2025 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 100 | Line 101 | typedef struct {               /* dynamic line buffer */
101   #define MAXBUF          (100L<<20)
102  
103                                  /* input files */
103 char            *progname = NULL;
104   const char      stdin_name[] = "<stdin>";
105   const char      *f1name=NULL, *f2name=NULL;
106   FILE            *f1in=NULL, *f2in=NULL;
# Line 245 | Line 245 | color_check(COLOR c1, COLOR c2)
245          return(real_check(colval(c1,p), colval(c2,p)));
246   }
247  
248 + #if 1
249   /* Compare two color spectra for equivalence */
250   static int
251   spec_check(COLORV *sc1, COLORV *sc2)
# Line 261 | Line 262 | spec_check(COLORV *sc1, COLORV *sc2)
262  
263          return(real_check(sc1[p], sc2[p]));
264   }
265 + #else
266 + /* Compare two color spectra for equivalence */
267 + static int
268 + spec_check(COLORV *sc1, COLORV *sc2)
269 + {
270 +        COLOR   c1, c2;
271 +        int     p;
272  
273 +        if (!real_check(scolor_mean(sc1), scolor_mean(sc2)))
274 +                return(0);
275 +                                        /* do comparisons in RGB space */
276 +        scolor_rgb(c1, sc1);
277 +        scolor_rgb(c2, sc2);
278 +
279 +        p = (colval(c1,GRN) > colval(c1,RED)) ? GRN : RED;
280 +        if (colval(c1,BLU) > colval(c1,p)) p = BLU;
281 +
282 +        return(real_check(colval(c1,p), colval(c2,p)));
283 + }
284 + #endif
285 +
286   /* Compare two normal directions for equivalence */
287   static int
288   norm_check(FVECT nv1, FVECT nv2)
# Line 1039 | Line 1060 | main(int argc, char *argv[])
1060   {
1061          int     typ1, typ2;
1062          int     a;
1063 <
1064 <        progname = argv[0];
1063 >                                                /* set global progname */
1064 >        fixargv0(argv[0]);
1065          for (a = 1; a < argc && argv[a][0] == '-'; a++) {
1066                  switch (argv[a][1]) {
1067                  case 'h':                       /* ignore header info. */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines