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.24 by greg, Wed May 10 15:34:17 2006 UTC vs.
Revision 3.25 by greg, Thu May 11 00:58:48 2006 UTC

# Line 262 | Line 262 | int    len
262   )
263   {
264          static const char funcName[] = "tmCvColors";
265        static COLOR    csmall = {.5*MINLUM, .5*MINLUM, .5*MINLUM};
265          static BYTE     gamtab[1024];
266          static double   curgam = .0;
267          COLOR   cmon;
# Line 301 | Line 300 | int    len
300                  lum =   tms->clf[RED]*cmon[RED] +
301                          tms->clf[GRN]*cmon[GRN] +
302                          tms->clf[BLU]*cmon[BLU] ;
303 <                if (lum <= TM_NOLUM)                    /* convert brightness */
303 >                if (lum <= TM_NOLUM) {                  /* convert brightness */
304 >                        lum = cmon[RED] = cmon[GRN] = cmon[BLU] = TM_NOLUM;
305                          ls[i] = TM_NOBRT;
306 <                else
306 >                } else
307                          ls[i] = tmCvLumLUfp(&lum);
308                  if (cs == TM_NOCHROM)                   /* no color? */
309                          continue;
310                  if (tms->flags & TM_F_MESOPIC && lum < LMESUPPER) {
311                          slum = scotlum(cmon);           /* mesopic adj. */
312 <                        if (lum < LMESLOWER)
312 >                        if (lum < LMESLOWER) {
313                                  cmon[RED] = cmon[GRN] = cmon[BLU] = slum;
314 <                        else {
314 >                        } else {
315                                  d = (lum - LMESLOWER)/(LMESUPPER - LMESLOWER);
316                                  if (tms->flags & TM_F_BW)
317                                          cmon[RED] = cmon[GRN] =

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines