Re: Help with HLG profile

On 17-May-18 23:25, Max Derhak wrote:
>
> Hi,
>
> I have an action item in the ICC Display Working group to develop an 
> HLG based iccMAX display profile. In order to understand how to go 
> about it I’ve first prototyped functionality in Matlab/Octave.
>
> The attached zip file has my code along with the BT2100 document that 
> I’m using to implement.  The problem is that for a display profile you 
> need to have both device to PCS as well as PCS to device transforms.
>
> The device to PCS transform is conceptually implemented in 
> HLG_FullToXYZ.m, and the PCS to device is conceptually implemented in 
> HLG_XYZToFull.m  (I’m using full 0.0 to 1.0 range encoding in this 
> case).  Alternatively one could use the HLG_Narrow12ToXYZ.m and 
> HLG_XYZToNarrow12.m to use the narrow 12-bit integer encoding.
>
> The problem is that the OOTF (implemented in HLG_EOTF.m)  and inverse 
> OOTF (implemented in HLG_invEOTF) functions are not logical inverses 
> of each other (from what I can tell from the docs).
>
I recall hearing that these are not round-trippable.

On the other hand the BBC claim that the transcode looks "identical"

> PQ content graded on a 1000 cd/m2 display transcoded to HLG, and then 
> shown on the same screen in the correct HLG ITU-R BT.2100-0 mode (e.g. 
> Sony BVM-X300, “HLG SG Variable(HDR)”) will be identical. The process 
> described above is mathematical and exact (except for small rounding 
> differences). Any other result indicates a mistake in the workflow.

http://downloads.bbc.co.uk/rd/pubs/papers/HDR/BBC_HDRTV_PQ_HLG_Transcode_v2.pdf

> For the 0.0 and 1.0 values I get a correct round trip.
>
> >> HLG_XYZToFull(HLG_FullToXYZ([1.0;1.0;1.0]))
>
> ans =
>
>    1.0000
>
>    1.0000
>
>    1.0000
>
> But for an intermediate value I don’t get a correct round trip.
>
> >> HLG_XYZToFull(HLG_FullToXYZ([0.5;0.5;0.5]))
>
> ans =
>
>    0.17755
>
>    0.17755
>
>    0.17755
>
> So here are a few questions and observations.
>
> *Have I implemented what is written in the spec correctly?
>
> *If yes then what do I do about inversion?  I think that the problem 
> is that the definition for the inverse OOTF is not a correct inversion 
> of the OOTF.  I don’t see a simple way of correcting it.  I could 
> possibly create a sampled inverse curve based on earching for results 
> using the OOTF.  Interestingly the XYZ to Display transform (probably 
> the transform more often used in a system) would then be not be 
> functional but interpolated.
>
> *Also it would be incredibly helpful to better understand what is the 
> purpose of having an HLG ICC profile?
>
On that last question: it seems to me that the TV broadcast people are 
using HLG and expect the viewing environments to vary in brightness, 
while the Movie people are using PQ and expect the viewing environment 
to be a dark cinema or a dark, high-end home cinema setup.

So (as I understand it, from various BBC people explaining it) not only 
news and broadcast program material, but also any HDR video content 
viewed in a range of viewing environments would be better in HLG because 
viewing PQ in any other environment requires an (undefined, 
creative-input-required) remastering, not just a transcode. See in 
particular question 15 in this FAQ:

http://downloads.bbc.co.uk/rd/pubs/papers/HDR/BBC_HDRTV_FAQ.pd

-- 
Chris Lilley
@svgeesus
Technical Director @ W3C
W3C Strategy Team, Core Web Design
W3C Architecture & Technology Team, Core Web & Media

Received on Tuesday, 29 May 2018 10:31:02 UTC