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

Comparing ray/src/util/rcode_depth.c (file contents):
Revision 2.8 by greg, Wed Nov 13 18:20:47 2019 UTC vs.
Revision 2.10 by greg, Wed Feb 12 01:13:01 2020 UTC

# Line 45 | Line 45 | encode_depths(DEPTHCODEC *dcp)
45          long    nexpected = (long)dcp->res.xr * dcp->res.yr;
46  
47          if (dcp->inpfmt[0]) {
48 <                if (strstr(dcp->inpfmt, "ascii") != NULL)
48 >                if (!strcmp(dcp->inpfmt, "ascii"))
49                          dcp->format = 'a';
50 <                else if (strstr(dcp->inpfmt, "float") != NULL)
50 >                else if (!strcmp(dcp->inpfmt, "float"))
51                          dcp->format = 'f';
52 <                else if (strstr(dcp->inpfmt, "double") != NULL)
52 >                else if (!strcmp(dcp->inpfmt, "double"))
53                          dcp->format = 'd';
54                  else {
55                          fputs(dcp->inpname, stderr);
# Line 429 | Line 429 | main(int argc, char *argv[])
429                                          /* process data */
430          switch (conversion) {
431          case CV_FWD:                    /* distance -> depth code */
432 +                if (!strcmp(dc.depth_unit, "1")) {
433 +                        fputs(progname, stderr);
434 +                        fputs(": warning - using reference depth of 1.0\n",
435 +                                        stderr);
436 +                }
437                  if (!encode_depths(&dc))
438                          return 1;
439                  break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines