Understanding Gamma, Cinegamma, Hypergamma and S-Log

workshops-275 Understanding Gamma, Cinegamma, Hypergamma and S-Log

curves1-300x216 Understanding Gamma, Cinegamma, Hypergamma and S-Log
Standard Gamma Curve

The graph to the left shows and idealised, normal gamma curve for a video production chain. The main thing to observe is that the curve is in fact pretty close to a straight line (actual gamma curves are very gentle, slight curves). This is important as what that means is that when the filmed scene gets twice as bright the output shown on the display also appears twice as bright, so the image we see on the display looks natural and normal. This is the type of gamma curve that would often be referred to as a standard gamma and it is very much what you see is what you get. In reality there are small variations of these standard gamma curves designed to suit different television standards, but those slight variations only make a small difference to the final viewed image. Standard gammas are typically restricted to around a 7 stop exposure range. These days this limited range is not so much to do with the lattitude of the camera but by the inability of most monitors and TV display systems to accurately reproduce more than a 7 stop range and to ensure that all viewers whether they have 20 year old TV or an ultra modern display get a sensible looking picture. This means that we have a problem. Modern cameras can capture great brightness ranges, helping the video maker or cinematographer capture high contrast scenes, but simply taking a 12 stop scene and showing it on a 7 stop display isn’t going to work. This is where modified gamma curves come in to play.

curves2-300x216 Understanding Gamma, Cinegamma, Hypergamma and S-Log
Standard Gamma Curve and Cinegamma Curve

The second graph here shows a modified type of gamma curve. This is similar to the hypergamma or cinegamma curves found on many professional camcorders. What does the graph tell us? Well first of all we can see that the range of brightness or lattitude is greater as the curve extends out towards a range of 10 T stops compared to the 7 stops the standard gamma offers. Each additional stop is a doubling of lattitude. This means that a camera set up with this type of gamma curve can capture a far greater contrast range, but it’s not quite as simple as that.

Un-natural image response area

curves3-300x216 Understanding Gamma, Cinegamma, Hypergamma and S-Log
Un-natural response

Look at the area shaded red on the graph. This is the area where the cameras capture gamma curve deviates from the standard gamma curve used not just for image capture but also for image display. What this means is that the area of the image shaded in red will not look natural because where something in that part of the filmed scene gets 100% brighter it will only be displayed as getting 50% brighter for example. In practice what this means is that while you are capturing a greater brightness range you will also need to grade or correct this range somewhat in the post production process to make the image look natural. Generally scenes shot using hypergammas or cinegammas can look a little washed out or flat. Cinegammas and Hypergammas keep the important central exposure range nice an linear, so the region from black up to around 75% is much like a standard gamma curve, so faces, skin, flora and fauna tend to have a natural contrast range, it is only really highlights such as the sky that is getting compressed and we don’t tend to notice this much in the end picture. This is because our visual system is very good at discerning fine detail in shadow and mid tones but less accurate in highlights, so we tend not to find this high light compression objectionable.

S-Log Gamma Curve

curves4-300x216 Understanding Gamma, Cinegamma, Hypergamma and S-Log
S-Log Gamma Curve

Taking things a step further this  even more extreme gamma curve is similar to Sony’s S-Log gamma curve. As you can see this deviates greatly from the standard gamma curve. Now the entire linear output of the sensor is sampled using a logarithmic scale. This allows more of the data to be allocated to the shadows and midtones where the eye is most sensitive. The end result is a huge improvement in the recorded dynamic range (greater than 12 stops) combined with less data being used for highlights and more being used where it counts. However, the image when viewed on a standard monitor with no correction that looks very washed out, lacks contrast and generally looks incredibly flat and uninteresting.

curves5-300x216 Understanding Gamma, Cinegamma, Hypergamma and S-Log
S-Log Looks Flat and Washed Out

Red area indicates where image will not look natural with S-Log without LUT

In fact the uncorrected image is so flat and washed out that it can make judging the optimum exposure difficult and crews using S-Log will often use traditional light meters to set the exposure rather than a monitor or rely on zebras and known references such as grey cards. For on set monitoring with S-Log you need to apply a LUT (look Up Table) to the cameras output. A LUT is in effect a reverse gamma curve that cancels out the S-Log curve so that the image you see on the monitor is closer to a standard gamma image or your desired final pictures. The problem with this though is that the monitor is now no longer showing the full contrast range being captured and recorded so accurate exposure assessment can be tricky as you may want to bias your exposure range towards light or dark depending on how you will grade the final production. In addition because you absolutely must adjust the image in post production quite heavily to get an acceptable and pleasing image it is vital that the recording method is up to the job. Highly compressed 8 bit codecs are not good enough for S-Log. That’s why S-Log is normally recorded using 10 bit 4:4:4 with very low compression ratios. Any compression artefacts can become exaggerated when the image is manipulated and pushed and pulled in the grade to give a pleasing image. You could use 4:2:2 10 bit at a push, but the chroma sub sampling may lead to banding in highly saturated areas, really Hypergammas and Cinegammas are better suited to 4:2:2 and S-Log is best reserved for 4:4:4.

18 thoughts on “Understanding Gamma, Cinegamma, Hypergamma and S-Log”

  1. Thank you Alister for taking the time to write a article on Gamma, Cinegamma, Hypergamma and S-Log! Information like this, explained “concisely and yet clearly and with meaningful pictures” is actually quite hard to find on the internet.

    After reading this, I’m going to start tinkering with the picture profiles on my Sony ea-50 but I’m wondering if the results are going to be worth it as the EA-50 natively captures in 8 bit 4:2:0 . I’m not so sure if it is 4:2:2 using an external recorder as I haven’t tried that yet, let’s see…

    anyway, Thanks Alister!

    1. An external recorder with a better codec will help, but don’t expect to visually see a big difference because you won’t. It will help the footage hold up better through your post production process with less degradation however.

      When you do have a limited recording codec this is where picture profiles are strongest and most important as it reduces the need to make any corrections or adjustments later.

  2. Alister,

    I am trying very hard to understand the whole cine/hyper/log matter for my F55, which I have ordered but not received yet. You say here that Hypergammas are better for 4:2:2 and SLog is better reserved for 4:4:4 codecs. But how about the SLog2 on the F55 and the XAVC codec. This codec is 4:2:2 and if I read your post well, then a Hypergamma would be preferable above SLog2…. (?)

  3. Ive just picked up an f5 after using a c300 for a few years. Im trying to understand the slog3 exposure best practices and have found your articles invaluable. It seems Im best shooting sgamut3cine slog3 and setting a rec 709 mlut for vf monitoring of exposure. I sort of get the idea of shifting the dr up and down via the iris/iso settings even tho it at first seems counterintuitive. If im shooting in low light, rather than set a higher iso than native, (making the picture seem brighter) i should try and go as low as possible to reduce the noise in the blacks when adjusted on the actual slog recorded image (which, as the iso here is still 2000, will show the extra stop or so from correcting to shoot at the lower iso in the vf)
    I like the look of the rec709 typeA. If theres to be only a tweak of a grade and i want it to look like the type A setting, is it better to switch on the internal mlut and have the recording mirror what i see in the vf (ie iso settings will adjust in tandem and dr presumably will too) or should i just use a hypergamma? Is there any dr/colour benefit to using slog3 in this way or is it better to burn a look in with custom settings?
    Apologies for long post, its quite complicated!

    1. In low light you want to open the iris, so a Low EI is preferable to a high EI. Nut if the light really is low you may be better of using custom mode and a conventional gamma curve.

  4. Thanks Alister. With regards 709 typeA, can I use this baked in in mpeg2 if theres little grading? If the color space is set to sgamut3cine and base setting is slog3, does baking in a 709 lut like typeA negate the point of being in log? Will it create banding? The bbc is increasingly going f5/f55 over c300 but theyre sticking mostly with mpeg2. I wanted to use some form of log to benefit from the extra dr. If im forced to use mpeg2 with hypergamma to avoid banding, is this any better than a c300 in clog?

    1. LC709 TypeA works well with Mpeg2. There are small benefits to starting with SGamut3 color space as the blue response is better and the 709 type A looks better as a result. Banding should really be an issue.

  5. Alister-

    Thanks for all of your hard work on this blog. It’s really an invaluable learning resource. Question for you. Currently I’m shooting a 6 camera concert series for iHeart radio. We are using Sony F55’s. We shoot custom mode HyperGamma 7. We record YpBpR 23.976. We record 3840×2160. We have the older Sony paint boxes connect in our control room. We do some painting on the fly and in advance to match cameras. We are using LEDS to light the stage. We are experiencing a “BLUE CLIPPING”. It is really evident on the white objects. I’m kinda of out of options on solutions to this issue. Here is a link. The question is what can we do to minimize this issue in camera?



    1. Blue LED’s are a PITA. A lot of cameras struggle with them. There isn’t a great deal you can do about them, they contain a lot of far blue light that is invisible to the naked eye but the camera responds to it. Hypergammas are supposed to be exposed about a stop lower than you would normally expose 709 and then the footage should be corrected back up again in post. If you don’t do this then you will end up with more highlight clipping than you should. Also ensure that the cameras white clip is turned off as this artificially limits the peak hypergamma levels.

  6. Hi, sorry, just to clarify, banding would be an issue or not an issue with the baked in lc709typeA in mpeg2?
    Thanks for this great resource!

    1. Should not be too much of an issue, but LC709 typeA has a massive dynamic range so you will be pushing 8 bit mpeg2 very hard so will need to be extremely careful with your workflow.

  7. Hi Alister, I know, two posts (!) in one day. What would be really helpful to a newcomer like myself, and possibly others, is a complementary explanation of what manipulation of the data is subsequently required in post. You have most helpfully explained a lot here and elsewhere about what goes on in the camera, but that is only one side of the coin. What happens afterwards? At the moment I think that post production cannot simply apply a mirror image of a cine gamma, hypergamma or S Log otherwise the output would presumably exceed the dynamic range of the intended dispay. So, I assume a variable amount of gain has to be applied depending on the recorded video level, more ‘boost’ being given to low levels to get them up to a nice looking range for human perception, with lower levels of boost applied to highlights to make them look pleasing rather than accurate since standard viewing displays have that limited dynamic range. So, this post is a post asking what goes on in post (sorry, could n’t resist that), and how does that depend on the target display – how does grading for TV viewing differ from grading for cinema projection? Bob.

  8. The problem for me is that the post process is much less well defined because it’s very subjective. Generally with Hypergamma or Cinegamma the gamma curve is only having a large visual effect on the highlights which viewers tend not to notice, so in post you can often leave the material as is (this is assuming we are aiming at a normal 709 output for TV). Log is very different as the entire range is altered, so much more work has to be done. The simples method is to apply a LUT to convert from log to 709 (or whatever the chosen output standard is) and then to massage the highlights and shadows to make the large captured range fit in the small display range. Often you end up having to let some areas blow out or go to black as you simply can’t show everything captured. This is something shooters need to remember!

    If you don’t have a LUT then a common approach is to apply an “S” curve to the log footage which in effect normalises the footage making it more linear. Then you tweak and grade the top middle and bottom for a good looking picture.

    I am preparing a new article on the ACES workflow. ACES sounds complicated, but once you get over some of the fancy terms used it’s actually very simple and a fantastic way to work with a vast range of very different types of material. In addition I’ve just done a video for Sony on post production for the FS7 which should be going online in the very near future.

  9. Thank you Alister. You’re a gentle man! This is all fairly new to me. Your post production video will help a lot and I look forward to seeing it. I shoot RAW with my still photography (EOS 5D) and do have some understanding of selective image manipulation. I wonder if we could have a LUT in lightroom?!

Leave a Reply

Your email address will not be published. Required fields are marked *