[cairo] _cairo_color_compute_shorts fails with FPU set to single precision

James Cloos cloos at jhcloos.com
Wed Aug 30 11:38:11 PDT 2006


>>>>> "Owen" == Owen Taylor <otaylor at redhat.com> writes:

Cloos> shouldn’t cairo (and anything else using floats for intensities,
Cloos> for that matter) really target [0.0, 1.0)?  And document that.

Owen> So, how do you say "white"?

1.0 - ϵ is the definitive value, but:

If the source data is integer, than just i/(1+i_max), ie 255/256.0,
65535/65536.0, something like B**i/B**WP for CINEON-like log data 
with a whitepoint < i_max, etc.

Otherwise, using the hdr value 1.0 is close enough.

Cloos> Ie, x ≥ 1.0 are /defined/ as the HDR values, not just x > 1.0?

Owen> Do you really want to make 1.0 do something different than
Owen> the limiting value of values slightly less than 1.0?

Owen> Or do you want to make 1.0 an illegal input value?

HDR values should never be illegal input; they should just be clipped
via a saturating float->int conversion when displayed or written to
non-hdr file formats.

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 0xED7DAEA6


More information about the cairo mailing list