Tag Archives: range

Why gain is bad for your dynamic range.

One way to reduce the noise in a video camera image is to reduce the cameras gain. One way to increase the brightness of the image is to add gain.

We all know that increasing the gain to lets say +6db will increase noise and generally the reverse holds true when you reduce the gain, the noise typically reduces and this may be helpful if you are going to do a lot of effects work, or just want a clean image.

However in most cases adding or removing gain reduces the cameras dynamic range as it will artificially clip or limit your low key or high key parts of the image. The maximum illumination level that a camera can capture is limited by the sensor or the gamma curves that the camera has. The black level or darkest part of the image is the point where the actual image signal compared to the sensor noise level is high enough to allow you to see some actual picture information (also known as noise floor). So the dynamic range of the camera is normally the range between the sensors noise floor and recording or sensor clipping point.

To maximise the cameras dynamic range the designers will have carefully set the nominal zero db gain point (native ISO) so that the noise floor is at or very close to black and the peak recording level is reached at the point where the sensor itself starts to clip.

The gain of the camera controls the video output and recording level, relative to the sensors signal level. If you use -3db gain you attenuate (reduce) the relative output signal. The highlight handling doesn’t change (governed by the sensor clipping or gamma curve mapping) but your entire image output level gets shifted down in brightness and as a result you will clip off or loose some of your shadow and dark information, so your overall dynamic range is also reduced as you can’t “see” so far into the shadows. Dynamic range is not just highlight handling, it is the entire range from dark to light. 3db is half a stop (6db = 1 stop) so -3db gain reduces the dynamic range by half a stop, reducing the cameras underexposure range without (in most cases) any change to the over exposure range, so overall the total dynamic range is reduced.

When you add gain the reverse happens. Generally how far the sensor can see into the shadows is limited by the sensors noise floor. Add 6db of gain and you will make the darkest parts of the image brighter by 6db, but you will also raise the noise level by the same amount. So while you do end up with brighter shadow details you can’t actually see any more picture information because the noise level has increased by the same amount. At the top end as the brightest sensor output is mapped to the maximum recording level at 0db, when you add gain this pushes the recording level beyond what can be recorded, so you loose 6db off the top end of your recordings because the recordings and output clips 6db earlier. So positive gain maintains the same shadow range but reduces the highlight recording range by 6db.

However you use it gain tends to reduce your dynamic range. Adding gain to cope with poor lighting tends to be the lesser of the two evils as generally if your struggling for light then overexposure and blown out highlights is often the last of your worries.

Negative gain is sometimes used in camera to try to reduce noise, but the reality is that you are loosing dynamic range. Really a better solution would be to expose just a tiny bit brighter and then bring your levels down a bit in post production.

What’s the difference between Latitude and Dynamic Range?

These two words, latitude and dynamic range are often confused and are often used interchangeably.  Sometimes they can be the same thing (although rare), sometimes they may be completely different. So what is the difference and why do you have to be careful to use the right term.

Lets start with dynamic range as this is the simplest to understand. When talking about a digital camera the dynamic range is quite simply the total range from the darkest shadow to the brightest highlight that the camera can resolve in a single shot. To be included in the dynamic range you must be able to discern visually or measure with a scope a brightness change at both ends of the range. So a camera that can resolve 14 stops will be able to shoot a scene with a 14 stop brightness range and show some information from stop 0 to stop 14. It is not just a measure of the cameras highlight handling, it includes both highlights and shadows. One camera may be very low noise, so see very far into the shadows but not be so good with highlights. While another may be noisy, so not able to see so far into the shadows but have excellent highlight handling. Despite these differences both might have the same dynamic range as it is the range we are looking at, not just one end or the other.

One note of caution with published dynamic range figures or measurements is that while you may be able to discern some picture information in those deepest shadows or brightest highlights, just how useable both ends of the range are will depend on just how the camera performs at it’s extremes. It is not uncommon for the darkest stop to be so close to the cameras noise floor that in reality it’s barely useable, but as it can be measured it will be included in the manufacturers dynamic range figures.

This brings us on to latitude because latitude is a measure of just how flexible you can be with your exposure without significantly compromising the finished picture. The latitude will always be less than the cameras dynamic range. With a film camera, the film stock would have a sensitivity value or ISO. You would then use an exposure meter to determine the optimum exposure. The latitude would then be how much can you over expose or under expose and still have an acceptable result. But what is “an acceptable result”? Here is one of the key problems with determining latitude, what some people may find unacceptable others may be happy with so it can be difficult to quantify the exact latitude of a film stock or video camera precisely. However what you can do is determine which cameras have bigger ranges for example camera “A” has a stop more latitude than camera “B” provide you use a consistent “acceptable quality” assesment.

Anyone that’s shot with a traditional ENG or home video camera will know that you really need to get your exposure right to get a decent looking picture. Take a simple interview shot, expose it right and it looks fine. Overexpose by 1 stop and it looks bad, even if you try to grade it it will still look bad. So in this example the camera would have less than 1 stop of over exposure latitude. But if you underexpose a video camera, the picture gets darker, but after a bit of work in post production it may well still look OK. It will depend in most cases on how noisy the picture becomes when you boost the levels in post to brighten the picture. But typically you might be able to go 1 to 1.5 stops under exposed and still have a useable image. So in this case the camera would have 1.5 stops of underexposure latitude. This then gives a total latitude for our hypothetical camera of around 2 to 2.5 stops.

But what of we increase the dynamic range of the camera or have a camera with a very big dynamic range. Does my latitude increase?

Well the answer is maybe. In some cases the latitude may actually decrease. How can that be possible, surely with a bigger dynamic range my latitude must be greater?

Well, unless your shooting linear raw (more on that in a bit) you will be using some kind of gamma curve. The gamma curve is there to allow you to squeeze a large dynamic range into a small amount of data. It does this by mimicking the way we perceive light in a non linear manner and uses less data in highlights which are perceptually less important to us humans. Even uncompressed video normally has a gamma curve. Without a gamma curve the amount of data needed to record a decent looking picture would be huge as every additional stop of dynamic range actually needs twice as much data as the previous to be recorded faithfully.

With cameras with larger dynamic ranges then things such as knee compression or special gamma curves like Hypergamma, Cinegamma or Log are used. The critical thing with all of these is that the only way to squeeze that greater dynamic range into the same size recording bucket is by adding extra compression to the recorded image.

exposure1This compression is normally restricted to the highlights (which are perceptually less important). Highlight compression now presents us with an exposure problem, because if we over expose the shot then the picture won’t look good due to the compression. This means that even though we might have increased the cameras dynamic range (by squeezing and compressing more information into the highlight range) we may have reduced the exposure latitude as any over exposure places important mid range information into the highly compressed part of the gamma curve. So bigger dynamic range does not mean greater latitude, in fact in many cases it means less latitude.

Here’s the thing. Unless you make the recording data bucket significantly bigger (better codec and more bits, 10 bit 12 bit etc), you can’t put more data (dynamic range or stops) into that bucket without it overflowing or without squashing it. Given that most cameras used fixed 8 bit or 10 bit recording there is a finite limit to what can be squeezed into the codec without making some pretty big compromises.

Compression point with Hypergamma/Cinegamma.
Compression point with Hypergamma/Cinegamma.

With a standard gamma curve white is exposed around 90% to 95%, remember a white card only reflects 90% of the light falling on it not 100%. Middle grey perceptually appears half way between black and white so it’s around 40%-45%. Above 90% is where the knee normally acts to compress highlights to squeeze quite a large dynamic range into a very small recording range, so anything above 90% will be very highly compressed, but below 90% we are OK and we can safely use the full range up to 90%. Expose a face below 90% and it will look natural, above 90% it will look washed out, low contrast and generally nasty due to the squeezing together of the contrast and dynamic range.

But what about a Hypergamma or Cinegamma (or any other high dynamic range gamma curve)? Well these don’t have a knee, instead they start to gradually introduce compression much lower down the gamma curve. A little bit at first and then ever increasing amounts as we go up the exposure range. This allows them to squeeze in a much greater dynamic range in a pleasing way (provided you expose right). But this means that we can’t afford to let faces etc go as high as with the standard gamma because if we do they will start to creep in to the highly compressed part of the curve. So this means that even the slightest over exposure will hurt our image.  So even thought they have greater dynamic range, these curves have less exposure latitude because we really really can’t afford to over expose them. Sony compensate for this to some degree by recommending a lower middle grey point between 32 and 40% depending on the curve you use. This then brings your overall exposure lower so your less likely to over expose, but that now means you have less under exposure range as your already shooting a bit darker (White with the hypergammas tends to fall lower, around 80%, so faces and skin tones that would normally be around 70% will be around 60%).

More highlight compression means exposure is still critical despite greater dynamic range
More highlight compression means exposure is still critical despite greater dynamic range

But what about Log?

Now lets look at S-Log2, S-log3. Most  log curves are also similar, very highly compressed gamma curves with huge amounts of highlight compression to squeeze in an exceptionally large dynamic range. With Slog2 White is designed to be at 59% and middle grey at 32% and with S-log3 middle grey is 41% and white 61%. So faces will need to sit between around 40% and 50% to look their best. Now log is a little bit different. Log shooting is designed to be done in conjunction with LUT’s (Look Up Tables) in post production. These LUT’s convert the signal from Log gamma to conventional gamma. When you apply the correct LUT to correctly exposed Log everything comes out looking good. What about over exposed Log? This is where it can get tricky. If you have a good exposure correction LUT or really know how to grade log properly (which can be tricky) then you can expose Log by one or 2 stops, but no more (in my opinion at least, 2 stops is a lot of over exposure for Log, I would try to stay less than 2 stops over). Over expose too much and the image gets really hard to grade and may start to lack contrast. One thing to note is when I say over-exposed with respect to log, I’m not talking about about a clipped picture, but simply an image much brighter than it should be. For example with Slog3 faces will be around 52%. If you expose faces at 70% your actually just over 2 stops over exposed and grading is going to start to get tricky and you may find it hard to get your skin tones just right. So, when shooting log make sure you know what the recommended levels are for the curve you are using. I’m not saying you can’t over expose a bit, just be aware of what is correct and that level shifts of just a 7 or 8% may represent a whole stop of exposure change.

It’s only when you stop shooting with conventional gamma curves and start shooting linear that the latitude really starts to open up. Cameras like the Sony F5/F55 use linear raw recording that does not have a gamma curve. When you have no gamma curve then there is no highlight compression. So for example you could expose a face anywhere between in conventional terms between say 45% (the point where perhaps it becomes too noisy if you expose any darker) and 100% it will look just fine after grading because at no point does it become compressed. This is a massive latitude increase over a camera using a gamma curve. It gets even better if the camera is very low noise as you can afford to expose at an even lower level and bring it up in post. This is why raw is such a big deal. I find it much easier to work with and grade raw than log because raw just behaves nicely.

In Conclusion:

Dynamic range is the range the camera can see from the deepest darkest shadows to the brightest highlights in the same shot. Latitude is the range within the dynamic range where we can expose and still get a useable image.

A camera with lower noise will allow you to expose darker and bring your levels up in post, this gives an increase in under exposure range.

Most video cameras have a very limited over exposure latitude due to aggressive highlight compression. This is the opposite to a film camera.

Bigger dynamic range does not always mean greater latitude.

Cameras that shoot raw typically have a much greater latitude than a camera shooting with a gamma curve. For example an F5 shooting SLog2/3 has a much smaller exposure latitude than when shooting raw even though the dynamic range is the same in both cases.


S-Log, Latitude, Dynamic Range and EI S-log. Or how to modify your exposure range with EI S-Log

The big issue most people have when working with log and exposing mid grey at 38 is that when you look at it on a standard monitor without any lookup tables it looks underexposed. The assumption therefore is that it is underexposed or in some way too dark to ever look right, because that’s what people used to working with conventional gammas have become programmed to believe over many years from their experience with conventional gammas.

So, for confidence you add a lookup table which converts the log to a Rec-709 type gamma and now the image looks brighter, but as it now has to fit within Rec-709 space we have lost either some of our high end or low end so we are no longer seeing the full range of the captured image so highlights may be blown out or blacks may be crushed.
It’s important for people to understand the concept of gamma and colour space and how the only way to truly see what a camera (any camera) is capturing is to use a monitor that has the same gamma and colour space. Generally speaking lookup tables don’t help as they will be taking a signal with a large range and manipulating it to fit in a small range and when you do that, something has to be discarded. If you were to take an F3 set to S-log and expose mid grey at 38 and show that on one of the nice new Sony E170 series monitors that have S-log gamma and place that next to another F3 with Rec-709 shooting mig grey at 45% and a similar but conventional 709 monitor the lower and mid range exposures would be near identical and the S-log images would not look under exposed or flat. The S-log images however would show an extra 2 stops of dynamic range.

Furthermore it has to be remembered that log is log, it is not linear. Because of its non linear nature, less and less brightness information is getting recorded as you go up the brightness range. As our own visual system is tuned to be most accute in the mid ranges this is normally fine provide you expose correctly putting mid tones in the more linear, lower parts of the S-log curve. Start putting faces to high up the S-log curve and it gets progressively harder to get a natural look after grading. This is where I think a lot of people new to log stumble. They don’t have the confidence to expose faces at what looks like a couple of stops under where they would with a standard gamma, so they start bringing up the exposure closer to where they would with standard gamma and then have a really hard time getting faces to look natural in the grade. Remember that the nominal S-Log value for white is 68 IRE. Part of the reason for this is that above about 70 IRE the amount of compression being applied by log is getting pretty extreme. While there is some wriggle room to push your exposure above or below the nominal mid grey at 38 it’s not as big as you might expect, especially dealing with natural tones and overexposure.

If you do want to shift your middle grey point this is where the EI S-log function and a light meter comes into it’s own, it’s what it’s designed for.

First something to understand about conventional camera gain, dynamic range and latitude. The latitude and sensitivity of the F3 is governed by the latitude and sensitivity of the sensor, which is a little under 13 stops. Different amounts of gain or different ISO’s don’t alter the sensors latitude, nor do they alter the actual sensitivity, only the amount of signal amplification. Increasing the camera gain will reduce the cameras output dynamic range as something that is 100 IRE at 800 ISO would go into clipping if the actual camera gain was increased by 6db (taking the ISO to 1600) but the darkest object the camera can actually detect remains the same. Dark objects may appear brighter, but there is still a finite limit to how dark an object the camera can actually see and this is governed by the sensor and the sensors noise floor.

EI (Exposure Index) shooting works differently, whether it’s with the F3, F65, Red or Alexa. Let’s consider how it works with the PMW-F3. In EI S-Log mode the camera always actually outputs at 800 ISO from the A/B outputs. It is assumed that if your working with S-Log you will be recording using an external 10 bit recorder connected to the A/B outputs. 422 is OK, but you really, really need 10 bit for EI S-Log. At 800 ISO you have 6.5 stops of over exposure and 6.5 under when you shoot mid grey at 38 or expose conventionally with a light meter.
Now what happens when you set the camera to EI 1600? Understand that the camera will still output at 800 ISO over the A/B outputs to your external recorder, but also note that 6db gain (1 stop) is added to the monitor output and what you see on the LCD screen, so the monitor out and LCD image get brighter. As the cameras metering systems (zebras, spot meter, histogram) measure the signal on the monitor side these are also now offset by +6db or + 1 stop.
As the camera is set to EI 1600 we set our light meter to 1600 ISO. If we make no change to our lighting the light meter would tell us to stop down by one stop, compared to our original 800 ISO exposure.
Alternately, looking at the camera, when you switch on EI 1600 the picture gets brighter, your mid grey card would also become brighter by one stop, so If we use the cameras spot meter to expose our grey card at 38 again we would need to stop down the iris by one stop to return the grey card to 38 IRE (for the same light levels as we used for 800). So either way, whether exposing with a light meter or exposing using the cameras built in metering, when you go from EI 800 to EI 1600 for the correct exposure (under the same lighting) you would stop down the iris by one stop.
Hope those new to this are still with me at this point!
Because the cameras A/B output is still operating at 800 ISO and you have stopped down by one stop as that what the light meter or camera metering told you to do because they are operating at EI 1600, the A/B output gets darker by one stop. Because you have shifted the actual recorded output down by one stop you have altered you exposure range from the original +/- 6.5 stops to + 7.5 stops, -5.5 stops. So you can see that when working at EI 1600 the dynamic range now becomes + 7.5 stops and -5.5 stops. Go to EI 3200 and the dynamic range becomes +8.5 stops and -4.5 stops.
So EI S-log gives you a great way of shifting your dynamic range centre while giving you consistent looking exposure and a reasonable approximation of how your noise levels are changing as you shift your exposure up and down within the cameras dynamic range.
EI S-Log doesn’t go below 800 because shifting the dynamic range up the exposure range is less beneficial. Lets pretend you have an EI 400 setting. If you did use it, you would be opening up the iris by one stop, so your range becomes +5.5 and -7.5 stops compared to your mid grey or light metered exposure. So you are working with reduced headroom and you are pushing your mid range up into the more highly compressed part of the curve which is less desirable. I believe this is why the option is not given on the F3.

Why using negative gain can be bad, unless you have an F3.

One way to reduce the noise in a video camera image is to reduce the cameras gain. We all know that increasing the gain to lets say +6db will increase noise and generally the reverse holds true when you reduce the gain, the noise typically reduces and this may be helpful if you are going to do a lot of effects work, or just want a clean image.

However in most cases negative gain reduces dynamic range as it will artificially clip your low key parts of the image. The brightness range is restricted by the cameras DSP (Digital Signal Processor), it only has so many bits of data to sample the sensors output, from dark to light. If you reduce the gain the highlight handling doesn’t change (DSP bit depth limited) but your entire image get shifted down in brightness and as a result you will clip off some of your shadow and dark information, so your overall dynamic range is also reduced. Dynamic range is not just highlight handling, it is the entire range from dark to light. 3db is half a stop (6db = 1 stop) so -3db gain reduces the dynamic range by half a stop.

So for cameras like the EX1 and EX3 or even PMW-500/PDW-700 using negative gain can be a bad thing to do. You need to be aware that there is a trade off of noise against dynamic range and need to be sure that the small noise benefit are worth the sacrifice of some latitude. The problem is further compounded on the EX1 and EX3 where the use of -3db gain also reduces the peak white recording level by 3db and with Cinegamma 2 this will prevent you from actually reaching peak white (unless you change the gamma curve gain).
Interestingly the PMW-F3 has an excess of dynamic range for the normal gammas and cinegammas and the processing appears to take advantage of this to keep the images very clean. When you shoot with the standard gammas and cinegammas on the F3 the cameras base ISO (sensitivity) is 400 asa at 25p. This gives a very clean, ultra low noise image with 11.5 stops of dynamic range. When you switch the camera to S-Log, which gives a greater dynamic range (approx 13 stops by my estimation) the base ISO increases to 800 asa.  Looking at some of my S-Log test footage a clear increase in under exposure latitude can be seen when you use S-Log. I suspect that the “0db” point in the F3 is actually 800 asa as used by S-Log, where maximising dynamic range and using the full sensor range is the priority. Meanwhile with standard gammas, which are limited to 11.5 stops anyway, you can reduce the gain by 6db (1 stop) sacrificing one stop of underexposure but still have the full 11.5 stops but with 6db less noise.