# | Line 185 | Line 185 | tmCvRGB48(TMstruct *tms, TMbright *ls, BYTE *cs, | |
---|---|---|
185 | if (gv <= 0.) | |
186 | gv = DEFGAM; | |
187 | /* sync input gamma table */ | |
188 | < | if ((gv != 1.) & (gv != cur_gam)) |
188 | > | if (gv != cur_gam) |
189 | mkGamTable(gv); | |
190 | if (tmNeedMatrix(tms)) { /* need floating point */ | |
191 | COLOR *newscan; | |
# | Line 235 | Line 235 | tmCvRGB48(TMstruct *tms, TMbright *ls, BYTE *cs, | |
235 | ((1L<<LOGTABBITS)-1) ]; | |
236 | d -= M_LN2*(gv*nshft + nshft2); | |
237 | d = (double)TM_BRTSCALE*(d + log_inpsf); | |
238 | < | bi = (int)(d>0. ? d+.5 : d-.5); |
238 | > | bi = (int)(d + .5 - (d < 0.)); |
239 | } | |
240 | /* world luminance */ | |
241 | ls[i] = bi; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |