imageworks/OpenColorIO — pull request #329 by Shootfast (2013-09-18 15:31:07+00:00)
Title: ExpressionTransform 

I've created an ExpressionTransform node that will allow users to describe transformations in terms of a mathematical expression string. I was unable to find a library that both supported expression parsing and shader generation, so I have written and included my own. There is currently minimal error checking in the expression library, but this is something I hope to fix in the near future.

I have tested the expression transformation with the Alexa Log C conversion algorithm in a colorspace described like this:

- !
name: Alexa
family: log
bitdepth: 32f
description: |
Alexa Log C
allocation: uniform
allocationvars: [-0.125, 1.125]
to_reference: ! {value: "v > 0.1496582 ? (pow(10.0, (v - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (v -0.092809) / 5.367655 "}