--- ray/src/common/tmapcolrs.c 2005/10/24 04:25:01 3.22 +++ ray/src/common/tmapcolrs.c 2005/11/15 06:53:00 3.23 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: tmapcolrs.c,v 3.22 2005/10/24 04:25:01 greg Exp $"; +static const char RCSid[] = "$Id: tmapcolrs.c,v 3.23 2005/11/15 06:53:00 greg Exp $"; #endif /* * Routines for tone mapping on Radiance RGBE and XYZE pictures. @@ -432,8 +432,7 @@ register TMstruct *tms; cd = (COLRDATA *)tms->pd[colrReg]; for (i = 3; i--; ) cd->clfb[i] = 0x100*tms->clf[i] + .5; - d = TM_BRTSCALE*log(tms->inpsf); - cd->inpsfb = d<0. ? d-.5 : d+.5; + cd->inpsfb = tmCvLuminance(tms->inpsf); for (i = 3; i--; ) for (j = 3; j--; ) { d = tms->cmat[i][j] / tms->inpsf;