The S-Log formula


Jeremy Selan <jeremy...@...>
 

Ah, when you read Sony Camera documents you often have to put on your
"video engineer" goggles. :)

Which camera are you using? We've done a few Sony camera
characterizations, and may have real data for the camera you're
interested in. F35, perhaps? In my experience, if you have the
luxury of actually running exposure sweeps on a camera you tend to get
much more plausible linearizations than by obeying manufacturer
claims. Sometimes it's a communication issue, but more often the
documentation fails to discriminate between the transform to get to a
scene referred linear (input space) vs an output referred linear
(display space).

Are you referring to this document for the formulas? (SRW_ITG_S-
Log_001_IO_EN.pdf) (google search: sony slog)

Assuming we trust the document for the moment, I think the rule of
thumb is understanding that whenever these guys talk about numbers
that include percentages (such as 0%, or 109%), these are video folks
talking in IRE land. (Ugh!) In the world of broadcast HD television
(rec709 with headroom), a "broadcast safe" black level is at 64/1023,
and safe white is 940/1023. Thus for folks in a broadcast-land
mindset, if you use the full 10-bit code range you're 'over white' by
(1023 / 940) = 1.09.

So when the document says "t has a range of 0 to 1.09", I take this to
mean that you're expected to have input 10-bit codevalues from 64 -
1023.
code 64 = t 0.0
code 1023 = t 1.09

In the later example "S-Log Formula" this is already taken into
account for you.
Y = 379.044 * log10(((x-128)/1752 + 0.037584) + 630
(This assumes 10-bit input, which in practice will only contain values
from 3-1019 due to HD link peculiarities, which you can safely ignore
in this case).

-- Jeremy

On Aug 12, 9:07 am, Alan Jones <sky...@gmail.com> wrote:
Hi All,

I'm currently writing a LUT to go from S-Log to Rec709. I've got the
transfer functions for both and generally the curves I've plotted look
like what I expect, but one part of the formula is bothering me. The
t in the S-Log whitepaper from Sony (camera Sony - not
imageworks) says t ranges from 0 to 109%.

So I've been trying to ascertain whether this means in 10bit (for
example) that 1023 should be 1.09 or whether it should be 1.

A section of the whitepaper shows examples of converting between
10bit S-Log and 14bit linear. It just has some magic numbers in
there and I've been trying to nail down exactly how they're calculated
in order to answer the 1 vs 1.09 question. Though while I can step
kinda close to it I've not just hit exact. So I'm hoping someone here
can shed some light on this.

Cheers,

Alan.