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

Comparing ray/src/util/ranimove1.c (file contents):
Revision 3.16 by greg, Fri Nov 5 04:36:24 2010 UTC vs.
Revision 3.17 by greg, Fri May 20 02:06:39 2011 UTC

# Line 30 | Line 30 | float          *zbuffer;       /* depth at each pixel */
30   OBJECT          *obuffer;       /* object id at each pixel */
31   short           *xmbuffer;      /* x motion at each pixel */
32   short           *ymbuffer;      /* y motion at each pixel */
33 < BYTE            *abuffer;       /* accuracy at each pixel */
34 < BYTE            *sbuffer;       /* sample count per pixel */
33 > uby8            *abuffer;       /* accuracy at each pixel */
34 > uby8            *sbuffer;       /* sample count per pixel */
35  
36   VIEW            vwprev;         /* last frame's view */
37   COLOR           *cprev;         /* last frame colors */
38   float           *zprev;         /* last frame depth */
39   OBJECT          *oprev;         /* last frame objects */
40 < BYTE            *aprev;         /* last frame accuracy */
40 > uby8            *aprev;         /* last frame accuracy */
41  
42   float           *cerrmap;       /* conspicuous error map */
43   COLOR           *val2map;       /* value-squared map for variance */
# Line 131 | Line 131 | next_frame(void)                       /* prepare next frame buffer */
131                  obuffer = (OBJECT *)malloc(sizeof(OBJECT)*hres*vres);
132                  xmbuffer = (short *)malloc(sizeof(short)*hres*vres);
133                  ymbuffer = (short *)malloc(sizeof(short)*hres*vres);
134 <                abuffer = (BYTE *)calloc(hres*vres, sizeof(BYTE));
135 <                sbuffer = (BYTE *)calloc(hres*vres, sizeof(BYTE));
134 >                abuffer = (uby8 *)calloc(hres*vres, sizeof(uby8));
135 >                sbuffer = (uby8 *)calloc(hres*vres, sizeof(uby8));
136                  cprev = (COLOR *)malloc(sizeof(COLOR)*hres*vres);
137                  zprev = (float *)malloc(sizeof(float)*hres*vres);
138                  oprev = (OBJECT *)malloc(sizeof(OBJECT)*hres*vres);
139 <                aprev = (BYTE *)malloc(sizeof(BYTE)*hres*vres);
139 >                aprev = (uby8 *)malloc(sizeof(uby8)*hres*vres);
140                  if ((cbuffer==NULL) | (zbuffer==NULL) | (obuffer==NULL) |
141                                  (xmbuffer==NULL) | (ymbuffer==NULL) |
142                                  (abuffer==NULL) | (sbuffer==NULL) |
# Line 152 | Line 152 | next_frame(void)                       /* prepare next frame buffer */
152                  COLOR   *cp;            /* else just swap buffers */
153                  float   *fp;
154                  OBJECT  *op;
155 <                BYTE    *bp;
155 >                uby8    *bp;
156                  cp = cprev; cprev = cbuffer; cbuffer = cp;
157                  fp = zprev; zprev = zbuffer; zbuffer = fp;
158                  op = oprev; oprev = obuffer; obuffer = op;
159                  bp = aprev; aprev = abuffer; abuffer = bp;
160 <                memset(abuffer, '\0', sizeof(BYTE)*hres*vres);
161 <                memset(sbuffer, '\0', sizeof(BYTE)*hres*vres);
160 >                memset(abuffer, '\0', sizeof(uby8)*hres*vres);
161 >                memset(sbuffer, '\0', sizeof(uby8)*hres*vres);
162                  frm_stop += rtperfrm;
163          }
164          cerrmap = NULL;
# Line 584 | Line 584 | comperr(               /* estimate relative error in neighborhood *
584   extern void
585   comp_frame_error(void)          /* initialize frame error values */
586   {
587 <        BYTE    *edone = NULL;
587 >        uby8    *edone = NULL;
588          COLOR   objamb;
589          double  eest;
590          int     neigh[NSAMPOK];
# Line 608 | Line 608 | comp_frame_error(void)         /* initialize frame error valu
608                   * error should be less than the ambient value divided
609                   * by the returned ray value -- we take half of this.
610                   */
611 <                edone = (BYTE *)calloc(hres*vres, sizeof(BYTE));
611 >                edone = (uby8 *)calloc(hres*vres, sizeof(uby8));
612                  for (y = vres; y--; )
613                      for (x = hres; x--; ) {
614                          n = fndx(x, y);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines