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

Comparing ray/src/common/tmapluv.c (file contents):
Revision 3.5 by greg, Tue Feb 25 02:47:22 2003 UTC vs.
Revision 3.8 by greg, Tue Jul 15 07:28:09 2003 UTC

# Line 18 | Line 18 | static const char      RCSid[] = "$Id$";
18   #include "tmprivat.h"
19   #include "tmaptiff.h"
20  
21 #ifndef BSD
22 #define bzero(d,n)              (void)memset(d,0,n)
23 #endif
21   #define uvflgop(p,uv,op)        ((p)->rgbflg[(uv)>>5] op (1L<<((uv)&0x1f)))
22   #define isuvset(p,uv)           uvflgop(p,uv,&)
23   #define setuv(p,uv)             uvflgop(p,uv,|=)
24   #define clruv(p,uv)             uvflgop(p,uv,&=~)
25 < #define clruvall(p)             bzero((MEM_PTR)(p)->rgbflg,sizeof((p)->rgbflg))
25 > #define clruvall(p)             memset((MEM_PTR)(p)->rgbflg,'\0',sizeof((p)->rgbflg))
26  
27   #ifdef NOPROTO
28   static MEM_PTR  luv32Init();
# Line 218 | Line 215 | int    len;
215                          continue;
216                                                  /* get chrominance */
217                  if (tmTop->flags & TM_F_MESOPIC && ls[i] < BMESUPPER) {
218 <                        if (uv_decode(uvp, uvp+1, luvs[i]&0x3fff) < 0) {
218 >                        if (uv_decode(&uvp[0], &uvp[1], luvs[i]&0x3fff) < 0) {
219                                  uvp[0] = U_NEU;         /* should barf? */
220                                  uvp[1] = V_NEU;
221                          }
# Line 228 | Line 225 | int    len;
225                                                  SGILOGENCODE_NODITHER)) < 0)
226                                  j = uv14neu;
227                  } else {
228 <                        j = tmTop->flags&TM_F_BW ? uv14neu : luvs[i]&0x3fff;
228 >                        j = tmTop->flags&TM_F_BW ? uv14neu :
229 >                                        (int)(luvs[i]&0x3fff);
230                  }
231                  if (!isuvset(ld, j)) {
232                          if (uv_decode(&uvp[0], &uvp[1], j) < 0) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines