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

Comparing ray/src/util/ranimove2.c (file contents):
Revision 3.4 by greg, Mon Jul 7 17:21:51 2003 UTC vs.
Revision 3.5 by schorsch, Sun Jul 27 22:12:04 2003 UTC

# Line 51 | Line 51 | refine_first()                 /* initial refinement pass */
51                  if (xmbuffer[n] == MO_UNK)
52                          continue;
53                  xp = x + xmbuffer[n];
54 <                if ((xp < 0 | xp >= hres))
54 >                if ((xp < 0) | (xp >= hres))
55                          continue;
56                  yp = y + ymbuffer[n];
57 <                if ((yp < 0 | yp >= vres))
57 >                if ((yp < 0) | (yp >= vres))
58                          continue;
59                  np = fndx(xp, yp);
60                                          /* make sure we hit same object */
# Line 135 | Line 135 | static void
135   sum_consp(cdest, cs)            /* sum in conspicuity result */
136   register struct ConspSum        *cdest, *cs;
137   {
138 <        if ((cdest == NULL | cs == NULL))
138 >        if ((cdest == NULL) | (cs == NULL))
139                  return;
140          addcolor(cdest->vsum, cs->vsum);
141          addcolor(cdest->v2sum, cs->v2sum);
# Line 165 | Line 165 | register struct ConspSum       *cs;
165          } else
166                  eest = estimaterr(cs->vsum, cs->v2sum, cs->nsamp, cs->nsamp);
167          
168 <        if ((x0 == x1-1 & y0 == y1-1)) {        /* update pixel error */
168 >        if ((x0 == x1-1) & (y0 == y1-1)) {      /* update pixel error */
169                  int     n = fndx(x0, y0);
170                  int     ai;
171                  int     ne;
# Line 235 | Line 235 | struct ConspSum        *cs;
235          struct ConspSum mysum;
236          int     i;
237  
238 <        if ((x0 >= x1 | y0 >= y1))
238 >        if ((x0 >= x1) | (y0 >= y1))
239                  error(CONSISTENCY, "bad call to subconspicuity");
240  
241          clr_consp(&mysum);                      /* prepare sum */
242  
243 <        if ((x0 == x1-1 & y0 == y1-1)) {        /* single pixel */
243 >        if ((x0 == x1-1) & (y0 == y1-1)) {      /* single pixel */
244                  double  hls;
245                  register int    n = fndx(x0, y0);
246                  if (sbuffer[n]) {
# Line 389 | Line 389 | register int   n;
389                  if (sbuffer[n] != 1)
390                          error(CONSISTENCY, "bad code in ray_refine");
391                  if (getambcolor(ctmp, obuffer[n]) &&
392 <                                (colval(ctmp,RED) > 0.01 &
393 <                                 colval(ctmp,GRN) > 0.01 &
394 <                                 colval(ctmp,BLU) > 0.01)) {
392 >                                (colval(ctmp,RED) > 0.01) &
393 >                                (colval(ctmp,GRN) > 0.01) &
394 >                                (colval(ctmp,BLU) > 0.01)) {
395                          for (i = 0; i < 3; i++)
396                                  asump->diffsum[i] +=
397                                      (colval(ir.rcol,i) - colval(cbuffer[n],i))
# Line 471 | Line 471 | int    pass;
471          static long     ray_cnt = 0;
472          static double   ctime_used = 0;
473          static int      csp_cnt = 0;
474 <        int     timed = (fcur > fbeg | pass > 0 | quickstart);
474 >        int     timed = (fcur > fbeg) | (pass > 0) | (quickstart);
475          double  time_start, rtime_start, time_done;
476          struct AmbSum   myAmbSum;
477          long    rays_todo, nr;
478          register int    n;
479                                          /* IBR refinement? */
480 <        if ((pass == 0 & fcur > fbeg))
480 >        if ((pass == 0) & (fcur > fbeg))
481                  return(refine_first());
482                                          /* any time left? */
483          time_start = getTime();
# Line 599 | Line 599 | if (pass == 1) {
599          return(1);
600   nomore:
601                                          /* make sure error map is updated */
602 <        if ((fcur == fbeg | pass > 1))
602 >        if ((fcur == fbeg) | (pass > 1))
603                  comp_frame_error();
604          return(0);
605   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines