New cameras like this Sony FS5 provide a wide variety of exposure and image adjustments. The shooter just needs to know what they do.
Log gamma recording is available from an increasing number of camcorders and even several DSLRs. When folks buy these cameras it’s a safe bet they are doing so with the intent of using, or at least trying, their new camera’s log option.
Over the last year, as I used cameras that offer log gamma (Canon C300 mkII, JVC GY-LS300, Sony FS5, and Canon XC10), I’ve wondered how many shooters understand log and understand why exposure settings when shooting log are necessarily different. I also wonder if some shoot in log mode, but with normal (BT.709) based exposure.
Perhaps our fuzzy understanding of log gamma is that log stands for logarithm. And, for many of us, our memories of logarithms are stored in the same brain region as “driver training” and “solid geometry.” To remove this mental block, I’ll explain log gamma using graphs—no logarithms and no math.
Why has log gamma become so popular? Because we believe it provides an extended dynamic range. When, however, we engage log mode nothing about the sensor’s dynamic range changes. The same amount of signal (plus noise) causes the sensor to output a binary code of “1.” And, the same amount of light causes the sensor to output it’s maximum binary value—typically from “4095” to “65535.”
Figure 1 shows the upper 6-stop output from a hypothetical 12-bit sensor that can provide a dynamic range of up to 12-stops. For each additional stop of light captured, the sensor’s output voltage becomes two times greater. In turn, after conversion from analog to digital data, the binary output values also double. This scheme is called linear-light.
At its clipping point, my hypothetical 12-bit sensor outputs a binary value of 4095, which will be recorded at 108%. However, for simplicity, graphs in this article will range from a 0- to 100-percent.
Figure 2 shows the upper five stops—codes from 128 to 4095 from the sensor. Included in the Figure are 46-percent and 90-percent signal levels from 18% (middle-gray) Gray and 90% White cards, respectively. Cameras record “white” at levels from 90- to 96-percent while “middle-gray” is recorded from 42- to 46-percent. (The plotted positions for middle-gray and white are approximate.)
When light input is reduced by 1-stop, the binary output code decreases from 4095 to 2047. Using 2048 codes for one-stop (4095 to 2047) is inefficient because for all remaining stops, only 2048 codes are available. Code shortage forces the difference between, for example, stop -4 (a 255 code) and stop -5 (a 127 code) to be 128-steps while the difference between stop -9 (a 7 code) and stop -10 (a 3 code) is only 4-steps.
Figure 3 dramatically shows the inefficiency of linear-light by plotting the number of tonal levels (binary codes) in each of the 12 stops.
Figure 3: Number of tonal levels in each of the 12 stops
The lower six stops from the sensor are shown by Figure 4. The increment between each of the lowest three stops is so small that to see them requires this second graph. The lowest stop is a 1-bit binary light verses no-light signal. This single bit, and the next higher stop (2-bits), does have value when measuring dynamic range using, for example, a DSC Labs chart. These 8-levels, however, are likely to carry noise as well as signal and thus provide little or no useful grayscale information. My hypothetical 12-bit sensor would more properly be considered to provide a 10-stop rather than 12-stop grayscale. This inherent loss of effective dynamic range explains why sensors are typically 14-bit and 16-bit devices.
Before recording a video signal, linear-light data are processed by one of several possible gamma functions: BT.709, Hypergamma, or Log. Figure 5 presents these three options—each of which may have several sub-options.
Figure 5: BT.709 gamma correction, a Hypergamma (extended BT.709), and log gamma
BT.709 Gamma Correction
BT.709 is a Gamma Correction function that modifies a linear-light signal so the image is ready to view on a display. The blue line in Figure 6 represents a linear-light signal from the sensor. The result of a BT.709 Gamma Correction function applied to the linear-light signal is shown by the green curve.
Figure 6: Linear-light > 709 gamma correction > CRT gamma > Linear-light
When the recorded (green) signal is sent to a display, it is naturally converted to light in the manner described by its Gamma function. The arithmetic product of the Gamma function (purple) and the Gamma Corrected signal (green) becomes once again a linear-light signal (blue). Gamma correction enables unity transfer of information from sensor to display. To learn more about gamma correction, see my article, Looking Deeper into Log Gamma, which was published in March, 2016.
Almost every visual representation of log gamma presents a comparison like that shown by Figure 7 which displays the increase in dynamic range provided by different log functions. Let’s look at log gamma in an entirely different way.
Figure 7: Marketing explanation of different log gammas
Figure 8 has two fundamental plots. The red, linear, plot presents a series of 12-bit sensor-output codes from 0 to 4095. The blue, curved, line results from a log function applied to each value in the input series. We can see linear data have been converted to logarithmic data.
Figure 8: Non-linear-light signal after log-function
I’ve added green vertical lines at one-stop intervals along the linear (red) plot. These lines, as expected, are spaced at uneven intervals just as they are in Figure 1. Where these lines intersect the log (blue) plot, I’ve placed horizontal lines that extend to the Y-axis. The result—a Y-axis where one-stop intervals are evenly spaced. Each stop now has the same number of binary codes.
The resulting step size (number of codes) is adequate to convey illumination differences meaningful for the human eye—at all captured light levels—without wasting binary codes. Equal, rather than unequal, steps is the most efficient way to transmit all meaningful information from the sensor though a narrow pipeline to editing/grading software.
The pipeline is the 8-bit, 10-bit, or in rare cases, the 12-bit recording system employed by today’s cameras. While a 12-bit system would be able to directly record linear-light data from my hypothetical 12-bit sensor, the 14- to 16-bit data from real sensors must necessarily be scaled down. Relative to the bit depth of the sensor, 10- and 8-bit recording employs a narrow pipeline.
Setting Exposure for Log Gamma
We know the sensor doesn’t function differently when one enables log mode, so how is dynamic range increased? The answer is revealed by a more complete statement; log gamma increases dynamic range over the dynamic range provided by BT.709. Thus, to understand log gamma we need to see how it differs from BT.709 gamma.
Figure 9 shows optimum recorded signal levels used by three different cameras from exposure to an 18% Gray card and a 90% White card. The chart shows the White signal level shifted from 90-percent downward—depending on the type of log gamma—to an average 62-percent. Likewise, middle-gray (18% Gray card) is decreased from 46-percent to an average 36-percent.
The Y-axis of Figure 8 has been rotated to become the X-axis for Figure 10. The red line indicates the approximate position of the 90-percent (BT.709 White) signal while the blue line indicates the position of the 62-percent (Log White) signal. The horizontal green arrow shows the decrease in the signal for white levels.
This downward shift provides an increase in headroom. The increased headroom makes possible a greater dynamic range. Or, more properly stated, the increase in headroom allows the highlights to be less compressed than they are when BT.709 Gamma Correction is employed.
Shooting log also results in a lower signal level for middle-gray. The signal level decreases from 46-percent (orange line) to 36-percent (violet line).
Visually, the downward exposure shift reduces image brightness. When present in a scene bright highlights will, however, be part of the image. This, of course, is the value of log gamma.
Most video cameras are designed so color saturation increases with image brightness. (This explains one reason why video looks different than film.) When shooting log, image brightness is decreased thereby resulting in lower image saturation. Both lower average brightness and lower saturation yield the flat look characteristic of log gamma video.
Figures 11 and 12 present the upper and lower stops of a video signal after it has been log processed. To obtain correct exposure from my hypothetical 12-bit sensor, I would need to expose an 18% Gray card at 36-percent or a 90% White card at 62-percent. To accomplish this, my camera should offer dual zebras. I would set the lower zebra at either 30% or 60% while the upper zebra would set to either 40% or 70%.
A sensor typically delivers maximum dynamic range at its nominal sensitivity. Therefore, be sure to set ISO appropriately when shooting log. Some cameras, however, provide their best dynamic range when they are set to a very specific ISO setting. These cameras either automatically switch to the appropriate ISO when log mode is selected, or the camera’s documentation should specify the correct ISO.
Figure 13 shows the log signal when about 1.5 stops of gain have been applied. Headroom naturally is decreased while shadow detail is increased. (Shadow noise may be lower after grading because when grading, less gain will need to be added to the shadows in order to increase shadow detail visibility.) As you can see, the result is a balanced -6/+6 stop dynamic range centered on middle-gray.
Types of Log Gamma
The log signal from my hypothetical 12-bit sensor resulted from applying a simple log function to the linear sensor signal. The processing realities within cameras are very different. Cameras process sensor data to create a match between their sensor and their manufacturer’s desired image goals. Goals—because most cameras offer multiple types of log gamma curves for different purposes. Sony, for example, supports three log curves: S-Log1, S-Log2, and S-Log3.
To accomplish the desired data transformation, sensor data are processed in a more complex way than simply applying a log function. Figure 14 shows that one example of complex processing enables the critical mid-tone areas to have more tonal increments (grayscale) over a 6-stop range, while still yielding a wide dynamic range. You can see how the distance between stops is greater from 3 stops below middle-gray to 3 stops above middle-gray.
Selecting log gamma mode, or selecting from one of several log gammas, determines the manner in which the linear-light signal from a camera’s sensor is transferred to your editing/grading software.
Log Mode and Color Gamut
In many cameras, in addition to enabling log mode, you have the option to select the colorspace of the recorded data. Figure 15 shows five gamut options. (sRGB colorspace is equivalent to BT.709.) There are even larger gamuts such as Canon’s Cinema gamut that is far larger than REC.2020 and is designed to provide a gamut far closer to that provided by motion picture film.
A camera that provides 14-stops (or more) dynamic range, an appropriate log gamma, and a BT.2020 gamut—will capture source material that can become HDR content.
See other Steve Mullen tutorials listed below:
You might also like...
Following numerous private conversations and panel discussions at the recent 2018 NAB Show, it’s become clear that broadcasters are being challenged like never before to hold the line on CapEx spending while delivering more content across their linear platforms. Because o…
The traditional broadcast equipment industry is in a state of flux, with continual consolidation on the media customer side impacting M&A on the vendor side. The IABM recently reported a slight increase in sales but a worrying decline…
The core of any camera is the sensor, and along with the lens, they define and constrain the performance of the camera more so than the downstream processing. There have been many advances in sensors, with the move from vacuum…
For Super Bowl fans, the big game action is over, but broadcast and production crews always want to know how the program feed was accomplished. To showcase the game and halftime production, we highlight the behind-the-scenes technology used to produce…
Did you miss these two important articles from The Broadcast Bridge? The first of two articles presents a white paper examining how software-centric T&M can help keep test equipment up-to-date on the latest standards and technologies. The second…