Hi All,
sorry for the preamble which follows before my questions, but I think I should make sure I'm at least barking up the right tree! ;-)
I have been trying to get to grips with the all the OOTFs, EOTFs, OETFs and OETF^-1s involved in PQ and Hybrid-Log gamma.
For some time I have been playing around developing a web app called LUTCalc, and when Dolby first mooted PQ and the BBC started writing papers about log-based HDR displays I added in the various equations I could find. At that point I managed to misunderstand that the two systems took fundamentally different approaches to the display gamma. I used various LUTs I could find (including in Resolve) to check that my maths was working, but the curves were mostly just to help me as a cameraman start to get a handle on HDR.
Once Rec2100 was out and I had got around to reading it, I understood that the PQ curve definition is display light to PQ encoding, whereas Hybrid-log Gamma is scene linear directly to HLG encoding. I added in a PQ option including the PQ reference scene linear to display stage to the PQ encoding.
LUTCalc works in scene linear space for its adjustment tools.
Now that things have settled down I've had another, much more thorough revisit and have separated out the OOTFs from the PQ display to PQ equations.
As such, I have added the option to use PQ with the Rec2100 PQ reference OOTF and the Rec2100 HLG OOTF. The BBC's paper on converting between HLG and PQ uses the HLG reference OOTF.
I've added all this in and it SEEMs to make sense in its behaviour; if you want to take a look, I have just uploaded an online beta version to my 'testing' site: lutcalc.net/testing . I've been adapting the css to be 'responsive', so the UI may be a bit flakey at the moment, and as this is a colourist site I must warn that my range approach is 'quirky' (I'm working to make it more sensible without adding to the confusion) ;-), but the charts should be reasonably clear.
So, here come the questions:
First a quick one. Am I right that in PQ a value of 1.0 is always nominally 10,000 nits? That when you master to say 4000 nits it is the same PQ curve but the peak value is lower?
Next up, I had a look in the current Resolve LUTs to see if I'm on the right lines and in the 'HDR ST 2084' folder there are bunch of LUTs going between PQ and various conventional power-curve gammas. Trying to test out my sums as I have done before, I loaded several of them into LUTCalc. They seemed to fit with my original PQ implementation, where the PQ EOTF was being fed scene linear, i.e. 'Gamma 2.6 to HDR 4000 nits' takes in material which has had a gamma of 2.6 applied, degammas that back to linear, then feeds that into the PQ EOTF^-1 to end up with the PQ signal.
Is this right? Doesn't that mean that the OOTF in this case is effectively: OOTF[E] = E? I've added in an 'EOTF Only' but have I misunderstood something?
Lastly, moving to HLG, I had it drawn to my attention that the BBC has recommended setting reference levels to something different to the base standard. Basically, a 90% white card maps to 50% in the Rec2100 docs, but I was told that the BBC recommends setting 90% white card to 73%.
I found a reasonably technical BBC R&D paper online discussing this *, explaining that this gives decent compatibility with SDR material with a couple of stops headroom above the 90% white reference. A quick bit of fitting gave me a scaling factor to work with the nominal %HLG and cd/m2 values in the paper, and the logic makes sense, but considering the HLG encoding is scene linear to HLG, isn't this playing fast and loose with the standard or am I missing something?
As a cameraman, that throws up some concerns (not least that I now have no more headroom than a conventional camera with knee, just better expressed), but as an app developer how is this supposed to be factored into conversions to PQ. My current thinking is to include the scaling factor in both the OOTF and the HLG equation, so conversion to other spaces behaves correctly, but conversion to and from PQ cancels it out, avoiding clipping issues and assuming that 18% gray and 90% should fall where the standard expects in PQ. Is this the right thing to do?
Lastly, why does Rec2100 include both nits and cd/m2? Aren't they the same thing?
Sorry for the endless post and many thanks to anyone who plows through it and can shed some light for me,
Ben
* An Overview of the Hybrid Log-Gamma HDR System by Andrew Cotton & Tim Borer pages 44-45
sorry for the preamble which follows before my questions, but I think I should make sure I'm at least barking up the right tree! ;-)
I have been trying to get to grips with the all the OOTFs, EOTFs, OETFs and OETF^-1s involved in PQ and Hybrid-Log gamma.
For some time I have been playing around developing a web app called LUTCalc, and when Dolby first mooted PQ and the BBC started writing papers about log-based HDR displays I added in the various equations I could find. At that point I managed to misunderstand that the two systems took fundamentally different approaches to the display gamma. I used various LUTs I could find (including in Resolve) to check that my maths was working, but the curves were mostly just to help me as a cameraman start to get a handle on HDR.
Once Rec2100 was out and I had got around to reading it, I understood that the PQ curve definition is display light to PQ encoding, whereas Hybrid-log Gamma is scene linear directly to HLG encoding. I added in a PQ option including the PQ reference scene linear to display stage to the PQ encoding.
LUTCalc works in scene linear space for its adjustment tools.
Now that things have settled down I've had another, much more thorough revisit and have separated out the OOTFs from the PQ display to PQ equations.
As such, I have added the option to use PQ with the Rec2100 PQ reference OOTF and the Rec2100 HLG OOTF. The BBC's paper on converting between HLG and PQ uses the HLG reference OOTF.
I've added all this in and it SEEMs to make sense in its behaviour; if you want to take a look, I have just uploaded an online beta version to my 'testing' site: lutcalc.net/testing . I've been adapting the css to be 'responsive', so the UI may be a bit flakey at the moment, and as this is a colourist site I must warn that my range approach is 'quirky' (I'm working to make it more sensible without adding to the confusion) ;-), but the charts should be reasonably clear.
So, here come the questions:
First a quick one. Am I right that in PQ a value of 1.0 is always nominally 10,000 nits? That when you master to say 4000 nits it is the same PQ curve but the peak value is lower?
Next up, I had a look in the current Resolve LUTs to see if I'm on the right lines and in the 'HDR ST 2084' folder there are bunch of LUTs going between PQ and various conventional power-curve gammas. Trying to test out my sums as I have done before, I loaded several of them into LUTCalc. They seemed to fit with my original PQ implementation, where the PQ EOTF was being fed scene linear, i.e. 'Gamma 2.6 to HDR 4000 nits' takes in material which has had a gamma of 2.6 applied, degammas that back to linear, then feeds that into the PQ EOTF^-1 to end up with the PQ signal.
Is this right? Doesn't that mean that the OOTF in this case is effectively: OOTF[E] = E? I've added in an 'EOTF Only' but have I misunderstood something?
Lastly, moving to HLG, I had it drawn to my attention that the BBC has recommended setting reference levels to something different to the base standard. Basically, a 90% white card maps to 50% in the Rec2100 docs, but I was told that the BBC recommends setting 90% white card to 73%.
I found a reasonably technical BBC R&D paper online discussing this *, explaining that this gives decent compatibility with SDR material with a couple of stops headroom above the 90% white reference. A quick bit of fitting gave me a scaling factor to work with the nominal %HLG and cd/m2 values in the paper, and the logic makes sense, but considering the HLG encoding is scene linear to HLG, isn't this playing fast and loose with the standard or am I missing something?
As a cameraman, that throws up some concerns (not least that I now have no more headroom than a conventional camera with knee, just better expressed), but as an app developer how is this supposed to be factored into conversions to PQ. My current thinking is to include the scaling factor in both the OOTF and the HLG equation, so conversion to other spaces behaves correctly, but conversion to and from PQ cancels it out, avoiding clipping issues and assuming that 18% gray and 90% should fall where the standard expects in PQ. Is this the right thing to do?
Lastly, why does Rec2100 include both nits and cd/m2? Aren't they the same thing?
Sorry for the endless post and many thanks to anyone who plows through it and can shed some light for me,
Ben
* An Overview of the Hybrid Log-Gamma HDR System by Andrew Cotton & Tim Borer pages 44-45