Expand description
Pure-Rust Levenberg-Marquardt spectral inversion solver, 32x32x32 LUT baker, and zero-heap trilinear sampler. Deterministic Zero-Heap Spectral Inversion LUT & Levenberg-Marquardt Solver in Pure Rust.
Enums§
Constants§
- LUT_
BYTES_ PER_ VOXEL - LUT_RES
- LUT_
TOTAL_ BYTE_ SIZE - LUT_
TOTAL_ VOXELS - M_
XYZ_ TO_ SRGB - Standard sRGB to XYZ (D65) transformation matrix.
Functions§
- bake_
spectral_ inversion_ lut - Bake a full 32x32x32 spectral inversion LUT into a caller-supplied buffer in IEEE 754 f16 format.
- bake_
srgb_ spectral_ lut - Alias for
bake_spectral_inversion_lut. - f16_
to_ f32 - Convert a 16-bit half-precision float (IEEE 754 binary16) to f32.
- f32_
to_ f16 - Convert an f32 to a 16-bit half-precision float (IEEE 754 binary16). Pure-Rust implementation with no external dependency.
- invert_
srgb_ to_ coeffs - Solve for the Jakob-Hanika coefficients matching a target linear sRGB color.
- project_
coeffs_ to_ srgb - Forward projection: evaluates sRGB from polynomial coefficients $(c_0, c_1, c_2)$.
- sample_
spectral_ lut_ trilinear - Sample coefficients from pre-baked LUT slice using trilinear interpolation. Zero heap.