Slugline. Simple, elegant screenwriting.

Red Giant Color Suite, with Magic Bullet Looks 2.5 and Colorista II

  • Sony Alpha a7S Compact Interchangeable Lens Digital Camera
    Sony Alpha a7S Compact Interchangeable Lens Digital Camera
  • Panasonic LUMIX DMC-GH4KBODY 16.05MP Digital Single Lens Mirrorless Camera with 4K Cinematic Video (Body Only)
    Panasonic LUMIX DMC-GH4KBODY 16.05MP Digital Single Lens Mirrorless Camera with 4K Cinematic Video (Body Only)
  • TASCAM DR-100mkII 2-Channel Portable Digital Recorder
    TASCAM DR-100mkII 2-Channel Portable Digital Recorder
  • The DV Rebel's Guide: An All-Digital Approach to Making Killer Action Movies on the Cheap (Peachpit)
    The DV Rebel's Guide: An All-Digital Approach to Making Killer Action Movies on the Cheap (Peachpit)
    by Stu Maschwitz

log is the new lin

This the the Kodak DLAD image (Marcie) in log space, right?

This is the same image, linearized. Right?

Wrong, on both counts.

There are many misconceptions about Cineon files and the color spaces known colloquially as log and linear. The first is that Cineon files are stored in a log color space. It’s not that this is entirely false, it’s just that it’s not that simple. The pixel values in a Cineon file are represent dye densities on color negative film, and the relationships of these density measurements from one step to the next on the 10-bit scale are the same.

So while we say all the time that the Marcie Cineon file is “log,” what we really mean is that it is in Kodak's Cineon 10-bit encoding of negative densities as seen by the print stock. OK, so maybe I was being over dramatic when I said you were wrong earlier. That’s cool—let’s keep using the term log to describe Cineons, since the densities themselves are in fact logarithmic.

The problem is really with the second image. Many people freely use the term linear to describe images that look correct on their ≈g2.2 monitors. It’s particularly easy to fall into this trap when you are invited by your software to perform a “Log to Linear” conversion on a Cineon file. The standard practice is to use a Cineon conversion gamma equivalent to your monitor gamma and describe the results as linearized. But in truth, the results are gamma-encoded, as any image must be to look correct on a ≈g2.2 display, and are therefor not linear in the least.

As you can see here, a log curve and the gamma 2.2 curve are actually very similar. Gamma 2.2 images (which likely comprise the vast majority of digital images) actually bear more in common with log images than with linear ones. Logarithmic encoding and gamma encoding are both methods of distributing values perceptually, allowing them to be stored at reduced bit depths and to look correct on non-linear displays.

So it would be better to say that we converted the “log” Marcie above to “another kind of log-ish space” than to say that we made her linear. The eLin/ProLost/brave new future term wold be not log, not lin, but vid (like we talked about here).

“But Marcie looks all washed out in the log image and not in the second one (that I still desperately want to call linear).”

OK, I knew you were going to say that. Check this out. Here’s the log Marcie with all the values below 95 and above 685 clipped. Other than that, no color space change:

She's still “log” — all we've done is perform the clipping that happens in a standard Cineon conversion. Looks pretty darn similar to the second image at the top of the article, right?

So log Marcie is more like vid Marcie than linear Marcie. Linear Marcie is too dark to look at, but is the best Marcie for doing image processing operations on. Raw Cineon files look washed out because they contain so much headroom, not because they're log.

So repeat after me: Log is kinda like vid, and vid is not linear!

Reader Comments (7)

I'd just like to thank you Stu for sharing the knowledge. You've made a big difference in my work and increased my understanding of stuff I really should have known a few years ago. So, thanks.


May 16, 2005 | Unregistered CommenterJoe

Thanks Joe, that means a lot!

May 17, 2005 | Unregistered CommenterStu

I second that.
I check back here every now and then and I always find nice little articles. These about log-lin are very helpful for me. I mostly work on SD and HD video material. This info make me feel more confident on those rare occations when I do get to work on film-scans.

May 18, 2005 | Unregistered CommenterMartin

Thanks very much Stu. It is a great to hear these things clarified by soemone who really understands them. Sharing knowledge for the sake of the whole user comunity is the best contribution someone can make.

March 19, 2006 | Unregistered CommenterAnonymous

Great post Stu,

So for practical real linear compositing, I should eliminate the Log/Gamma correction & do all operations in linear & add a viewing LUT/Adjusment layer (AE land)with a Gamma correction on top ??

January 6, 2008 | Unregistered Commentergindin

Gindin, try" REL="nofollow">this post for more of a description of the workflow.

January 6, 2008 | Unregistered CommenterStu

Always have much more to learn before understanding this kind of thing so... here I go
Currently I'm trying to precompose my mind into the concepts this guy drop's... I hope I step the right way.

If that can help someoen... GREAT: Stu chek it... but I don't think you can learn nothing new from this actually... but I and a bunch of people maybe.
This Guy is great, also chekc that post here:

Straight from my own private library

July 24, 2010 | Unregistered CommenterThe Guy
Comments Disabled
Sorry, comments are disabled temporarily while I tweak some stuff.
« Three Way Color Corrector in After Effects | Main | much better »