Developing a FOSS solution for inverting negatives

If anyone is still watching this, I am still moving this along :slight_smile:

I could use some maths assistance, I been researching various techniques, the filmic one posted here etc.

What I think I need is function, where values greater than say .8 are progressively scaled such that 1.2 becomes 1, any tips?