Where to input a log expression in FFMPEG Im trying to use a expression from NUKE (to convert an exr sequence from its native format into AlexaLogC. Now ive got an expression from nuke which is the following

x &gt; 0.14996582 ? (pow(10,0, (x - 0.385537) / 0.2471896) - 0.0522720) / 5.5555556 : (x - 0.092809) / 5.367655 


been trying to find a spot to place this inside a FFMPEG filter to allow it to bring my footage to the right starting point so i can apply the lut from on set on it.

Was wondering if anybody here had advice on how to correctly filter this into ffmpeg.
This is the original expression to be implemented.

x &gt; 0.14996582 ? (pow(10,0, (x - 0.385537) / 0.2471896) - 0.0522720) / 5.5555556 : (x - 0.092809) / 5.367655


where x is the pixel intensity normalized to [0,1]. x is linear, so gamma returns identity. 

I'm going to assume the 0 in the pow expression is an extraneous arg since the linked reference at http://strattoncamera.com/pdf/11-06-30_Alexa_LogC_Curve.pdf depicts pow() as having only two arguments. I'm also assuming that the input is 16-bit full-range integer RGB.

ffmpeg -apply_trc linear -i in%d.exr
       -vf "lutrgb=r='if(gt(val/maxval,0.14996582),maxval*((pow(10, (val/maxval-0.385537)/0.2471896)-0.0522720)/5.5555556),maxval*((val/maxval-0.092809)/5.367655))':
                   g='if(gt(val/maxval,0.14996582),maxval*((pow(10, (val/maxval-0.385537)/0.2471896)-0.0522720)/5.5555556),maxval*((val/maxval-0.092809)/5.367655))':
                   b='if(gt(val/maxval,0.14996582),maxval*((pow(10, (val/maxval-0.385537)/0.2471896)-0.0522720)/5.5555556),maxval*((val/maxval-0.092809)/5.367655))'"
        out%d.tiff