Gamma Curve
For the gamma curve, this function is used:
Light = ((Signal + Offset) / (1 + Offset)) ^ Gamma
where Offset = ((1 / OnOffCR) ^ (1 / Gamma)) / (1 - ((1 / OnOffCR) ^ (1 / Gamma))).
Basically, Offset accounts for the black-level error. In particular, if Signal is 0, then Light becomes (1/OnOffCR), which is the black level.
Signal is within the range of 0 to 1, so Light is within the range of (1/OnOffCR) to 1.
For example, if Gamma is 2.22, and OnOffCR is 210, then Offset becomes 0.099, resulting in this function:
Light = ((Signal + 0.099) / 1.099) ^ 2.22
which happens to be nearly identical to the inverse of the non-linear portion of the Rec. 709 transfer function.
This web page was created by Erik Garci.