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

Comparing ray/src/px/pcond.c (file contents):
Revision 3.2 by greg, Fri Oct 4 16:10:39 1996 UTC vs.
Revision 3.3 by greg, Sat Oct 5 11:16:51 1996 UTC

# Line 378 | Line 378 | check2do()             /* check histogram to see what isn't worth
378          register int    i;
379  
380                                          /* check for within display range */
381 <        if (!(what2do&DO_LINEAR) && Lb(bwmax)/Lb(bwmin) <= ldmax/ldmin)
381 >        l = Lb(bwmax)/Lb(bwmin);
382 >        if (l <= ldmax/ldmin)
383                  what2do |= DO_LINEAR;
384 +                                        /* determine if veiling significant */
385 +        if (l < 100.)                   /* heuristic */
386 +                what2do &= ~DO_VEIL;
387  
388 <        if (!(what2do & (DO_ACUITY|DO_COLOR|DO_VEIL)))
388 >        if (!(what2do & (DO_ACUITY|DO_COLOR)))
389                  return;
390                                          /* find 5th percentile */
391          sum = histot*0.05 + .5;
# Line 398 | Line 402 | check2do()             /* check histogram to see what isn't worth
402                                          /* color sensitivity loss? */
403          if (l >= 6.0)
404                  what2do &= ~DO_COLOR;
401        if (!(what2do&DO_VEIL))
402                return;
403                                        /* find 50th percentile (median) */
404        sum = histot*0.50 + .5;
405        for (i = 0; i < HISTRES; i++)
406                if ((sum -= bwhist[i]) <= 0)
407                        break;
408                                        /* determine if veiling significant */
409         b = (i+.5)*(bwmax-bwmin)/HISTRES + bwmin;
410         if ((b-bwmin)/(bwmax-bwmin) >= 0.70)   /* heuristic */
411                what2do &= ~DO_VEIL;
405   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines