| 9 |
|
|
| 10 |
|
#define _USE_MATH_DEFINES |
| 11 |
|
#include <stdlib.h> |
| 12 |
– |
#include <string.h> |
| 12 |
|
#include <math.h> |
| 13 |
|
#include "rtio.h" |
| 14 |
|
#include "resolu.h" |
| 309 |
|
} |
| 310 |
|
res += val; |
| 311 |
|
} |
| 312 |
< |
if ((rbf_colorimetry == RBCtristimulus) & (res > 1e-6)) { |
| 312 |
> |
sv->cieY = res / COSF(outvec[2]); |
| 313 |
> |
if (sv->cieY < bsdf_min) { /* never return less than bsdf_min */ |
| 314 |
> |
sv->cieY = bsdf_min; |
| 315 |
> |
} else if (rbf_colorimetry == RBCtristimulus) { |
| 316 |
|
C_CHROMA cres = (int)(usum/res + frandom()); |
| 317 |
|
cres |= (int)(vsum/res + frandom()) << 8; |
| 318 |
|
c_decodeChroma(&sv->spec, cres); |
| 319 |
|
} |
| 318 |
– |
sv->cieY = res / COSF(outvec[2]); |
| 319 |
– |
if (sv->cieY < bsdf_min) /* never return less than bsdf_min */ |
| 320 |
– |
sv->cieY = bsdf_min; |
| 320 |
|
return(SDEnone); |
| 321 |
|
} |
| 322 |
|
|
| 581 |
|
input_orient = output_orient = 0; |
| 582 |
|
rbf_colorimetry = RBCunknown; |
| 583 |
|
grid_res = GRIDRES; |
| 584 |
+ |
memset(bsdf_hist, 0, sizeof(bsdf_hist)); |
| 585 |
|
bsdf_min = 0; |
| 586 |
|
bsdf_spec_val = 0; |
| 587 |
|
bsdf_spec_rad = 0; |
| 658 |
|
static int |
| 659 |
|
headline(char *s, void *p) |
| 660 |
|
{ |
| 661 |
< |
char fmt[64]; |
| 661 |
> |
char fmt[MAXFMTLEN]; |
| 662 |
|
int i; |
| 663 |
|
|
| 664 |
|
if (!strncmp(s, "NAME=", 5)) { |