VideoTek - Wrong line 75 %
Closed this issue · 7 comments
I like your work, and often use VideoTek. But there is a great mistake at the line for 75 % HLG signal level. The scale is linear, the nits are nonlinear.
0,75 * 0.7 V = 0.525 V But the line position is much higher than 3/4 level!
In the script you did the calc like
y = (362 - 20)/4 = 342/4 = 85,5 -> 85
Then
y= 85 - 20 = 65 WRONG! -> Y = 85 + 20 = 105
More exactly it is
y = (396 - 32x2)/4 +32 = 332/4 +32 = 83 + 32
y = 115
Minus font shift 12 of subtitle line ___
y = 103
Text y = 107
With this value my HLG movies show the right levels, and you can see the correct 75 % line.
I’m frank from Doom9.
My account was hacked in January 2023, and now I’m banned. I don’t no why, and cannot reach an admin.
Best regards
Frank
Hi Frank,
I'm so sorry to hear that your account was hacked (and banned).
Unfortunately I don't think there's a way to get it back, but you might try asking Swede directly or other people like Tebasuna or Derek Prestegard or Ben Waggoner. Perhaps they can do something.
About the 75% reference for HLG, I recognized the mistake and it all comes from this:
ColorBars(848, 480, pixel_type="RGB24")
ConvertBits(16)
ConverttoPlanarRGB()
Cube("C:\Programmi\AviSynth+\LUTs\5a_BT709_HLG_UPCONVERT_DISPLAY_mode-nar_in-nar_out-nar_nocomp.cube")
and when I look at it with VideoTek() taking the luma portion only I can see:
if I specify VideoTek(mode="HLG") I get:
This is achieved by:
if (Mode == "HLG") {
#Reference White 75%
Subtitle("_________________________________________________________________________________________________", x=710.0, y=65.0, size=15, text_color=$0E7F84, utf8=true)
Text("0.52V", x=1430.0, y=69.0, size=18)
}
if I understand what you wrote correctly, you're essentially suggesting to place Subtitle and Text respectively at 103 and 107 instead of 65 and 69, therefore:
if (Mode == "HLG") {
#Reference White 75%
Subtitle("_________________________________________________________________________________________________", x=710.0, y=103.0, size=15, text_color=$0E7F84, utf8=true)
Text("0.52V", x=1430.0, y=107.0, size=18)
}
On a first glance, one would say that this is much lower than where it's supposed to be, but this is not the case.
If we take the official EBU Tech 3373 Colour Bars in BT2020 HLG from here https://tech.ebu.ch/publications/tech3373-tiff we can index the 16bit TIFF lossless image provided and check with VideoTek(mode="HLG"):
ImageSource("D:\ebu_hdr-hlg_colour_bars_3840_2160_rgb444p16be_lzw.tif")
VideoTek(mode="HLG")
The value indicate by default by VideoTek() is off, however if we were to place it lower to the value you indicated we would get it right:
This is the official EBU White Paper: https://tech.ebu.ch/docs/tech/tech3373.pdf
As we can see, on the left hand side, we have 4 shades of grey from top to bottom, namely:
- 100% white
- 75% reference white (this is what we're targeting with 0.52V in HLG)
- Display Light White (meaning that this should be correct if a display light referred conversion to BT709 SDR is performed)
- Scene Light White (meaning that this should be correct if a scene light referred conversion to BT709 SDR is performed)
and indeed by placing it to 103 we get the right value.
I'll be re-testing it tomorrow with AVID Media Composer as well, but yeah, you're absolutely right...
Many thanks, Francesco.
I would have liked to have sent you the issue 6 months ago, but I don't have your email address.
Can you post an address, so I can sent you my private address?
And here my changes to VideoTek
` if (Mode == "HLG") {
#Reference White 75%
Subtitle("_________________________________________________________________________________________________", \
x=710.0, y=103.0, size=15, text_color=$0E7F84, utf8=true)
Text("200 nit", x=1430.0, y=107.0, size=18)
Subtitle("_________________________________________________________________________________________________", \
x=710.0, y=159.0, size=15, text_color=$7E0F84, utf8=true)
Text("58% PQ", x=1430.0, y=159.0, size=18)
#100 nit 63 %
Subtitle("_________________________________________________________________________________________________", \
x=710.0, y=166.0, size=15, text_color=$0E7F84, utf8=true)
Text("100 nit", x=1430.0, y=170.0, size=18)
#400 nit 83 %
Subtitle("_________________________________________________________________________________________________", \
x=710.0, y=77.0, size=15, text_color=$0E7F84, utf8=true)
Text("400 nit", x=1430.0, y=81.0, size=18)
#600 nit 90,6 %
Subtitle("_________________________________________________________________________________________________", \
x=710.0, y=51.0, size=15, text_color=$0E7F84, utf8=true)
Text("600 nit", x=1430.0, y=55.0, size=18)
`
I added some lines for better control of my HLG conversions.
Used the formulas from videoq.com
Unified Reference White
Have fun :)
No problem at all! Feel free to write me at franceopf@gmail.com for private matters and to francesco.bucciantini.adecco@skytv.it for encoding stuff.
By the way, I can add the modifications if you want, otherwise if you wanna be listed as a contributor, feel free to open a pull request and I'll merge it straight away.
I'm sure PQ will make Tormento (i.e one of my Italian colleagues) very happy.
You can use it for free, your work is great. :)