| 9 |
|
#include "rhd_sample.h" |
| 10 |
|
|
| 11 |
|
SAMP rsL; |
| 12 |
< |
int4 *samp_flag=NULL; |
| 12 |
> |
int32 *samp_flag=NULL; |
| 13 |
|
|
| 14 |
|
/* Each sample has a world coord point, and direction, brightness,chrominance, |
| 15 |
|
and RGB triples |
| 16 |
|
*/ |
| 17 |
|
|
| 18 |
|
#define TMSIZE sizeof(TMbright) |
| 19 |
< |
#define SAMPSIZ (3*sizeof(SFLOAT)+sizeof(int4)+ 6*sizeof(BYTE) + TMSIZE + 2*sizeof(int)) |
| 19 |
> |
#define SAMPSIZ (3*sizeof(SFLOAT)+sizeof(int32)+ 6*sizeof(BYTE) + TMSIZE + 2*sizeof(int)) |
| 20 |
|
|
| 21 |
|
/* Extra points world space point, vert flag and qt flag */ |
| 22 |
|
#define POINTSIZ (3*sizeof(SFLOAT) + 2*sizeof(int)) |
| 82 |
|
|
| 83 |
|
/* assign larger alignment types earlier */ |
| 84 |
|
S_W_PT(s) = (SFLOAT(*)[3])S_BASE(s); |
| 85 |
< |
S_W_DIR(s) = (int4 *)(S_W_PT(s) + n + extra_points); |
| 85 |
> |
S_W_DIR(s) = (int32 *)(S_W_PT(s) + n + extra_points); |
| 86 |
|
S_BRT(s) = (TMbright *)(S_W_DIR(s) + n); |
| 87 |
|
S_CHR(s) = (BYTE (*)[3])(S_BRT(s) + n); |
| 88 |
|
S_RGB(s) = (BYTE (*)[3])(S_CHR(s) + n); |
| 92 |
|
S_MAX_BASE_PT(s) = n + extra_points; |
| 93 |
|
|
| 94 |
|
/* Allocate memory for a per/sample bit flag */ |
| 95 |
< |
if(!(samp_flag = (int4 *)malloc(FLAG_BYTES(n+extra_points)))) |
| 95 |
> |
if(!(samp_flag = (int32 *)malloc(FLAG_BYTES(n+extra_points)))) |
| 96 |
|
error(SYSTEM,"sAlloc(): Unable to allocate flag memory"); |
| 97 |
|
sInit(s); |
| 98 |
|
sClear_all_flags(s); |