Welcome to our community

Be a part of something great, join today!

  • Hey all, just changed over the backend after 15 years I figured time to give it a bit of an update, its probably gonna be a bit weird for most of you and i am sure there is a few bugs to work out but it should kinda work the same as before... hopefully :)

Bit depth, resurrected

combatentropy

Banned
Joined
Apr 22, 2007
Messages
139
Reaction score
0
Points
0
Website
www.combatentropy.com
Warning: This is a long, technical post that means something only to cases like me who often (1) shoot at around ISO 2000, for dimly lit documentaries, and yet (2) want to edit the image in post into a high-contrast, film-like picture.

Summary: I petiition that a Red Two has a 16-bit analog-to-digital converter, as opposed to the Red One's 12-bit.

Here's why . . .

A week or so ago, someone asked whether a camera with 16 bits had any practical advantage over the Red, which uses 12 bits. I chimed in that 12 bits was plenty. The human eye is only about 8 or 9 bits, so, not only is 12 bits enough, but it gives room to play with.

We said that not only is it enough for the human eye, but it is enough to fully capture the dynamic range of the sensor, which last reported was just under 12 f-stops. We have said that 12 bits covers a sensor with 12 f-stops of range. If you had a 10-f-stop sensor, 10 bits is enough. If you had a 16-f-stop sensor, you need 16 bits -- at least to capture it perfectly. It's so easy to remember: one bit for every f-stop. Such a simple formula, it's no wonder it caught on so easily.

Then I read this article: http://www.normankoren.com/digital_tonality.html#Human_vision. It debunks the simple maxim that you just need as many bits as you have f-stops of dynamic range.

Here's how I understand the basics (Correct me if I'm wrong)

A digital camera can be split into two pieces: (1) an image sensor, and (2) an analog-to-digital converter. (There is also of course a lens and a recorder, but by "digital camera" let's just think of the utterly basic parts of the box between the lens and any recording medium.)

Image Sensor
The image sensor is the "chip." In the case of the Red, it is the part with the specification "4520 x 2540." It is that flat rectangle that is divided into 12 million little squares. Like a solar panel, its job is to convert light into electricity. You all by now know the part of the camera I'm talking about.

Analog-to-digital converter
As many of you realize, when the image sensor converts light into electricity, those little electrical voltages are analog. Fie! Analog! Be gone, you insufferable relic from the 1980's! To the relief of us all, this is where the analog-to-digital converter quickly takes over, and dispenses with that nasty analog signal.

As you might guess, an analog-to-digital converter converts analog signals to, uh, digits. Twenty-four times a second (if you're shooting 24 frames per second) the ADC calls on each of the 12 million photodiodes in the image sensor.

EXAMPLE:

Analog-to-digital converter: "Hey, pixel 10,768,282. What's your reading?"
Pixel: Uh, right now I'm holding 2,304 photons. So that's about 0.234 volts. And why am I just a number to you? My name is "Larry."
Analog-to-digital converter: "Shut up, and drop those photons. And now start catching them again. I'll be coming back around again in 1/24 of a second to see how many you've got this time . . . .(to himself) Let's see, let's see 0.234 volts on my little chart here is, hmm . . . 812! (to pixel) Okay, pixel 10,768,232, I'm marking you down as "812." (to next pixel) Okay, pixel 10,768,233, what's your reading . . ."

In the above scenario, which plays out millions of times a second, and is very boring, you saw that the ADC gave a certain pixel a value of 812. For each frame, each of the 12 million pixels is given a number. This is the analog-to-digital conversion.

12 bits or 14 bits or 16 bits refers to how high the ADC can count. 12 bits means it can count to 4,096 (2 to the 12th power). And 16 bits means it can count to 65,536 (2 to the 16th power). When the projector gets a hold of it, "0" is black. And the highest number -- in our case "4096" -- will be pure white. All the numbers in between are shades. So, a 12-bit ADC can render 4,096 shades. That's enough isn't it? Especially when you consider this fact, that the human eye can discern only, even in ideal circumstances, about 70 shades per f-stop. And we've got . . . let's see, 4,096 divided by the 11 or 12 f-stops (let's round to 12) reported by the Red team is . . . 341 shades per f-stop. Plenty.

This is where I got it wrong, because -- as some of you understand -- the shades are not evenly distributed across f-stops. In fact, they are grossly unevenly distributed, worse than the wealth in New York City.

The ADC spends its digits like the prodigal son spent his inheritance. Let's say a pixel overflows at 4.096 volts (I have no idea what the real number is, not being an electrical engineer, so I am greatly simplifying for illustration). This is as white as it gets. So the ADC, in his little chart, maps 4.096 volts to his highest number, "4,096." Zero volts is, like, no light at all, so he maps 0 volts to the digital value "0". Every voltage in between maps to some number in between. As you can see I made it very clean. 4.095 volts maps to the number 4,095. 4.094 volts maps to 4,094. 2.048 volts maps to 2,048, right smack in the middle.

(It is here I see I've made a mistake. A 12-bit ADC can count only to 4,095, if it starts at 0, not 1. "0" counts as one of its 4,096 numbers, leaving only 4,095 left. This doesn't affect the point of my illustration, though.)

Anyway, if we're at the number 2,048, we should also be in the middle (the fifth or sixth f-stop) in our 12-stops, right? Wrong. When the ADC has counted down to 2,048, he's only down from pure white by one f-stop. There are 11 f-stops to go, and he's already used half of his bits!

Why? Because the ADC maps volts to digits in a linear way, while f-stops are exponential, not linear. One f-stop is twice as bright, twice as much voltage. Two f-stops is four times as much voltage. Three f-stops is eight times the voltage. Four f-stops is 16 times the voltage.

Things start to improve, however. Because of the linear-to-logarithmic relationship, the ADC only uses one quarter -- instead of half -- of his bits for the next f-stop down. And for the third f-stop down, he spreads only another eighth (512 values) of his palette across it.

Here's how it all maps out.

Code:
F-stop    Digital value
--------+--------------
12        4,096
11        2,048
10        1,024
 9          512
 8          256
 7          128
 6           64
 5           32
 4           16
 3            8
 2            4
 1            2

So, the brighter regions, like f-stop 12 and 11, have thousands of shades -- well beyond the human threshold of about 70. At worst, we're just wasting some bandwidth.

But at the darker areas, we're way below 70, even so far as to single digits. For the area of the picture at the darkest f-stop, we have only three shades (0, 1, and 2).

Now, I said 70 is the human ability in ideal circumstances: like if you were looking at a picture with only one f-stop of brightness range. In a picture with several stops of brightness range, that number gets smaller, like 30. And in dark areas it's a little less, like maybe 15 is acceptable. Still, 8 or 4 shades for the darker areas is pushing a little for me, especially if I'm going to be boosting the whole picture two to four f-stops.

That is why I propose the ADC have 16 bits instead of 12. Then, the lower f-stops would be:

Code:
F-stop    Digital value
--------+--------------
 4            64
 3            32
 2            16
 1             8

The lowest f-stop has only 8 shades, but at least the next one up has 16.

At this point, some of you might be thinking, "Yeah, but even if we finally got 16 bits, that will quadruple the bandwidth of the whole thing, and we would need four times the storage."

That's what's so great about 10-bit log. 10-bit log (correct me if I'm wrong, I may be misunderstanding this) records the values evenly, as you might have guessed in the first place. Even though 10 bits is only 1,024 shades, they are evenly distributed into chunks of 85 steps (1,024/12 = 85).
Code:
F-stop    Digital value
--------+--------------
12        1,024
11          939
10          853
 9          768
 8          683
 7          598
 6          512
 5          427
 4          342
 3          256
 2          171
 1           85

The brighter f-stops get a lot of shades thrown out. F-stop 12 goes from 2,048 shades to only 85. But 85 is still higher than the human eye. In fact, all of the f-stops still retain shades well above the threshold of the human eye.

10-bit log is so efficient, it may surprise you that the 10-bit log "unrolled" or "linearized" isn't 12-bit or even 14-bit but 19-bit!

Summary
I suggest a 16-bit ADC and immediately rolling that up into a 10-bit logarithmic space (still RAW though, the Bayer not interpolated into RGB yet) before recording.

I am not a chip designer. This is just what I've come to after studying the subject of bit depth and dynamic range over the past few days. My math, or understanding of the matter, may be wrong.

And this probably is not an issue for people shooting movies with -- yes -- lighting, so you don't have to dig into those darker f-stops. There is also the issue of gamma conversion, which is always a step in the process, that helps even out the shades.
 
Considering the 12 bit image is linear. I'm going to assume the voltage running through the ADC is already giving an even response somehow. Just a guess based on my observations of footage released.

Also Graeme has said on several occasions that the signal comming off the chip is linear.

However it is very interesting. Any signal analysis electrical engineers out there? Graeme?
 
The thing to consider is not only the resolution of the quantizer, but the nature of the signals being quantized and the allocation of resources necessary to accomplish the task. If your analog signal has a S/N ratio that doesn't justify a higher resolution quantizer, you are wasting resources and not increasing the resolution by an arbitrary increase in the bit depth. The increased bandwidth requirements impact several things in the post quantizer chain in a number of potentially negative ways.

First, just the pure burden that greater depth places on the overall data chain is worth considering. With finite processing power, increased bit depth will reduce the available frame rate. Secondly, when you look at compression, uncorrelated noise (as might result from having bit depths not justified by the imagers) doesn't compress to the same degree and again, with limited processing resources, reduces the quality of the actual (non noise) portion of the signal due to the available bandwidth being mis-allocated to unnecessary bit depth.

This isn't to say that the RED ONE might not benefit from an increase to the bit depth, but I would be very surprised to learn that more than 1 or 2 more bits would be necessary for a high speed CCD imager of any design.
 
Is this the longest single post yet on reduser...? anyway I think the issue is more complicated than just the eye having a log-response and the sensor starting out linear. For one thing, any post-processing you do on the image can shift things around- so what started out as "negligible" brightness differences may no longer be so. If you have perfect A/Ds, endless DC power available, unlimited processing speed and endless storage space, you might as well increase the bit depth, but meanwhile here in the real world....
 
Combatentropy,

Your post held my interest more than a kid reading Harry Potter. But I'm wondering, will not the new ISO parameters announced recently take care of your needs for low light shooting?
 
There is very little point in having an A-to-D sampling at a higher bit depth than the noise levels of the sensor demand. Doing so means you're just recording noise "more accurately" (in other words, wasting bits) and you've just made:

a) the camera cost twice the price,
b) compression work harder
c) higher data rate

and what have you got - more accurate noise.

Graeme
 
There is very little point in having an A-to-D sampling at a higher bit depth than the noise levels of the sensor demand. Doing so means you're just recording noise "more accurately" (in other words, wasting bits) and you've just made:

a) the camera cost twice the price,
b) compression work harder
c) higher data rate

and what have you got - more accurate noise.

Graeme

If the sensor is upgradeable/replaceable in future to one that has a higher dynamic range, will it be possible to have a 16 bit version of redcode...? or, umm... a 16 bit version of whatever the hell you guys are talking about... analog-to-digital converter thingy. With thingymubobs on top.

Cheers,
R.
 
There is very little point in having an A-to-D sampling at a higher bit depth than the noise levels of the sensor demand. Doing so means you're just recording noise "more accurately" (in other words, wasting bits) and you've just made:

a) the camera cost twice the price,
b) compression work harder
c) higher data rate

and what have you got - more accurate noise.

Graeme

It appears that we concur. I fight the same sort of "thinking" in my line of engineering (quantizer designs for high resolution audio applications). I often get asked when we will make the "jump" to 32 bit (and even above) quantizers. I just laugh.
 
Everything is possible. However, as above, it's always a series of compromises - speed, power, time, money etc.

Graeme
 
16 bits v's RED

16 bits v's RED

Wonderful stuff. But the proof of the optimal engineering path is in the delivered images.
 
As a frequent low light shooter I would welcome more bits for the blacks/shadows.

I welcome 10/12bit 4k recording infact I'm rather looking forward to it but...

How will the REDCODE codec hold up those bits/details in the blacks/shadows?

I know we've seen high ISO ratings but only in still images what's the moving pic going to be like? What are the codec+bit depth going to look like moving on screen?

Anyway... I would like more bits in the blacks. Yes I know all about S/N ratios of the detectors and recording noise and all that but I would rather have random noise than quantizing anyday. I hate contouring bands more than noise, much more! Random (like white noise) noise is something the eye and brain can see through contouring is a pattern that draws the eye (like codec artifacts).

What's more one can gate detector noise (in the blacks) if it's unwanted!

Though all this is really academic as it's more of an issue for RED 2.

So what's the verdict on the best rate for recoding in low-light using RED,
10bit log or 12bit linear?

JohnF
 
Well since the RED is digital instead of photochemical, the sensor's output is linear [analog]. It's linear in the true sense, not linear in that nonlinear way [i.e. video gamma, which many people mistakenly interpret as linear]. What better way to capture linear data than in a linear space? Capturing in log from a linear sensor has always seemed funny to me.
 
Anyway... I would like more bits in the blacks. Yes I know all about S/N ratios of the detectors and recording noise and all that but I would rather have random noise than quantizing anyday. I hate contouring bands more than noise, much more! Random (like white noise) noise is something the eye and brain can see through contouring is a pattern that draws the eye (like codec artifacts).
JohnF

... solve it the same way CGI has solved it for thousands... err a dozen or so years. Add noise in post.

You'll never see a noise free motion graphics project. Why? Because it bands terribly! There is always a .5-1% noise added on top to dither the luminance and chroma.

"Shoot Clean" that's the digital motto.
 
What we really need to hope for (i think, as i am ALSO not an electrical engineer), is more efficient semi-conductors that loose less information to heat. That way, when a pixel tells the A-D converter "I have 129 photos", the converter can be sure that it doesn't mean 130, 128, or 127 (or even 121). In this way, it would be appropriate to assign 14 or 16 bits to the signal to describe it, as those low low levels would convey more accurate information.
 
Information is not "...lost to heat"; rather thermal noise (but one of many types of noise) is present in all things operating at any temperature above absolute zero. Since the signal and the noise are both present at the input to the quantizer, without applying averaging over numerous accumulation cycles, there is little that can be done to differentiate the noise from the signal. So, you end up quantizing (assigning a numeric value) mostly noise in the bottom bits of any sampled system. There are also issues of settling accuracy of the analog circuitry as well as speed vs. bit accuracy for different conversion approaches (flash, successive approximation, delta-sigma, etc.).

A single cycle flash converter accurate to 16 bits requires 2^16 comparators, which even with the most sophisticated topology available this is far from a trivial task. Add to that the number of photoreceiptor sites that need to be quantized and the task quickly becomes enormous. If the system (as a whole) exhibits anywhere near a 1 lsb noise floor in a 12 bit system, I don't think anyone will have anything to complain about nor would they likely realize an improvement if exceeded.

If more processing power becomes available, give me a higher frame rate, that is something that I can put to use.
 
A couple of people say that 16 bits would be a waste, because after a certain point, you are recording noise:

There is very little point in having an A-to-D sampling at a higher bit depth than the noise levels of the sensor demand. Doing so means you're just recording noise "more accurately"

and

khmuse said:
If your analog signal has a S/N ratio that doesn't justify a higher resolution quantizer, you are wasting resources

But something doesn't jive, at least to me: If Red says its signal-to-noise ratio is low enough to unearth almost 12 F-stops, then I'm assuming that the darkest F-stop is clean enough that you can see more than three shades there (which is all that 12 bits leaves you at that point).

Maybe I'm being too picky, and I must say, in those ISO 3200 screen grabs that Red so generously posted, I saw noise before I saw any banding -- which is the artifact I'm concerned about here.

The next Canon high-end DSLR (Mark III) is rumored to have a 16-bit ADC. The current one already has a 14-bit. I was thinking a 16-bit ADC, then, might be a reasonable feature for Red Two.

But I feel bad even talking about Red Two, when I am sure the Red Team is working very hard just to get the Red One out the door. So, Red team, all I can say is, bravo! Amidst all our whining about this little thing and that little thing, we are not telling you all the things we like about the Red One. Whenever you read a post like mine, just chalk it up to, for lack of a better term, oh-so-close-ism. Like, "Tommy, you ran the mile in 3.5 minutes. You're not only the fastest runner on your team, you set an all-time record for our high school. In fact, you have the best time ever for the whole state. But you're oh so close to making the national record. You just have to shave off two more seconds!"

Red has beaten all video cameras, many still cameras, and even 35mm movie cameras in most respects. But it's oh-so-close to being everybody's dream camera, we just want to help you along those last few inches. ;) Please, accept our gratitude for offering a superb product at a good price.
 
As you said yourself in the original post, the sensor is linear. So your numerical charts are inaccurate and the sensor does work how you would expect it to with the steps allocated evenly across the entire range. That's why a RAW image looks funny and needs to be converted to a logarithmic scale to look correct.

http://www.dpreview.com/learn/?/key=sensor+linearity
 
...Like, "Tommy, you ran the mile in 3.5 minutes. You're not only the fastest runner on your team, you set an all-time record for our high school. In fact, you have the best time ever for the whole state. But you're oh so close to making the national record. You just have to shave off two more seconds!"

Now it is much clearer why there seems to be a disconnect in the understanding of these concepts. It appears to be an understanding (or lack of) the underlying math.

There is a massive difference between an analog system (like your track time analogy) and a binary (base 2) digital system. Here you are asking "Tommy" to improve his performance by 2 seconds from a 210 second event, or about a 1% improvement (seems reasonable).

In the case of a digital system, you are arguing going from 12 to 16 bits, this is considerably different, in fact its a 1600% change! When you go from any bit depth to the next bit depth, you are asking for a 100% change (a 12 bit noise floor is 1 part in 4096) an improvement to 13 bit performance requires a 2:1 change (as this is the nature of a base 2 system) or in this case 1 part in 8192. To go all the way to 16 bit performance, its 1 part in 65,536.

Imagine the difference if your bank account was expressed in base 2. Say you have $65,536 available (2^16). Now I am going to reduce your bank balance by just 1 bit, doesn't seem like much, until you convert it to base 10, your bank account has now been reduced to $32,768.

So whenever you think about "a little bit" better, keep in mind that this is an analog concept, it isn't the same as a 'bit' in a base 2 number system at all.
 
A couple of people say that 16 bits would be a waste, because after a certain point, you are recording noise:



and



But something doesn't jive, at least to me: If Red says its signal-to-noise ratio is low enough to unearth almost 12 F-stops, then I'm assuming that the darkest F-stop is clean enough that you can see more than three shades there (which is all that 12 bits leaves you at that point).

Maybe I'm being too picky, and I must say, in those ISO 3200 screen grabs that Red so generously posted, I saw noise before I saw any banding -- which is the artifact I'm concerned about here.

The next Canon high-end DSLR (Mark III) is rumored to have a 16-bit ADC. The current one already has a 14-bit. I was thinking a 16-bit ADC, then, might be a reasonable feature for Red Two.

But I feel bad even talking about Red Two, when I am sure the Red Team is working very hard just to get the Red One out the door. So, Red team, all I can say is, bravo! Amidst all our whining about this little thing and that little thing, we are not telling you all the things we like about the Red One. Whenever you read a post like mine, just chalk it up to, for lack of a better term, oh-so-close-ism. Like, "Tommy, you ran the mile in 3.5 minutes. You're not only the fastest runner on your team, you set an all-time record for our high school. In fact, you have the best time ever for the whole state. But you're oh so close to making the national record. You just have to shave off two more seconds!"

Red has beaten all video cameras, many still cameras, and even 35mm movie cameras in most respects. But it's oh-so-close to being everybody's dream camera, we just want to help you along those last few inches. ;) Please, accept our gratitude for offering a superb product at a good price.

Hi, just wanted to say, a very nice thread, interesting read. I hoped only my teachers in school did explain things like you did.

P.
 
Back
Top