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.11 by greg, Mon Jul 20 15:53:30 2020 UTC vs.
Revision 2.12 by greg, Thu Jun 30 00:16:49 2022 UTC

# Line 162 | Line 162 | pixel_depths(DEPTHCODEC *dcp, int unbuf)
162                  return 0;
163  
164          while (scanf("%d %d", &xy[0], &xy[1]) == 2) {
165 <
166 <                loc2pix(xy, &dcp->res,
167 <                        (xy[0]+.5)/dcp->res.xr, (xy[1]+.5)/dcp->res.yr);
168 <
165 >                loc2pix(xy, &dcp->res, xy[0]/(double)dcp->res.xr,
166 >                                xy[1]/(double)dcp->res.yr);
167                  d = decode_depth_pix(dcp, xy[0], xy[1]);
168                  if (d < -FTINY)
169                          return 0;
172
170                  output_depth(dcp, d);
174
171                  if (unbuf && fflush(stdout) == EOF) {
172                          fputs(progname, stderr);
173                          fputs(": write error on output\n", stderr);
# Line 260 | Line 256 | pixel_points(DEPTHCODEC *dcp, int unbuf)
256                  return 0;
257  
258          while (scanf("%d %d", &xy[0], &xy[1]) == 2) {
259 <                loc2pix(xy, &dcp->res,
260 <                        (xy[0]+.5)/dcp->res.xr, (xy[1]+.5)/dcp->res.yr);
259 >                loc2pix(xy, &dcp->res, xy[0]/(double)dcp->res.xr,
260 >                                xy[1]/(double)dcp->res.yr);
261                  if (get_worldpos_pix(wpos, dcp, xy[0], xy[1]) < 0)
262                          return 0;
263                  output_worldpos(dcp, wpos);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines