# | Line 409 | Line 409 | c_encodeChroma(C_COLOR *clr) | |
---|---|---|
409 | c_ccvt(clr, C_CSXY); | |
410 | df = UV_NORMF/(-2.*clr->cx + 12.*clr->cy + 3.); | |
411 | ub = 4.*clr->cx*df + frand(); | |
412 | – | ub *= (ub > 0); |
412 | if (ub > 0xff) ub = 0xff; | |
413 | + | else ub *= (ub > 0); |
414 | vb = 9.*clr->cy*df + frand(); | |
415 | – | vb *= (vb > 0); |
415 | if (vb > 0xff) vb = 0xff; | |
416 | + | else vb *= (vb > 0); |
417 | ||
418 | return(vb<<8 | ub); | |
419 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |