aces-core
aces-core copied to clipboard
HLG EOTF from ITU-R BT.2100-1 is used not ITU-R BT.2100-2
https://github.com/ampas/aces-dev/blob/76ea982a988d278dd12b563602771f46a5da3b83/transforms/ctl/lib/ACESlib.Utilities_Color.ctl#L463
I notice that the CTL code for the HLG Output Transform uses the HLG EOTF from ITU-R BT.2100-1, not ITU-R BT.2100-2, in the function ST2084_2_HLG_1000nits_f3 (and its inverse). This makes no difference to the result, since when L_b = 0 the two EOTFs are equivalent. But I was wondering if it might be worth adding a comment to this effect to the code.
Since the code uses L_b = 0., then beta = L_b, and later (Y_d - beta) currently L_b is redundant and could be removed, as you are subtracting zero. But given it is left in there, somebody might think they could modify the code and substitute a non-zero value for L_b. But if they did so, the result would be incorrect according to ITU-R BT.2100-2.
Good thing to note, @nick-shaw
1.1 was released in June of 2018. ITU-R BT.2100-2 was not published until July of 2018. We can add this clarification in the 1.2 release.
@nick-shaw what sort of a comment were you thinking should be added here?
After reviewing this, I'm not sure if it's necessary, but I could certainly add something if you think we could make it clearer. Does your concern stem from the fact that 2100-2 declares beta as a "variable for black level lift"?
The citation in the comment for the function ST2084_2_HLG_1000nits_f3 currently cites Section 7 of ITU-R BT.2390-0, where, in 7.2, it specifically says:
For both transcoding and conversion a black level for the HLG EOTF also needs to be specified. The HLG black level, LB, should be set to zero for transcoding and conversion.
Do you think I should add that statement?