376 |
|
else |
377 |
|
VCOPY(qtL.wp[li], p); |
378 |
|
qtL.wd[li] = encodedir(d); |
379 |
< |
tmCvColrs(&qtL.brt[li], qtL.chr[li], (COLR *)c, 1); |
379 |
> |
tmCvColrs(tmGlobal, &qtL.brt[li], qtL.chr[li], (COLR *)c, 1); |
380 |
|
if (putleaf(li, 1)) { |
381 |
|
if (mapit) |
382 |
< |
tmMapPixels((BYTE *)(qtL.rgb+li), qtL.brt+li, |
382 |
> |
tmMapPixels(tmGlobal, (BYTE *)(qtL.rgb+li), qtL.brt+li, |
383 |
|
(BYTE *)(qtL.chr+li), 1); |
384 |
|
if (--rayqleft == 0) |
385 |
|
dev_flush(); /* flush output */ |
427 |
|
} |
428 |
|
/* (re)compute tone mapping? */ |
429 |
|
if (qtL.tml == qtL.bl) { |
430 |
< |
tmClearHisto(); |
431 |
< |
tmAddHisto(qtL.brt+aorg, alen, 1); |
430 |
> |
tmClearHisto(tmGlobal); |
431 |
> |
tmAddHisto(tmGlobal, qtL.brt+aorg, alen, 1); |
432 |
|
if (blen > 0) |
433 |
< |
tmAddHisto(qtL.brt+borg, blen, 1); |
434 |
< |
if (tmComputeMapping(0., 0., 0.) != TM_E_OK) |
433 |
> |
tmAddHisto(tmGlobal, qtL.brt+borg, blen, 1); |
434 |
> |
if (tmComputeMapping(tmGlobal, 0., 0., 0.) != TM_E_OK) |
435 |
|
return(0); |
436 |
|
} |
437 |
< |
if (tmMapPixels((BYTE *)(qtL.rgb+aorg), qtL.brt+aorg, |
437 |
> |
if (tmMapPixels(tmGlobal, (BYTE *)(qtL.rgb+aorg), qtL.brt+aorg, |
438 |
|
(BYTE *)(qtL.chr+aorg), alen) != TM_E_OK) |
439 |
|
return(0); |
440 |
|
if (blen > 0) |
441 |
< |
tmMapPixels((BYTE *)(qtL.rgb+borg), qtL.brt+borg, |
441 |
> |
tmMapPixels(tmGlobal, (BYTE *)(qtL.rgb+borg), qtL.brt+borg, |
442 |
|
(BYTE *)(qtL.chr+borg), blen); |
443 |
|
qtL.tml = qtL.tl; |
444 |
|
return(1); |