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

Comparing ray/src/common/falsecolor.c (file contents):
Revision 3.9 by greg, Thu Jul 3 03:35:10 2008 UTC vs.
Revision 3.10 by greg, Fri May 20 02:06:38 2011 UTC

# Line 18 | Line 18 | static const char RCSid[] = "$Id$";
18  
19   /* Initialize new false color mapping */
20   FCstruct *
21 < fcInit(BYTE fcscale[256][3])
21 > fcInit(uby8 fcscale[256][3])
22   {
23          FCstruct        *fcs = (FCstruct *)malloc(sizeof(FCstruct));
24          
# Line 44 | Line 44 | fcFixedLinear(FCstruct *fcs, double Lwmax)
44                  free((void *)fcs->lumap);
45          fcs->mbrmin = tmCvLuminance(Lwmax/256.);
46          fcs->mbrmax = tmCvLuminance(Lwmax);
47 <        fcs->lumap = (BYTE *)malloc(sizeof(BYTE)*(fcs->mbrmax - fcs->mbrmin + 1));
47 >        fcs->lumap = (uby8 *)malloc(sizeof(uby8)*(fcs->mbrmax - fcs->mbrmin + 1));
48          if (fcs->lumap == NULL)
49                  return(TM_E_NOMEM);
50          mult = 255.999/tmLuminance(fcs->mbrmax);
# Line 69 | Line 69 | fcFixedLog(FCstruct *fcs, double Lwmin, double Lwmax)
69                  fcs->lumap = NULL;
70                  return(TM_E_ILLEGAL);
71          }
72 <        fcs->lumap = (BYTE *)malloc(sizeof(BYTE)*(fcs->mbrmax - fcs->mbrmin + 1));
72 >        fcs->lumap = (uby8 *)malloc(sizeof(uby8)*(fcs->mbrmax - fcs->mbrmin + 1));
73          if (fcs->lumap == NULL)
74                  return(TM_E_NOMEM);
75          for (i = fcs->mbrmax - fcs->mbrmin; i >= 0; i--)
# Line 139 | Line 139 | fcLogMapping(FCstruct *fcs, TMstruct *tms, double pcti
139  
140   /* Apply false color mapping to pixel values */
141   int
142 < fcMapPixels(FCstruct *fcs, BYTE *ps, TMbright *ls, int len)
142 > fcMapPixels(FCstruct *fcs, uby8 *ps, TMbright *ls, int len)
143   {
144          int     li;
145  
# Line 189 | Line 189 | fcDup(FCstruct *fcs)
189          if (fcnew == NULL)
190                  return(NULL);
191          if (fcs->lumap != NULL) {
192 <                fcnew->lumap = (BYTE *)malloc(sizeof(BYTE)*(fcs->mbrmax -
192 >                fcnew->lumap = (uby8 *)malloc(sizeof(uby8)*(fcs->mbrmax -
193                                                          fcs->mbrmin + 1));
194                  if (fcnew->lumap == NULL)
195                          return(fcnew);
196                  fcnew->mbrmin = fcs->mbrmin; fcnew->mbrmax = fcs->mbrmax;
197                  memcpy((void *)fcnew->lumap, (void *)fcs->lumap,
198 <                                sizeof(BYTE)*(fcs->mbrmax - fcs->mbrmin + 1));
198 >                                sizeof(uby8)*(fcs->mbrmax - fcs->mbrmin + 1));
199          }
200          return(fcnew);
201   }
# Line 211 | Line 211 | fcDone(FCstruct *fcs)
211          free((void *)fcs);
212   }
213  
214 < BYTE    fcDefaultScale[256][3] = {      /* default false color scale */
214 > uby8    fcDefaultScale[256][3] = {      /* default false color scale */
215          111,8,132,
216          108,7,133,
217          105,7,134,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines