top of page

Understanding Log-Format Recording

Once touted as a headlining feature on only the highest grade digital video/cinema cameras, such as the Sony CineAlta line, log (logarithmic) recording has become a mainstay on more affordable professional products, such as the Canon EOS-C series, and more accessible through prosumer products like the Sony α-series mirrorless cameras. One of the reasons log recording has become so prevalent is that it is often associated with the idea of better image quality. In a nutshell, recording using a log picture profile or curve preserves more of your image’s dynamic range and tonality by redistributing the digital exposure value representations over the entire value set using a preset logarithmic function. If you understood that sentence and the implications, you probably don’t need to read the rest of this article. So, for the rest of us who aren’t as familiar with the geek language I just spewed forth, what does this mean in plain English? Let’s have a deeper look.

The Basics

"The problem arises with the realization that the exposure values with which we measure light are not linear."

To understand log recording, we have to observe how video information is traditionally encoded on most common camcorders, DSLRs, mirrorless cameras, and even cell phones. Light is focused by your camera’s lens onto your camera’s image sensor. The sensor then translates the amount of light hitting every individual pixel into an electric voltage. More light equals higher voltage output from the sensor. The camera’s A/D (analog to digital) converters translate those voltages into digital exposure values, which get encoded and compressed into the video file that’s recorded onto the camera’s memory. Now here’s where things can get a little complicated, so bear with me. (For the sake of simplicity, I won’t be discussing raw video recording and the debayering process here, since it has its own logarithmic properties.) If your video—like most video—is not recorded using a log picture profile, chances are the exposure is being recorded in a linear fashion. Video that is recorded or encoded this way looks nice on your average computer monitor/television and will have a good amount of visible contrast from the blacks to whites. This means that with little or no processing, that video will look reasonably good on almost any display device, provided that the exposure and white balance settings were correct while recording was taking place.

Who Cares About Log?

So, if your video already works for almost any screen with no extra effort involved, who cares about log? Well, recording video using a linear picture profile is fine for many situations; however, it is not without some serious limitations. To understand these limitations, let’s refer back to the camera imaging process I discussed above, particularly the last bit regarding the A/D conversion of the voltage coming from the sensor. It is in this crucial step that a picture profile—also known as an exposure curve—can be applied. A linear recording is called linear because no exposure curve is applied at all. The problem arises with the realization that the exposure values with which we measure light are not linear. An exposure “stop” represents a doubling or halving of the actual light level, not an increase by some arbitrary linear value on a scale. You could, in fact, say exposure values are themselves logarithmic!

An Even Closer Look

If the dichotomy has not yet presented itself, let’s delve a little further. In an 8-bit binary video file, like those recorded by most consumer and prosumer gear, there are 256 (28) possible exposure representations available across the entire spectrum, starting from absolute black to super white. Pixels that are absolute black (no exposure recorded) are given the lowest value of 0. Super-white pixels (think blown-out highlights) are given the highest value of 255. Everything else occupies the 254 values in between. So, working backward, using the camera example: in a linear recording, the voltages coming from each pixel off the camera’s sensor are assigned one of those 256 values, based on voltage level, which is determined by the actual exposure level of the image focused by the lens. Now, since exposure values are logarithmic, the voltage levels being output by the sensor to the A/D converter reflect that. And when those voltages arrive at the A/D converter, it records them using a linear function. The downside is that this method top-loads the 256 values, and the dynamic range won’t be equally represented across the 8 bits. It’s a little easier to understand visually, so take a look at the graph below.

 

The X axis shows a hypothetical image’s entire exposure range split into 8 values. For the sake of simplicity, let’s refer to this image as having 8 stops of dynamic range (regardless of the dynamic range of your camera, this principle should remain the same). The Y axis shows the assigned value of a given brightness relative to each of the 8 bits; hence, the values are expressed as binary exponents. With a linear recording, the points showing where each of the stops is represented on this scale form a straight line, going from 0 all the way to 255. But wait. Look at the numerical difference between stops 7 and 8. That one stop gets a whole 128 bits of representation, half of the entire bit depth of the image! The stop below that gets 64 bits, and the stop below that is rationed just 32 bits, and so forth. This leaves the lower four stops (half) of the exposure range, where all the shadow information in your images lies, with just a quarter of the entire bit depth of your image. What if you want to recover or boost your shadows during grading? Good luck. It will just become a mess. The problem is twofold, because if you overexpose your image to compensate for this top-loading and get details in those shadow areas, almost half of your bit depth is being dedicated toward highlights that are getting blown out. Log recording aims to solve all of this.

The Solution

Log recording to the rescue! Now that we understand standard linear recording, it will be easier to understand how log recording works. Going back, yet again, to your camera’s A/D conversion—instead of the A/D converter linearly assigning values, thus giving the previous graph a straight line, it applies a curve to the exposure before the image is compressed and recorded. This curve shifts the lower and middle parts of the dynamic range into the upper part of the dynamic range, where most of the bit depth is dedicated. If a log image were to be plotted on a graph, it would look something like this.

 

This shift has the obvious side effect of washing out the image when viewed on a conventional monitor. Have a look at these frame grabs below.

 

Linear low imageS-log2 image

Both of these frame grabs are from files recorded by my Sony α7S. Both were recorded at the same time of day using the Zeiss Loxia 35mm f/2 set to f/22. The image on the left was recorded with a linear picture style at ISO 400, and the image on the right was recorded using the S-Log2 exposure curve, set to the lowest ISO possible, 3200. I used the zebras to ensure that the images were just short of clipping in the highlights. Notice how much flatter the S-Log2 image is. Unfortunately, it was a relatively flat day out, so the effect is not quite as pronounced as I would have liked it to be. Regardless, the linear image has almost no shadow information. Looking under the deck, the linear recording is basically black, and you can barely make out the wood patterns and the wheelbarrow.  The S-Log2 recording has clearly defined the wood patterns, as well as the wheelbarrow. Now that you have that detail to work with, you can create an image with superior gradation and details in the shadows, all without clipping your highlights. But to do this, you need to add the extra step of color grading. So I went into my NLE and I graded the S-Log2 file. Compare images again. This time, the image on the right is a roughly graded S-Log2. The image on the left is identical to the left image above.

 

Linear low imageGraded S-Log2 image

The graded S-Log2 image has far superior gradation in the shadows when compared to the linear image, courtesy of the redistributed exposure values. Now, grading log footage takes practice, and while I have had some experience shooting in various forms of log, I am by no means a professional colorist. Someone who does color correction and grading for a living can really take log-encoded images and work some serious magic with them. Perhaps, ironically, the process done in post production, in effect, hammers out the curve in the log footage to make it more linear.

Back to Reality

While log recording grants more flexibility, it is not without any caveats. Yes, log footage is flexible, but that fact does not endow you with the freedom to be lazy and not check your exposure. On the contrary, you have to be even more careful with your exposure, especially if you’re checking it on an uncorrected monitor. Some monitors can use what are called LUTs (Lookup Tables) to compensate for the log curve and present a linear-like image that’s not washed out. Many colorists also use LUTs as a starting point for grading log footage. A monitor that supports LUTs, like the SmallHD 500 and 700 series monitors, can be invaluable on set when shooting log footage. Not only will it keep your exposures consistent, but it will keep your client from wondering why your image looks so washed out. Monitors with scopes—i.e., waveforms and histograms—are also handy in these situations, allowing you to accurately assess clipping highlights and proper exposure. Since every different type of log has its own curve, separate LUTs are needed for each brand of log with which you wish to shoot.

While we touched on the subject to a degree, it doesn’t hurt to reiterate that anything recorded in log will require a grading step for the footage to be presentable. If you want to get to know your way around grading log footage, try out Blackmagic Design’s DaVinci Resolve software (which is also a swell editing system). The standard version, which has most of the functionality of the full Resolve Studio, is available for free from the Blackmagic Design Website. It doesn’t get much better than that, but color grading plug-ins, such as Red Giant’s Magic Bullet Suite and FilmConvert (a personal favorite of mine) are other options that work inside most other NLEs like Adobe Premiere, Avid Media Composer, and Final Cut Pro X, are also on the rise. They are easy to use, and can achieve great results without round-tripping your footage to separate grading software. In the end, it’s up to you. Log footage is flexible, so it’s all about how you want to process it.

Choices down the Line

Now, to bring it all home. It’s easy to understand why log was initially only implemented on the top cameras such as the Sony F35 and ARRI ALEXA. It’s a professional tool that has slowly trickled down into prosumer gear. This is a major boon for us filmmakers because it grants the flexibility we require to put the best possible images into our motion pictures. Even provided that most of our cameras record to heavily compressed codecs like H.264, log helps us maximize the data that is recorded. Sure, it requires a little more effort during production and in post production, but hey, sometimes a little extra effort gets you that much closer to the art form that you are practicing and makes it much more your own. Log is all about choices down the line, so go ahead, grab your camera and give log recording a whirl.

bottom of page