[Updated] Whilst Hybrid Log Gamma (HLG) is continuing to gain popularity for recordings and broadcast, there is often a lot of confusion and misinformation out there regarding HLG as an acquisition and grading format, so I thought to write up a few points that will hopefully provide some clarity for those looking to produce content using it.
This write-up is not intended to go through the low-level in’s and out’s of the HLG format – there is already a plethora of information available from the BBC, NHK and ITU as well as associated recommendations. We will instead focus on the specifics around recording and subsequently editing HLG content for delivery to SDR and HDR formats. In Part 1 we will focus on Recording content using the HLG format.
Recording with HLG
In a lot of documentation, HLG is often referred to in a Display referred context, as a “Broadcast” format for capture and viewing on HDR enabled displays and this aspect alone causes much confusion for users and consumers. When considering HLG for recording, or actually trying to record HLG, we must always consider it in a Scene referred context, as the camera is encoding Linear light to HLG directly from the sensor – there is no Opto-Optical Transfer Function (OOTF) applied as it is when viewing HLG for most Display purposes. HLG in a Scene referred context is no different to any other Log format used for capture purposes and can be graded just as easily. In order to properly understand and record using Hybrid Log Gamma, we must first look at the ITU-R BT.2100 specification and the ITU-R BT.2408 recommendations.
Firstly, the ITU-R BT.2100 specification has a nominal range of 0 – 12 for HLG. In comparison, the Standard Dynamic Range (SDR) ITU-R BT.709 specification and other Log formats have a nominal range of 0-1. In practical terms, the Rec.709 Opto-Electronic Transform (OETF) maps a Camera’s 18% Middle Gray reference to 40.9% IRE (rounded to 41%) when recording at video levels (or 40.5% when recording data levels).
In the case of HLG, whilst keeping the nominal 0-12 range in mind, the HLG OETF maps a camera’s 18% Middle Gray reference to 21.2% IRE when recording at video levels. This has been rounded up to 22% on some sites, though rounding down to 21% IRE is perhaps more accurate.
Using HLG BT.2100 as a base reference, the BT.2408 recommendation provides further guidance for production practices and recommends 18% Middle Gray be exposed at 38% IRE (37.8% IRE to be exact) in a scene referred context. A nominal luminance of 26 cd/m2 (in a display referred context) is also stipulated for the HLG BT.2408 middle gray reference. This recommendation is also interchangeably referred to as 75% HLG, where the 100% diffuse white (SDR peak white) maps to 203 cd/m2 and is approximately 75% of the HLG signal level.
In simple English, what this all means is that when referencing the BT.2408 recommendation, pointing a camera at an 18% Middle Gray card should result in an output of approximately 38% IRE on a waveform monitor when correctly exposed. Similarly, when referencing the BT.2100 specification, a camera should display an output of 21% IRE on the waveform monitor against an 18% Middle Gray card when correctly exposed. It’s important not to confuse HLG BT.2408 with ST.2084 which uses the Perceptual Quantizer (PQ) transfer function. HLG. BT.2408 is essentially an exposure recommendation for production practices when recording HLG. Sony’s custom HLG profiles on the other hand are completely different curves.
Sony has bastardized HLG in their camera implementations by introducing HLG1, HLG2 and HLG3 alongside the HLG BT.2100 standard. For Sony’s HLG parameters, the 18% Middle Gray reference should be exposed at 19% IRE for HLG1, at 20% IRE for HLG2 and at 21% IRE for HLG3 respectively. I cover Sony’s HLG implementation and issues in another article.
When Hybrid Log Gamma is encoded from a camera’s sensor, the encoder needs to factor in the 0 – 12 nominal range. Given that the HLG specification also requires a video legal range, the resulting signal must stay with in the 64 – 940 steps for 10-bit values (or 16-235 for 8-bit) after quantization. To visualize all this, I’ve plotted the HLG BT.2408 recommendation and the BT.2100 Specification (i.e. what the camera natively sees) against a Characteristic Curve in the diagram below.
At first glance, the Camera Native output exhibits more latitude in the highlights – approximately 1 ⅔ stops more compared to BT.2408 – however, the downside of this additional highlight range is that there are less code values given to the darker parts of the scene. Considering that many Log curves have an 18% middle gray around the 34-45% IRE range, the HLG BT.2100 specification’s 21% IRE for middle gray is quite low and by extension more susceptible to visible noise because of how the curve is implemented on most cameras. This becomes apparent in low-light scenarios and on crop sensors such as 1″, m4/3 or APS-C with some full-frame sensors also exhibiting increased noise – largely due to the lower dynamic range capabilities of all those sensors. Practically though, a number of manufacturers don’t apply as much signal amplification to their HLG implementations as they would to native Log implementations. This reduced amplification may theoretically result in more dynamic range and less visible noise than with the manufacturer’s own Log implementations – Sony’s A7R3 & A7 III for example have a base ISO of 125 for HLG, whereas for S-Log2 the base ISO is amplified to 800. The Lumix GH5 has a base ISO of 400 for both HLG and V-Log L, however the native HLG implementation also provides for more highlight range compared to V-Log L and when exposing for HLG BT.2408 at native ISO, the image is also far cleaner than both HLG Native at 21% IRE and V-Log L. I will be comparing HLG against other Log profiles in a subsequent write-up.
Image Noise – BT.2408 vs BT.2100
Below is a 10x magnification of comparative clips shot on a Lumix GH5 using HLG exposed at approximately 21% and 38% IRE respectively.
In the above image, we can see the noise is visible when exposed at the native 21% IRE, though some may find this luma noise acceptable or even aesthetically pleasing, much like the desirable grain of film stock footage. Whilst Panasonic seem to do a great job of controlling the nasty chroma noise across the image, cameras from other vendors (looking at you Sony) may not be as forgiving and exhibit blotchy chroma colors, especially in the shadows. Compared to BT.2100, the noise is significantly reduced when exposing to the BT.2408 recommendation of 38% IRE, though it comes at the cost of reduced range in the highlights. This is to be expected when Exposing To The Right (ETTR) and may be a downside if the ultimate intention is to deliver in HDR formats.
There may be other caveats when exposing footage at 38% IRE though. Firstly, the Camera’s Exposure Meter will be offset. When an 18% Gray Card is correctly exposed for HLG BT.2100, the Exposure Meter should show a value of zero to reflect 21% IRE. However, when adjusting for 38% IRE, the image will need to be over-exposed by 1 ⅔ stops and this delta will need to be kept in mind whist recording content with changing brightness levels.
Exposing for Hybrid Log Gamma
Whilst in-camera exposure readouts are very important and some cameras will display accurate exposure values when moving up and down the brightness levels, others will show rough estimates or a very limited exposure range. For example, Sony cameras offer limited -2 to +2 EV range readouts that are also rounded. What’s worse, some cameras manufacturers use completely wrong exposure metering calculations for HLG profiles. Sony’s HLG implementation is a prime example of this issue – exposure readouts on the A7 III for example reflect Rec.709 Scene at 41% IRE, not HLG at 21% IRE. They are simply wrong and cannot be relied on. Quite perversely though, Sony’s incorrect exposure metering at 41% IRE is very close to the 38% IRE of HLG BT.2408 and the camera’s exposure meter could possibly be used here as a fall-back.
Whilst Lumix cameras have the ability to show -3 to +3 EV exposure ranges in ⅓ steps, there does appear to be an issue with incorrect exposure metering readouts on some models such as the Lumix GH5. The exposure meter readings for some profiles, such as V-log L, are exactly 1 stop over-exposed. The HLG profile is also 1 stop over-exposed at approximately 30% IRE instead of 21% IRE. Shown below is an example of incorrect exposure metering on the GH5 for the HLG profile. Note the Waveform Monitor reading middle gray exposure card at 30 IRE. [Update: Newer Lumix cameras such as the GH6 now appear to align the HLG exposure metering to the BT.2408 recommendation of 38% IRE.]
Incorrect exposure readings can be very misleading and Panasonic’s response to the GH5 issue has been that these values were set to “maximize Dynamic Range”. Unfortunately, this is wrong as the Dynamic Range is still the same at base ISO, but the highlights are now clipped even earlier by over-exposing the image. This also causes issues with grading when footage is normalized using the HLG standard profile as the whole scene will be over-exposed. The same would be the case for V-Log L.
Due to the overall inconsistency of in-camera Exposure meters across cameras and vendors, another useful tool for correct exposures is perhaps the Waveform Monitor. Some cameras such as the recent Lumix GH and S series include waveform monitoring built in as part of the firmware. This makes aligning exposures easier. For cameras that aren’t so lucky, an external recorder/monitor that offers waveform monitoring will do the trick, provided it has been correctly setup.
[Update: With the release of newer Lumix cameras such as the S1H, BGH1 and GH6, Panasonic has introduced Luminance Spot Metering as an additional tool for video shooters. This meter will show an IRE reading of a designated spot on the Camera screen. This is without doubt THE BEST method for correctly exposing HLG as it provides an exact readout as an IRE value. ]
Another alternate and extremely accurate option for Exposing HLG would be to rely on Zebra Patterns. Fortunately, the saving grace for Sony is their ability to configure Zebra patterns at 21% for HLG BT.2100 (or HLG3), 19% for HLG1, 20% for HLG2 and at 38% for HLG BT.2408 (using the HLG or HLG3 preset).
There is no such luck on [older] Lumix cameras unfortunately as their Zebra settings cannot go below the 50 IRE range. [Update: Newer Lumix cameras such as the GH6 now include the Base + Range Zebra settings.] Not all manufacturers support Zebra patterns with such low IRE values, so further investigation will be required for each manufacturer and camera to identify whether sub-22 IRE Zebra patterns for HLG can be achieved. With that said, zebra patterns can also be used to expose against an SDR “Peak White” (a.k.a. diffuse white) value. This is discussed further below.
Exposing without Middle Gray
So far we’ve only looked at exposing for Middle Gray using a reference 18% Gray Card, but what happens when this isn’t an option? In those scenarios, exposing against SDR “Peak White” may be the alternative. So what exactly is SDR “Peak White” one may ask? As noted earlier, Hybrid Log Gamma has a nominal range of 0-12 where an input of 1.0 corresponds to 100% of an SDR signal, or peak white for SDR. In HDR, this value would be referred to as diffuse white to avoid confusion with the true clipping peak value, which corresponds to 1200% for HLG. This diffuse white would essentially be a non-light emitting source where 100% of the light is reflected back, such as white snow, a white wall or a pure white card. A White Balancing card would generally sit in the 80-90% reflectance range and may not be suitable due to manufacturing variations, however I have provided the relevant monitoring values for reference in the table further below.
When referencing the HLG BT.2100 standard, an input of 1.0 would correspond to 50% of the HLG signal. Similarly, when referencing the HLG BT.2408 recommendation, an input value of 1.0 would correspond to 75% of the HLG signal.
Given HLG can have a peak brightness that is 1200% greater than a standard Rec.709 signal, there will undoubtedly be light emitting sources, such as the sun or a bright lamp, that will be captured above the 50% and 75% signal levels respectively.
With all this in mind, if exposing for diffuse white against a white card, white wall, or even snow, the waveform monitor should reflect at either 50% for HLG BT.2100 or 75% for HLG BT.2408. On the Exposure Meter, assuming the readout is accurate for BT.2100, 50% IRE would be approximately +2.5 stops above middle gray and 75% IRE would be just over +4 stops above Middle Gray (relative to middle gray at 21% IRE).
If using Zebra patterns, set the respective values to either 50% or 75%, depending on the preferred HLG setting and ensure the correct exposure against a proper white source that does not emit light. If using a white balance card, refer to the table below for the respective values. It’s extremely important to ensure exposure metering is not done against a light emitting source as this could result in over-exposed or under-exposed footage depending on the scenario. The table below is a handy reference that shows the corresponding 80%, 90% and 100% reflectance values for HLG.
Adjusting Exposures for BT.2408
To adjust the levels in order to properly expose for BT.2408, there needs to be an increase in the amount of light reaching the sensor when compared to exposing for BT.2100. This can be done artificially by increasing the ambient lighting or reducing the ND filter strength, if one is being used. This is also a win-win scenario if absolute highlight preservation is not required – i.e. if delivering to SDR formats. However, many “run and gun” scenarios will have limited ability to modify ambient lighting and possibly may not use Neutral Density filters altogether. In this situation, exposure adjustments can be achieved in-camera by increasing the aperture (lowering the ƒ-stops) by approximately 1 ⅔ stops or increasing the Gain/ISO accordingly.
An increase in the aperture will ultimately result in a shallower depth of field and further blurring of out-of-focus areas, which may be desirable or undesirable based on the circumstances. In some instances, an increase to the aperture may not be possible due to it already being at the maximum. This would then require that the Gain/ISO be increased as a last resort. An increase in the Gain/ISO will effectively amplify the signal coming from the sensor. This will also amplify any noise that has been captured with the addition of further signal degradation due to interference from other electronic components. A signal degradation would essentially mean a reduced Signal to Noise Ratio (SNR), in which case any benefits of opting for the BT.2408 recommendation over the BT.2100 specification could potentially be nullified. In real-world tests however, when increasing the base ISO by 1 ⅔ stops, there was only a slight reduction in the SNR and the overall image exhibited far less noise than when exposed at the default 21% IRE. With that said, as a general rule of thumb, it’s recommended to record with the camera’s base ISO/Gain/SNR where possible to maximize the available dynamic range.
HLG Recording Conclusions
So, what parameters should you use for recording with Hybrid Log Gamma?
To summarize exposing for HLG, the following methods should be used in order of preference:
- Luminance Spot Meter [Available on newer Lumix cameras]
- Zebra Pattern
- Waveform Monitor
- Exposure Meter
Firstly, if selecting Zebra patterns to expose, ensure your camera can support low IRE values if exposing for middle gray or expose against a white source that doesn’t emit lights. If using a waveform monitor, ensure it is visible in-camera or if you have an external monitor/recorder, ensure it is configured correctly to display the appropriate waveforms values. If using exposure metering, ensure it is set to spot metering and direct the spot at your 18% Gray Card to ensure your exposure readings are correct. The quality of your Gray Card is also important as some of the $2 cards tend to be cheap & nasty. If you’re unable to use a gray card or white point, then the BT.2408 recommendation also provides a rough guide on skin tone exposure levels. Based on 38% IRE Middle Gray, the skin tone levels range from 25% IRE for the darker skin tones up to 65% for the lightest of skin tones, with the average skin tone sitting within the 45-60 IRE range. This would equate to roughly -1 ⅓ stops below middle gray (relative to 38% IRE) for the darker skin tones and up to +1 ⅔ stops above middle gray for the lightest skin tones, whilst the average skin tones would be roughly between +⅓ to +1 ½ stops above middle gray. Once exposure metering has been set, the next question is whether to to go with BT.2408 recommendations or the HLG BT.2100 specification?
Think of BT.2408 recommendations as “Exposing To the Right” of the BT.2100 specification. The benefits are there if you would like to reduce visible noise, even if only done by increasing the Gain/ISO by 1 ⅔ stops. If you are delivering to a Standard Dynamic Range (SDR) format such as Rec.709 where bright highlights will be clipped regardless, then go with the BT.2408 recommendation. BT.2408 also has the advantage of being much closer to the Rec.709 Scene gamma curve, such that the footage could even be placed into a Rec.709 Scene timeline without an extremely visible difference [Note: this aspect is covered in Part 2].
If you are delivering for HDR and would like to eke out those extra NITs in the highlights, then go with the BT.2100 specification, provided the noise is manageable. If the noise in the shadows and mid-tones is too ugly, then go for the BT.2408 recommendation instead.
Alternatively, you may need to over-expose or under-expose shots – whether choosing the BT.2408 recommendation or BT.2100 HLG specification – in order to preserve highlights, shadows or further reduce noise. For example, you could over-expose the HLG BT.2100 reference by 1 stop at 30% IRE to reduce visible noise but still leave additional headroom in the highlights (approximately ⅔ EV more room compared to BT.2408). The over/under exposure can then be corrected later in post manually or by using tools such as the HLG Normalized Plugin / HLG Normalized Transform or the Exposure Correction OFX Plugin.
The following Tables provide a handy reference when under-exposing or over-exposing relative to the BT.2408 recommendation or HLG.BT2100 specification respectively.
When in doubt about what settings to use for recording Hybrid Log Gamma, stick to the camera’s Base ISO and go with the BT.2408 recommendation of 38% IRE. In the case of Sony cameras, the incorrect exposure meter quite perversely has an advantage of being closer to the 38% IRE range, but opt to expose using the zebras instead – they are far more accurate.
Once you’ve settled on the technical parameters, how do you then go about ingesting and correcting/grading the footage in Video Editing Software? Why does some footage show black splotches in certain areas? Why does some HLG footage look dull or dark or too bright when imported? Can you use Rec.709 settings for HLG? Can HLG be used with ACES? How do the HLG Normalized Transform or the HLG Normalized Plugin conform HLG media relative to BT.2408 or BT.2100? All of that is covered in Part 2 of Recording and Editing with Hybrid Log Gamma.