Jump to content


Photo

Let's talk about linear to log, A-to-D in digital cameras

linear log ADC alexa red sony cineform raw digital camera panalog

  • Please log in to reply
104 replies to this topic

#1 Charles Zuzak

Charles Zuzak
  • Basic Members
  • PipPip
  • 74 posts
  • Other
  • Pittsburgh, PA

Posted 27 June 2013 - 10:33 PM

Digital cameras can do some amazing things nowadays considering where they were just even five years ago.  One thing I sometimes struggle to understand is how these newer cameras with 13+ stops of dynamic range are actually quantizing that information in the camera body.

 

One thing we know from linear A-to-D quantization is that your dynamic range is a function of the number of bits of the converter chip.  A 14-bit ADC can store, at best (and ignoring noise for the moment), 14 stops of dynamic range.  However, when we do introduce noise into the mix (sensor, transfer charge, ADC, etc.) and linearity errors, there really isn't 14 meaningful stops of dynamic range.  I did a lot of research on pipeline ADCs (which I believe are the correct type used) and the best one I could find, as defined by the measured ENOB (effective number of bits), was the 16-bit ADS5560 ADC from Texas Instruments; it measured an impressive 13.5 bits.

 

If most modern cameras, Alexa especially, are using 14-bit ADCs, how are they deriving 14 stops of dynamic range?  I read that the Alexa has some dual gain architecture, but how do you simultaneously apply different gain settings to an incoming voltage without distorting the signal?  A pretty good read through regarding this technology can be found at this Andor Technology Learning Academy article.  Call me a little skeptical if you will.

 

Not to pick on RED, but for the longest time, they advertised the Mysterium-X sensor as having 13.5 stops (by their own testing).  Of course, many of the first sensors were used in RED One bodies, which only have 12-bit ADCs.  Given that fact, how were they measuring 13.5 in the real world?

 

Now, with respect to linear to log coding, some cameras are opting for this type of conversion before storing the data on memory cards; the Alexa and cameras that use Cineform RAW come to mind.  If logarithmic coding is understood to mean that each stop gets an equal number of values, aren't the camera processors (FPGA/ASIC) merely interpolating data like crazy in the low end? 

 

Let's compare one 14-stop camera that stores data linearly and one that stores data logarithmically:

 

In a 14-bit ADC camera, the brightest stop is represented by 8192 code values (16383-8192), the next brighest is represented by 4096 code values (8191-4096), and so on and so forth.  The darkest stop (-13 below) is only represented by 2 values (1 or 0).  That's not a lot of information to work with.

 

Meanwhile, on our other camera, 14-stops would each get ~73 code values (2^10 = 1024 then divided equally by 14) if we assume there is a 14-bit to 10-bit linear-to-log transform.  As you can see here, the brighter stops are more efficiently coded because we don't need ~8000 values to see a difference, but the low end gets an excess of code values when there weren't very many to begin with.

 

So I guess my question is, is it better to do straight linear A-to-D coding off the sensor and do logarithmic operations at a later time or is it better to do logarithmic conversion in camera to save bandwidth when recording to memory cards?

 

Panavision's solution, Panalog, can show the relationship between linear light values and logarithmic values after conversion in this graph:

 

panalog.png

 

On a slightly related note, why do digital camera ADCs have a linear response in the first place?  Why can't someone engineer one with a logarithmic response to light like film?  The closest thing I've read about is the hybrid LINLOG Technology at Photon Focus which seems like a rather hackneyed approach.

 

If any engineers want to hop in here, I'd be much obliged--or if your name is Alan Lasky, Phil Rhodes, or John Sprung; that is, anyone with a history of technical knowledge on display here.

 

Thanks.


Edited by Charles Zuzak, 27 June 2013 - 10:36 PM.

  • 0

#2 Alessandro Machi

Alessandro Machi
  • Sustaining Members
  • 3318 posts
  • Other
  • California

Posted 28 June 2013 - 12:04 AM

Technically, the numbers aspect is above my knowledge range, however I have had an editing studio with wave form and vector scope set up for a long time and I have always been challenged by optimizing the lower end IRE/black range. It's amazing to see detail emerge by simply raising the black level just enough without actually fogging the image.

 

I don't have numbers to back me up but I have always felt that not enough data was being allocated to the zero to 10 IRE range. One can take a signal that has 100 IRE and dial it down to 50 IRE and still have a nice image, but if the lower end blacks are off just one or two IRE, tonal qualities within the black spectrum just disappear.


  • 0

#3 Alessandro Machi

Alessandro Machi
  • Sustaining Members
  • 3318 posts
  • Other
  • California

Posted 28 June 2013 - 12:11 AM

Then there are issues of what lens magnification are we talking about, and key light versus back light.  Contrast values for telephoto are different than for wide angle mode, and then add in if the shot is key lit or backlit.  

 

It seems to me that the digital cameras don't do quite as good of a job on back lit, wide angle scenes as film does, especially if there is high contrast in the lighting and in actual colors on the set.  But if the shot is zoomed in, the difference in quality between film and video becomes much less noticeable.


  • 0

#4 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 11936 posts
  • Other

Posted 28 June 2013 - 06:00 AM

One thing we know from linear A-to-D quantization is that your dynamic range is a function of the number of bits of the converter chip.  A 14-bit ADC can store, at best (and ignoring noise for the moment), 14 stops of dynamic range.

 

I'm not quite sure where people get this idea.

 

The dynamic range of the camera is completely unconnected to the bit depth of the ADC. Yes, certainly, the ADC will affect the precision with which the information is stored, and an extremely inadequate ADC might give you less than one code value per stop, but there is nothing stopping anybody quantising 20 stops of dynamic range into an 8-bit image. It might be difficult to use, depending on the gamma function applied, but there is nothing that makes it intrinsically impossible.

 

P


  • 0

#5 Freya Black

Freya Black
  • Basic Members
  • PipPipPipPip
  • 4161 posts
  • Other
  • Went over the edge... Central Europe

Posted 28 June 2013 - 09:18 AM

Phil comes to the rescue of the Red One! ;)

Maybe it can do 13.5 stops after all!

 

Freya


  • 0

#6 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 11936 posts
  • Other

Posted 28 June 2013 - 10:13 AM

I'm sure it can, if you can stand a one-decibel noisefloor! :)


  • 0

#7 Charles Zuzak

Charles Zuzak
  • Basic Members
  • PipPip
  • 74 posts
  • Other
  • Pittsburgh, PA

Posted 28 June 2013 - 10:40 AM

 

I'm not quite sure where people get this idea.

 

The dynamic range of the camera is completely unconnected to the bit depth of the ADC. Yes, certainly, the ADC will affect the precision with which the information is stored, and an extremely inadequate ADC might give you less than one code value per stop, but there is nothing stopping anybody quantising 20 stops of dynamic range into an 8-bit image. It might be difficult to use, depending on the gamma function applied, but there is nothing that makes it intrinsically impossible.

 

P

If we're doing straight linear light capture, the dynamic range of the camera is limited by the number fo bits in the ADC.  If you applied a gamma curve, then you could stretch more stops.


  • 0

#8 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 11936 posts
  • Other

Posted 28 June 2013 - 10:42 AM

What do you mean by "linear light" in that sense?

 

Bear in mind that few practical cameras store literal sensor values.


  • 0

#9 Charles Zuzak

Charles Zuzak
  • Basic Members
  • PipPip
  • 74 posts
  • Other
  • Pittsburgh, PA

Posted 28 June 2013 - 10:54 AM

The camera's sensor captures photons which are mapped at the digital level in a 1:1 function.  Hypothetically speaking, if 1024 photons hit the sensor, the camera records a code value of 1024.  If half that amount of light hits the sensor, it is recorded as 512.

 

http://provideocoali...-simple-version

 

Is this a rhetorical game you're playing?


  • 0

#10 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 11936 posts
  • Other

Posted 28 June 2013 - 11:01 AM

Is this a rhetorical game you're playing?

 

No.

 

The issue is that no sensor works that way, let alone any actual camera. Curves and manipulation are always part of the issue.


  • 0

#11 Charles Zuzak

Charles Zuzak
  • Basic Members
  • PipPip
  • 74 posts
  • Other
  • Pittsburgh, PA

Posted 28 June 2013 - 11:12 AM

 

 

 

No.

 

The issue is that no sensor works that way, let alone any actual camera. Curves and manipulation are always part of the issue.

 

Could you be more specific?  What does RED do?  I've read time after time that they are doing linear light capture and prefer to do all image manipulation in post.  After all, that's what lets them get away with "color science" updates years after the footage has been shot.


  • 0

#12 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 11936 posts
  • Other

Posted 28 June 2013 - 11:40 AM

No sensor has an output that's completely linear to the number of photons that hit it, unless you're willing to consider the additional hardware that's often included on CMOS sensors as "part of the sensor", which you probably shouldn't for the sake of this sort of discussion.

 

But that's not the point. The recording bit depth of a camera does not, in any practical reality, have any effect on the dynamic range of the sensor.


  • 0

#13 Charles Zuzak

Charles Zuzak
  • Basic Members
  • PipPip
  • 74 posts
  • Other
  • Pittsburgh, PA

Posted 28 June 2013 - 11:45 AM

No sensor has an output that's completely linear to the number of photons that hit it, unless you're willing to consider the additional hardware that's often included on CMOS sensors as "part of the sensor", which you probably shouldn't for the sake of this sort of discussion.

 

But that's not the point. The recording bit depth of a camera does not, in any practical reality, have any effect on the dynamic range of the sensor.

 

What about coding the linear data to log?  Aren't you interpolating data in the low IRE end?


  • 0

#14 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 11936 posts
  • Other

Posted 28 June 2013 - 11:46 AM

Possibly, but this is exactly the sort of thing I mean when I talk about processing happening between sensor data and the recording medium.

 

Ultimately, anybody who's got a 14 bit recording medium and a 15 stop camera, and claims that it isn't enough bits, might just not be using them correctly. Which is where gamma encoding (of which log encoding is a subset) comes in.

 

P


  • 0

#15 Charles Zuzak

Charles Zuzak
  • Basic Members
  • PipPip
  • 74 posts
  • Other
  • Pittsburgh, PA

Posted 28 June 2013 - 11:55 AM

Possibly, but this is exactly the sort of thing I mean when I talk about processing happening between sensor data and the recording medium.

 

Ultimately, anybody who's got a 14 bit recording medium and a 15 stop camera, and claims that it isn't enough bits, might just not be using them correctly. Which is where gamma encoding (of which log encoding is a subset) comes in.

 

P

 

I already understood that.  But RED claims to record linear light data to their SSD mags.  All of the looks you can give the camera are just LUT metadata.  If the RED One did 12-bit linear recording, wasn't the Mysterium-X chip hampered?  (I'm not counting applying a LUT and then recording out the HD-SDI port.)

 

How could you design a high-pass and low-pass filter for the incoming voltage to send off to two different ADCs?  Could you have the over 7 stops converted by one ADC and the under 7 stops by another ADC?  By my math, each of the "lowest" stops down would be coded with 128 values of precision, which is enough meaningful data if you did a log transform.


Edited by Charles Zuzak, 28 June 2013 - 11:59 AM.

  • 0

#16 Adrian Sierkowski

Adrian Sierkowski
  • Sustaining Members
  • 7116 posts
  • Cinematographer
  • Los Angeles, Ca

Posted 28 June 2013 - 12:38 PM

I think you are getting a bit wrapped up in marketing language. What RED is trying to say is that NO particular curve is "baked in" to the image, and that they are recording just the sensor data* which you can manipulate in post.
 

However, on the REDs, this sensor data is of course compressed which has it's own set of issues-- but in essence they are just saying "we're giving you what the sensor sees"

 

 

*even this sensor data will have it's own "look," however, based on how the sensor is actually designed; down to things such as what type of dyes they're using on their picture elements, circuitry, how deep their "well" is ect...


  • 0

#17 David Mullen ASC

David Mullen ASC
  • Sustaining Members
  • 19759 posts
  • Cinematographer
  • Los Angeles

Posted 28 June 2013 - 12:46 PM

I'm not sure that with linear light raw that the bit depth has to equal the max stops of exposure recorded, it's an analog to digital conversion after all.


  • 0

#18 Charles Zuzak

Charles Zuzak
  • Basic Members
  • PipPip
  • 74 posts
  • Other
  • Pittsburgh, PA

Posted 28 June 2013 - 12:54 PM

Linear light recording means a doubling the number of photons to double the number of stops recorded.

 

An 8-bit ADC means it can record 256 code values (2^8 = 256).  8 stops of light means there are 8 times when the light intensity has doubled.  Unless we apply a power gamma or log curve prior to quantization, isn't the dynamic range stuck with the bit depth?


  • 0

#19 David Mullen ASC

David Mullen ASC
  • Sustaining Members
  • 19759 posts
  • Cinematographer
  • Los Angeles

Posted 28 June 2013 - 12:59 PM

Why? Isn't it an analog signal coming off of the sensor into the A/D? Why can't you decide how many bits to assign to a level of signal that equals exposure?


  • 0

#20 Charles Zuzak

Charles Zuzak
  • Basic Members
  • PipPip
  • 74 posts
  • Other
  • Pittsburgh, PA

Posted 28 June 2013 - 01:00 PM

Because ADC are linear devices, hence my question as to why there aren't ADC with logarithmic responses.


  • 0



Also tagged with one or more of these keywords: linear, log, ADC, alexa, red, sony, cineform, raw, digital camera, panalog

Gamma Ray Digital Inc

Willys Widgets

Abel Cine

Aerial Filmworks

CineTape

The Slider

Paralinx LLC

Metropolis Post

Technodolly

Tai Audio

Wooden Camera

Ritter Battery

Glidecam

Broadcast Solutions Inc

Rig Wheels Passport

rebotnix Technologies

Media Blackout - Custom Cables and AKS

Visual Products

CineLab

Opal

FJS International, LLC

Wooden Camera

Rig Wheels Passport

The Slider

FJS International, LLC

Gamma Ray Digital Inc

Media Blackout - Custom Cables and AKS

Metropolis Post

Broadcast Solutions Inc

Tai Audio

CineLab

Opal

Glidecam

Visual Products

Willys Widgets

Ritter Battery

Abel Cine

Technodolly

Aerial Filmworks

rebotnix Technologies

CineTape

Paralinx LLC