What is HLG and what is it supposed to be used for?

workshops-275 What is HLG and what is it supposed to be used for?

While we wait for Sony to re-release the version 4 firmware for the FS5 I thought I would briefly take a look at what HLG is and what it’s designed to do as there seems to be a lot of confusion.

HLG stands for Hybrid Log Gamma. It is one of the gamma curves used for DISTRIBUTION of HDR content to HDR TV’s that support the HLG standard. It was never meant to be used for capture, it was specifically designed for delivery.

As the name suggests HLG is a hybrid gamma curve. It is a hybrid of Rec-709 and Log. But before you get all excited by the log part, the log used by HLG is only a small part of the curve and it is very agressive – it crams a very big dynamic range into a very small space – This means that if you take it into post production and start to fiddle around with it there is a very high probability of problems with banding and other similar artefacts becoming apparent.

The version of HLG in the FS5 firmware follows the BBC HLG standard (there is another NHK standard). From black to around 70% the curve is very similar to Rec 709, so from 0 to 70% you get quite reasonable contrast. Around 70% the curve transitions to a log type gamma allowing a dynamic range much greater than 709 to be squeezed into a conventional codec. The benefit this brings is that on a conventional Rec-709 TV the picture doesn’t look wrong. It looks like a very slightly darker than normal, only slightly flat mid range, but the highlights are quite flat and  washed out. For the average home TV viewer watching on a 709 TV the picture looks OK, maybe not the best image ever seen, but certainly acceptable.

However feed this same signal to an HDR TV that supports HLG and the magic starts to happen. IF the TV supports HLG (and currently only a fairly small proportion of HDR TV’s support HLG. Most use PQ/ST2084) then the HLG capable HDR TV will take the compressed log highlight range and stretch it out to give a greater dynamic range display. The fact that the signal gets stretched out means that the quality of the codec used is critical. HLG was designed for 10 bit distribution using HEVC, it was never meant to be used with 8 bit codecs, so be very, very careful if using it in UHD with the FS5 as this is only 8 bit.

So, HLG’s big party trick is that it produces an acceptable looking image on a Rec-709 TV, but also gives an HDR image on an HDR TV. So one signal can be used for both HDR and SDR giving what might be called backwards compatibility with regular SDR TV’s. But it is worth noting that on a 709 TV HLG images don’t look as good as images specifically shot or graded for 709. It is a bit of a compromise.

What about the dynamic range? High end HDR TV’s can currently show about 10 stops. Lower cost HDR TV’s may only be able to show 8 stops (compared to the 6 stops of a 709 TV). There is no point in feeding a 14 stop signal to a 10 stop TV, it won’t look the best. From what I’ve seen of the HLG curves in the FS5 they allow for a maximum of around 10 to 11 stops, about the same as the cinegammas. HLG can be used for much greater ranges, but as yet there are no TV’s that can take advantage of this and it will be a long tome before there are. So for now, the recorded range is a deliberately limited so you don’t see stuff in the viewfinder that will never be seen on todays HDR TV’s.  As a result the curves don’t use the full recording range of the camera. This means they are not using the recording data in a particularly efficient way, a lot of data is unused and wasted. But this is necessary to make the curves directly compatible with an HLG display.

What about grading them? My advice – don’t try to grade HLG footage. There are three problems. The first is that the gamma is very different in the low/mid range compared to the highlights. This means that in post the shadows and mid range will respond to corrections and adjustments very differently to the high range. That makes grading tricky as you need to apply separate correction to the midrange and highlights.

The second problem is that the is a very large highlight range squeezed into a very small recording range. It should look OK when viewed directly with no adjustment. But if you try stretching that out to make the highlights brighter (remember they never reach 100% as recorded) or to make them more contrasty, there is a higher probability of seeing banding artefacts than with any other gamma in the camera.

The third issue is simply that the limited recording range means you have fewer code values per stop than regular Rec-709, the cinegammas or S-Log2. HLG is the least best choice for grading in the FS5.

Next problem is color. Most HDR TV’s want Rec-2020 color. Most conventional monitors want Rec-709 color. Feed Rec-2020 into a 709 monitor and the colors look flat and the hues are all over the place, especially skin tones. Some highly saturated colors on the edge of the color gamut may pop out more than others and this looks odd.

Feed 709 into a 2020 TV and it will look super saturated and once again the color hues will be wrong. Also don’t fool yourself into thinking that by recording Rec2020 you are actually capturing more. The FS5 sensor is designed for 709. The color filters on the sensor do work a little beyond 709, but nowhere near what’s needed to actually “see” the full 2020 color space. So if you set the FS5 to 2020 what you are capturing is only marginally greater than 709. All you really have is the 709  with the hues shifted and saturation reduced so color looks right on a 2020 monitor or TV.

So really, unless you are actually feeding an Rec 2100 (HLG + 2020) TV, there is no point in using 2020 color as this require you to grade the footage to get the colors to look right on most normal TV’s and monitors. As already discussed, HLG is far from ideal for grading, so better to shot 709 if that’s what your audience will be using.

Don’t let the hype and fanfares that have surrounded this update cloud your vision. HLG is certainly very useful if you plan to directly feed HDR to a TV that supports HLG. But if you plan on creating HDR content that will be viewed on both HLG TV’s and the more common PQ/ST2084 TV’s then HLG is NOT what you want. You would be far – far better off shooting with S-Log and then grading your footage to these two very different HDR standards. If you try to convert HLG to PQ it is not going to look nearly as good as if you start with S-Log.

Exposure levels: If you want to get footage that works both with an HLG HDR TV and a SDR 709 TV then you need to expose carefully. A small bit of over exposure wont hurt the image when you view it on a 709 TV or monitor, so it will look OK in the viewfinder. But on an HDR TV any over exposure could result in skin tones that look much too bright and an image that is unpleasantly bright. As a guide you should expose diffuse 90% white (a white card or white piece of paper) at no more than 75%. Skin tones should be around 55 to 60%. You should not expose HLG as brightly as you do Rec-709.

Sure you can shoot with HLG for non HDR applications. You will get some slightly flat looking footage with rolled off highlights. If that’s the image you want then I’m not going to stop you shooting that way. If that’s what you want I suggest you consider the Cinegamma as these capture a similar DR also have a nice highlight roll off (when exposed correctly) and do use the full recording range.

Whatever you do make sure you understand what HLG was designed for. Make sure you understand the post production limitations and above all else understand that it absolutely is not a substitute for S-log.

Advertisements

4 thoughts on “What is HLG and what is it supposed to be used for?”

  1. That was a very helpful explanation. This new update will be a bit tricky to implement in a useful way. If I’m not careful, I will shoot footage I have absolutely no way of viewing properly.

  2. Play around with HLG-1,2 and 3 footage buy shooting some test shots in your back yard. All 3 modes are a bit different from each other with HLG-1 being the least agressive and 3 being the most. Experiment with drawing your own “anti-HLG” curve and bend up what HLG bends down. If you experiment a bit, you can create your own 709 LUT. I dont think HLG is any more “destructive” than SLOG-2 as long as you are not clipping important things. You should be able to “reverse” HLG in post to make a nice rec709 image with no trouble…..except fot the usual 8bit banding. Renember, there are two seperate factors that cause banding. 8bit sampling and high compression ratios or a stressed CODEC. The two are often mis diagnosed. I have done 8bit tests with low bit rate h.264 vs 8bit ProRes and found that stressed h.264 will show banding-type artifacts that 8bit ProRes wont show in the exact same scene. Anyhoo,…test it quite a bit first and use a ProRes recorder if you have one.

Leave a Reply

Your email address will not be published. Required fields are marked *

*