Commit Graph

19 Commits

Author SHA1 Message Date
66e9abe66e Make signed48 trifloat encoding also a byte array.
Same reason as for the unsigned40 encoding in an earlier commit.
2020-09-19 12:22:51 +09:00
49c97bf0fe Cleaned up the signed48 trifloat code. 2020-09-19 08:55:35 +09:00
fd98b33333 Make unsigned40 trifloat encoding a byte array.
The whole point of these formats is to compress down to less
space, so let's not leave actually putting it in the space-saving
form on the client code.
2020-09-19 08:28:59 +09:00
9fb3c95171 Added an unsigned 40-bit trifloat format.
It is identical to the 32-bit format, except with more precision
and range due to using more bits.  This format should comfortably
store any color information with precision easily exceeding the
limits of human vision.
2020-09-18 22:12:12 +09:00
96b8dd84b9 Cleaned up the u32 trifloat implementation.
This also makes encoding faster.  However, it no longer does
rounding to the nearest precision when encoding, and insead does
flooring.  This seems like a reasonable tradeoff: if you want more
precision... you should use a format with more precision.
2020-09-18 21:04:16 +09:00
f13ffac7bd Removed the experimental luma-chroma color format.
It was a worthwhile experiment, but for it to really work it needs
a really proper luma-chroma separation, which is both slower than
I really want, and requires knowing the colorspace being used.

I might make another go at this based on the TIFF LogLUV color
format, requiring XYZ as input.
2020-09-18 17:57:13 +09:00
c1f516c2b6 Use a better chroma formula for the RGB32 format.
This makes much better use of the bit space.
2020-09-13 11:22:48 +09:00
bd6cf359b4 Some code clean-up in the RGB32 encoding/decoding code. 2020-09-13 06:44:42 +09:00
d6ab9d06be More work on the packed HDR RGB 32-bit format.
Switched to a different chroma encoding, which is notably faster
and never produces negative values when decoded.
2020-09-11 21:57:43 +09:00
339568ec0c Remove stale comments. 2020-09-10 22:42:20 +09:00
7066c38189 Implement an experimental packed HDR RGB 32-bit storage format. 2020-09-10 22:36:20 +09:00
c753890bb0 Fix/silence various clippy warnings. 2019-08-01 14:18:26 +09:00
103775f0e9 Some cleanup and improvements to the trifloat sub-crate. 2019-07-07 16:27:44 +09:00
e31ec6eb4e Added a new trifloat type that uses 48 bits and is signed. 2019-07-07 14:02:09 +09:00
c0cb071251 Further optimizations to the trifloat implementation.
Also improved documentation.
2018-11-28 15:31:21 -08:00
27521f44a6 Cleanup and better docs for trifloat. 2018-11-23 23:12:06 -08:00
ff9a56977a Use bit fiddling to avoid some expensive operations in trifloat encoding/decoding. 2018-11-23 22:31:28 -08:00
3d1ade21c2 Better naming for the trifloat functions. 2018-11-23 21:38:27 -08:00
3fb22fdefa Implemented a "tri-float" encoding, similar to RGBE.
This implementation trades less range for more precision, giving
9 bits to each mantissa instead of just 8 bits as in RGBE.
2018-11-23 20:01:15 -08:00