I replaced the RGB gamma blocks but the points will not show in PSE because there is/was no editable Tone Curve in a pf2. Cinestyle is a pf2 and has a tone curve so it's just a PSE omission. The editable Tone curve was added later (presumably under a different tag?) as part of the pf3 format.

If you change the LAB gamma block remember it is in

**L*a*b* colorspace** so changing the first set only will produce a change in luminosity. Changing all three will cause color issues - this is why PSE used to be a complete pain because you couldn't alter each curve independently.

As for building the curves, I did originally try mathematically plotting a known log curve (in this case a Cineon curve plus 2 EV), by converting the expression to an 8bit lut (256 CV) and then took 10 of those values as 'y values' to plot against a 0-255 linear set ('x values'). I then entered the x and y values in PSE and applied the PS to the CR2 in DPP and saved a jpeg. Then I just compared it to the same raw image (a Stouffer transmission wedge) debayered to linear and converted to Cineon plus 2EV (the +2EV was purely to remind me that I was looking at a specific test image). This was all assuming that Neutral -4 contrast was somewhat linear.

Even accounting for some small offsets there were differences caused by the contrast curve (neutral -4 because it's not strictly linear) so I then did it the hard way by roughly setting the black and white levels before saving a jpeg then set up an A/B i.e. the 2 images with a layer mask to show in split screen. Had to desaturate the images because the As Shot WB rendered slightly differently between DCRaw and DPP.

You need to gain the images up and down as you work to ensure you're matching/fine-tuning the shadow values properly. As you plot the additional points you need to move the points accordingly to produce the smoothest curve (i.e. if one set doesn't work because the interpolation causes a kink then try the next set - it can be like herding cats) but even so, 10 points isn't enough - it's very tedious and laborious work

note: I made the curve in PSE before the decoder became available so I already had the curve points ready for conversion to hex.

I'm wondering if we can alter the file size to increase the RGB and/or LAB gamma blocks to 10bits or if it will only work in 8bits with 12 points. Also, I'm still trying to work out these 20x3 matrices which appear to be used for a third-order polynomial regression to XYZ space (a fairly common practice in calibration).

Cinestyle is definitely in RGB space (the sRGB matrix is all zeros), so assuming the Adobe matrix is correct it should be possible through derivation to configure a matrix to output RGB in another colorspace either by default by re-tasking the sRGB matrix or as an option by changing the Adobe1998 matrix and selecting Adobe1998 in the camera (it's a better idea to be able to select IMO).

I'm using Matlab but for hex2dec conversion you can use a spreadsheet or something like:

http://www.asciitohex.com/ and to edit the decoded file, this is good

http://www.sweetscape.com/010editor/There is a

*remote* possibility that pf2, pf3 files are close enough to ICC standards that we might be able to add float expressions instead of hard-coded luts i.e. y=x^2.2 etc etc and maybe substitute the 3x20 matrices for simpler 3x3 chromatically adapted RGB matrices - there is lots to play with and discover

To do any of this more accurately/more easily the contrast function needs to be modeled to enable linearization and I think it's probably a SINE function!?