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

Comparing ray/src/common/tonemap.c (file contents):
Revision 3.13 by schorsch, Sun Jul 27 22:12:01 2003 UTC vs.
Revision 3.15 by greg, Thu Jul 22 17:48:52 2004 UTC

# Line 43 | Line 43 | double gamval;
43                  return(NULL);
44  
45          tmnew->flags = flags & ~TM_F_UNIMPL;
46 +        if (tmnew->flags & TM_F_BW)
47 +                tmnew->flags &= ~TM_F_MESOPIC;
48                                                  /* set monitor transform */
49          if (monpri == NULL || monpri == stdprims || tmnew->flags & TM_F_BW) {
50                  tmnew->monpri = stdprims;
# Line 173 | Line 175 | int    len;
175          if ((ls == NULL) | (scan == NULL) | (len < 0))
176                  returnErr(TM_E_ILLEGAL);
177          for (i = len; i--; ) {
178 <                if (tmNeedMatrix(tmTop))                /* get monitor RGB */
178 >                if (tmNeedMatrix(tmTop)) {              /* get monitor RGB */
179                          colortrans(cmon, tmTop->cmat, scan[i]);
180 <                else {
180 >                } else {
181                          cmon[RED] = tmTop->inpsf*scan[i][RED];
182                          cmon[GRN] = tmTop->inpsf*scan[i][GRN];
183                          cmon[BLU] = tmTop->inpsf*scan[i][BLU];
# Line 415 | Line 417 | double Ldmax;
417                  histot += tmTop->histo[i];
418                  sum += (j -= HISTEP) * tmTop->histo[i];
419          }
420 <        threshold = histot*.025 + .5;
420 >        threshold = histot*0.005 + .5;
421          if (threshold < 4)
422                  returnErr(TM_E_TMFAIL);
423          Lwavg = tmLuminance( (double)sum / histot );

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines