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.3 by greg, Fri Jul 19 01:24:33 2019 UTC vs.
Revision 2.6 by greg, Wed Aug 14 21:00:14 2019 UTC

# Line 27 | Line 27 | usage_exit(int code)
27          fputs("Usage: ", stderr);
28          fputs(progname, stderr);
29          fputs(
30 <        " [-d ref_depth/unit][-h[io]][-H[io]][-f[afd]] [input [output]]\n",
30 >        " [-d ref_depth/unit][-h[io]][-H[io]][-f[afd]] [input [output.dpt]]\n",
31                          stderr);
32          fputs("   Or: ", stderr);
33          fputs(progname, stderr);
34          fputs(
35 <        " {-r|-p} [-i][-u][-h[io]][-H[io]][-f[afd]] [input [output]]\n",
35 >        " {-r|-p} [-i][-u][-h[io]][-H[io]][-f[afd]] [input.dpt [output]]\n",
36                          stderr);
37          exit(code);
38   }
# 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 (strcasestr(dcp->inpfmt, "ascii") != NULL)
48 >                if (strstr(dcp->inpfmt, "ascii") != NULL)
49                          dcp->format = 'a';
50 <                else if (strcasestr(dcp->inpfmt, "float") != NULL)
50 >                else if (strstr(dcp->inpfmt, "float") != NULL)
51                          dcp->format = 'f';
52 <                else if (strcasestr(dcp->inpfmt, "double") != NULL)
52 >                else if (strstr(dcp->inpfmt, "double") != NULL)
53                          dcp->format = 'd';
54                  else {
55                          fputs(dcp->inpname, stderr);
# Line 71 | Line 71 | encode_depths(DEPTHCODEC *dcp)
71                          break;
72                  case 'f':
73                          ok = (getbinary(&f, sizeof(f), 1, dcp->finp) == 1);
74 +                        if (dcp->swapped)
75 +                                swap32((char *)&f, 1);
76                          d = f;
77                          break;
78                  case 'd':
79                          ok = (getbinary(&d, sizeof(d), 1, dcp->finp) == 1);
80 +                        if (dcp->swapped)
81 +                                swap64((char *)&d, 1);
82                          break;
83                  }
84                  if (!ok)
# Line 383 | Line 387 | main(int argc, char *argv[])
387                          fputs(": -i option requires input resolution\n", stderr);
388                          usage_exit(1);
389                  }
390 <                dc.hdrflags &= ~(HF_HEADOUT|HF_RESOUT);
390 >                dc.hdrflags &= ~HF_RESOUT;
391          }
392          if (a < argc-2) {
393                  fputs(progname, stderr);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines