162 |
|
int len; |
163 |
|
{ |
164 |
|
static char funcName[] = "tmCvColors"; |
165 |
< |
static COLOR csmall = {1e-6, 1e-6, 1e-6}; |
165 |
> |
static COLOR csmall = {.5*MINLUM, .5*MINLUM, .5*MINLUM}; |
166 |
|
COLOR cmon; |
167 |
|
double lum, slum; |
168 |
|
register double d; |
170 |
|
|
171 |
|
if (tmTop == NULL) |
172 |
|
returnErr(TM_E_TMINVAL); |
173 |
< |
if (ls == NULL | scan == NULL | len < 0) |
173 |
> |
if ((ls == NULL) | (scan == NULL) | (len < 0)) |
174 |
|
returnErr(TM_E_ILLEGAL); |
175 |
|
for (i = len; i--; ) { |
176 |
|
if (tmNeedMatrix(tmTop)) /* get monitor RGB */ |
243 |
|
|
244 |
|
if (tmTop == NULL) |
245 |
|
returnErr(TM_E_TMINVAL); |
246 |
< |
if (ls == NULL | scan == NULL | len < 0) |
246 |
> |
if ((ls == NULL) | (scan == NULL) | (len < 0)) |
247 |
|
returnErr(TM_E_ILLEGAL); |
248 |
|
for (i = len; i--; ) |
249 |
|
if (scan[i] <= TM_NOLUM) { |
390 |
|
float *cumf; |
391 |
|
int brt0, histlen, threshold, ceiling, trimmings; |
392 |
|
double logLddyn, Ldmin, Ldavg, Lwavg, Tr, Lw, Ld; |
393 |
< |
int4 histot; |
393 |
> |
int32 histot; |
394 |
|
double sum; |
395 |
|
register double d; |
396 |
|
register int i, j; |
428 |
|
/* clamp histogram */ |
429 |
|
histo = (int *)malloc(histlen*sizeof(int)); |
430 |
|
cumf = (float *)malloc((histlen+2)*sizeof(float)); |
431 |
< |
if (histo == NULL | cumf == NULL) |
431 |
> |
if ((histo == NULL) | (cumf == NULL)) |
432 |
|
returnErr(TM_E_NOMEM); |
433 |
|
cumf[histlen+1] = 1.; /* guard for assignment code */ |
434 |
|
for (i = histlen; i--; ) /* make malleable copy */ |
492 |
|
int len; |
493 |
|
{ |
494 |
|
static char funcName[] = "tmMapPixels"; |
495 |
< |
register int4 li, pv; |
495 |
> |
register int32 li, pv; |
496 |
|
|
497 |
|
if (tmTop == NULL || tmTop->lumap == NULL) |
498 |
|
returnErr(TM_E_TMINVAL); |
499 |
< |
if (ps == NULL | ls == NULL | len < 0) |
499 |
> |
if ((ps == NULL) | (ls == NULL) | (len < 0)) |
500 |
|
returnErr(TM_E_ILLEGAL); |
501 |
|
while (len--) { |
502 |
|
if ((li = *ls++) < tmTop->mbrmin) { |
538 |
|
{ |
539 |
|
register struct tmStruct *tms2; |
540 |
|
/* special cases first */ |
541 |
< |
if (tms == NULL | tmTop == NULL) |
541 |
> |
if ((tms == NULL) | (tmTop == NULL)) |
542 |
|
return(0); |
543 |
|
if (tms == tmTop) { |
544 |
|
tmTop = tms->tmprev; |