Reverse Engineering S-Cinetone

The S-Cinetone Whitepaper

Sony published the S-Cinetone whitepaper. Page 4 of the whitepaper graphs of the transfer function, repeated here for clarity:

Looking at the blue line on the graph (which is the Rec 709 transfer function, and therefore we know what it is) it is clear that the y-axis is encoded value, and the x-axis is linear light. (And I guess we'll never know why it isn't labelled as such).

In principle, all that needs to be done is to fit a mathematical formula to the orange line in the graphs and we're done.

Tracing and Scaling the Graph

The next step is sit done with a ruler and generate a set of coordinates of S-Cinetone transfer function (the orange line) from the white paper graphs.

I've also scaled both axis so that the the graph goes through (0,0) and (1,1). This is simple to do, firstly setting the black and white level so the y-axis makes sense, and the choose the x-axis scaling that puts the graph through (1,1). The exact scaling used is:

It is probably best to think of the y-axis magic numbers as resulting from the following black and white levels:

Other Transfer Functions

When reverse engineering you often have to make educated guesses, so it always helps to have an idea as what might have influenced the design. In this case, it helps to have a look at the various other transfer functions in use to see what they do.

From that quick overview it is clear that gamma curves and log curves seem to be common choices when someone designs a transfer function.

Is S-Cinetone anything like a Log or a Gamma Curve?

Log Curve

The 'standard' formula for a log curve is something like:

But this can be simplified. If you choose a different value for c1 and the base, you can get the exact same curve by choosing different values for alpha and c2. And, even better, when checking if the transfer function is anything like a log curve the values for c2 and c3 don't matter at all.

So, to see if any (or all) of the S-Cinetone transfer function is a log curve, I just plot a graph with the y-axis = encoded, and the x-axis = log10(linear light + alpha):

For this graph I tweaked the value of alpha to get the graph with the straightest line. For this graph I used alpha = -0.14.

If S-Cinetone were a pure log function, then this graph would show a perfect straight blue line. Looking at the graph we can see that S-Cinetone isn't a pure log curve, but it does look like the upper part of the curve is a log curve. Which is the same idea as Rec 2100 HLG (where the lower part is a gamma curve) and S-Log3 (where the lower part of the curve is tiny and linear).

Gamma Curve

The 'standard' formula for a gamma curve is something like:

As before the values of c1 and c2 don't matter when checking if the transfer function is anything like a gamma curve.

So, to see if any (or all) of the S-Cinetone transfer function is a gamma curve, I just plot a graph with the y-axis = encoded, and the x-axis = linear light(1/gamma):

For this graph I tweaked the value of gamma to get the graph with the straightest line. For this graph I used gamma = 2.6, i.e the same gamma as DCI-P3.

If S-Cinetone were a pure gamma function, then this graph would show a perfect straight blue line (assuming the correct gamma value was used when plotting it). Looking at the graph we can see that S-Cinetone isn't a pure gamma curve, but it does look like the lower part of the curve is a gamma curve. Which is the same idea as Rec 2100 HLG.

Designing and Fitting a Formula

Using the intuition gathered above, we can assume that the S-Cinetone transfer function looks something like this:

At this stage, I ran a optimiser to choose the values for the unforced coefficients (c1, c2, c4, c5, c7, cut1, and cut2) to best fit the graph from the white paper.

(I also tried a formula without the linear part, that fit really well except for the very low levels of light. So I added the linear part and re-ran the optimisation).

S-Cinetone Transfer Function

The reverse engineered S-Cinetone transfer function definition is:

Graphing this function (red) against the published S-Cinetone graphs looks like this:

If we undo the scaling in the "Tracing and Scaling the Graph" section, then we can plot this function on the original graphs from the whitepaper:

As mentioned in the "Tracing and Scaling the Graph" section, it is probably best to think of the y-axis magic numbers as resulting from black and white levels: