Skip to content

Add python scripts for studying 1D LUT approximations

Pekka Paalanen requested to merge mr/pyprecision into main

A one-dimensional look-up table is a very generic way of approximating any kind of transfer function. A standard LUT implementation has a uniform tap distribution. This has surprising consequences for inverse EOTF type of curves.

The inverse of a pure power-law function is especially difficult to approximate with a uniformly distributed 1D LUT. The graphing scripts introduced here show how bad and why. I think the scripts could be useful for others as well.

This MR is a re-write of !9 (closed) in Python instead of Octave, because I think Python may be more approachable to people. Instead of coding our own transfer functions, it uses Colour package for Python. This is really far overkill for these scripts alone, and simply import colour takes a lot of CPU time, but I want to push us towards using well-known implementations of color science related functions. This MR also adds a bit of markdown and example pictures to make the scripts more discoverable.

Merge request reports