Archive for February, 2011

Gamma in Camera: Types of Response Curve

Monday, February 21st, 2011

In principle, increasing the gamma primarily has the effect of boosting the mids.  But that simple explanation does not cover everything:

  • My experiences:
    • In cameras, selecting different gamma curves also affects the general levels, typically reducing them (not simply boosting the mids).
      • Doubtless because in a camera, the “focus” is on extending the latitude of the overall recording, to avoid blown-out highlights, as opposed to increasing the brightness of scene shadows etc.
    • In Sony XDCAM EX, the precise behaviour of the gamma has been empirically determined.
    • In Sony Vegas (version 9 at least), the 8-bits levels-space used is 0..255, as opposed to the broadcast-legal range of 16..235 adopted by most other Non Linear Editor (NLE) applications.  Thus, the lowest level generated by a typical camera, namely 16, constitutes a “mid” and as such does indeed get boosted by Vegas’s own Gamma effect.
      • A workaround might be, in Vegas, to apply Media FX to expand the levels range of the footage to 0..255, do all editing at that range then for the final delivery render, compress (linearly) down to 16..235.

In a linear space, a typical camera response curve is an S-curve where the bottom curve of the “S” is relatively short and the top curve of the “S” is long and drawn-out.  So the camera is sensitive to low-light and then saturates early-on in high light.  Presumably, if all we did was to alter gamma, then the bottom-part of the “S” would shorten (the response would “pick-up” earlier) and the top part of the S-curve would draw-out even more to the left, becoming even longer, tending to saturate earlier-on (with respect to light levels).  However in practice a typical camera will at the same time reduce levels prior to the gamma curve.  ???GET FORUM OPINIONS ON XDCAM EX DATA FLOW???.  The overall result is a reduced gradient.  This essentially extends the levels-range recorded while at the same time reduces the contrast range, giving a washed-out appearance.  Meanwhile, in log-space, which is meaningful because that’s how the eye perceives brightness, the overall effect of such gamma is to make the (log) curve more linear.  Presumably then the ultimate gamma curve would be logarithmic.  I found something called S-log, which sounds a bit like that, at

  • <<Its Sony’s version of shooting RAW>>
  • <<S-Log isn’t a very aggressive log curve. … most colorists just work with it as is without applying a LUT … (which can be done) with levels and gamma filters in any NLE.  A true Log encoded file, like a log DPX, or LogC from an Alexa is a bit more extreme and you’re probably better off finding a LUT to decode.>>
  • << if/when you shoot S-Log 8-bit, and you need to make it look normal or high-contrast … Then you’d be in trouble stretching that flat 8-bit image out.>>

Then at

  • <<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.4. >>

  • << The LOG mode … captures what the camera is capable of discerning. Because the maximum range of sensor data is being recorded at all times, there is more range to create the desired look in post. In a REC709 video gamma (in contrast), an image may have a bright light source overexpose to white and dark shadow areas record as black. The same image recorded in LOG may have considerable detail on both ends of the exposure range, which in later color correction can be exploited, if so desired. >>
  • << When footage is transferred with video gamma, it is meant for display (perhaps with minor adjustment applied later). When footage is transferred using the LOG CINEON curve, no artistic interpretation of the footage happens during the transfer – the goal is to preserve the full range of possibilities for later adjustment. This footage will look very flat and dull when displayed directly on a monitor. >>
  • <<  Most Digital Cinema cameras have a mode of recording or transcoding to a LOG curve. For example, Sony has S-Log (in the F35, F23, SRW-9000 and the PMW-F3), ARRI has LOG-C, RED has REDLOG, and Panasonic has FILMREC (which, while not technically a LOG curve, serves the same purpose). >>

  • << In a perfect world you would control your lighting so that you could use standard gamma 3 (ITU 709 standard HD gamma) with no knee. Everything would be linear and nothing blown out. This would equate to a roughly 7 stop range. This nice linear signal would grade very well and give you a fantastic result. Careful use of graduated filters or studio lighting might still allow you to do this, but the real world is rarely restricted to a 7 stop brightness range. So we must use the knee or Cinegamma to prevent our highlights from looking ugly. >>
  • << If you are committed to a workflow that will include grading, then Cinegammas are best. If you use them be very careful with your exposure, you don’t want to overexpose, especially where faces are involved. getting the exposure just right with cinegammas is harder than with standard gammas. If anything err on the side of caution and come down 1/2 a stop. >>
  • << If your workflow might not include grading then stick to the standard gammas. They are a little more tolerant of slight over exposure because skin and foliage won’t get compressed until it gets up to the 80% mark (depending on your knee setting). Plus the image looks nicer straight out of the camera as the cameras gamma should be a close match to the monitors gamma. >>
    • Great practical advice including the need to avoid fleshtones getting into the flesh region of the response curve


Gamma in Camera – Pros & Cons & Bits

Sunday, February 20th, 2011

To obtain/maintain/increase/verify an intuitive feel and hence greater confidence for the appropriate use of gamma in camera settings, I did some thinking & research.  The basic idea is as follows:

  • A typical consumer camcorder produces crisp images
  • “Film Look” use of a professional camera may employ non-standard gamma settings in the camera settings.
  • The straight results of this are images of “washed-out” appearance.  To obtain a pleasing result requires grading (levels & gamma, saturation, color curves etc.).  Example:

Regarding the second, more professional approach:

  • The immediate result is “scary” because it looks washed-out
  • The goal is not to produce an immediately-pleasing image but to capture “as much information as possible” (an often-quoted phrase) from a scene, with the intention and indeed requirement for grading.  One has to see it “through the eyes of a grader”.  A naive person (e.g. a newbie or a client) will of course not immediately see it that way.
    • Example references to this:
        • <<The RED RAW look, the washed out, flat, low contrast, incredibly versatile form in which the footage originates … screams possibility in our faces. Low contrast can, to the DP, imply power … being precious with the RED footage, and trying hard to save every bit of detail we started with.>>
        • <<I can see how the washed out look can become something in and of itself, and have people like it, and others not.>>
  • What does this mean?  In general, possibly:
    • The complete levels and color space of that scene, un-clipped (clipping destroys information).
    • Any subtle light/shade within shadows of the scene.
  • Questionable aspects:
    • Grading takes time (bad for quick-turnaround jobs) and if written to intermediate files (e.g. prior to editing) then it can also eat disk space.
    • There is a trade-off between generality and specificness.
      • Capturing maximum information provides the grader with greatest freedom.
      • On the other hand if it is known in advance that crushed shadows are required, e.g. to obtain silhouettes / film noir effects, then it is a waste of effort / bits if not counter-productive to boost them in the camera.
    • The degree to which grading can be applied in practice depends on the levels and color space resolution of the camera.
      • Prosumer cameras such as Z1 or XDCAM-EX record to 8-bit levels resolution.   And then only a sub-part of that levels-space (typically 16..255 or 16..235, depending on camera and settings).
        • For cameras whose sensors work at greater resolution (and can output this information) there is the option to record to external devices at that greater resolution (e.g. 10 bits 4:2:2).
      • While it is possible to apply effects like levels, gamma or color-curves (S-curves) to “professional” washed-out imagery, beyond a certain degree, the image will appear ragged or flesh-tones will appear sunburn etc., as the gaps between successive values of the bit-space get stretched too big.  One can actually see the gaps (between striations) in a Waveform Monitor (applied to the result of grading).
        • In that case we have in fact lost information, defeating the original goal…
      • If the results of grading are pretty-much identical (or, from the previous point, possibly inferior) to what would have been obtained in-camera using a more standard setting, then what was the point?
  • Reassessment:
    • Due to the trade-off issues, the real goal should be to record the maximum relevant information.   In other words, to be a little bit specialised.
      • This is the logic behind employing physical filters on a camera, such as grad filters (“sunglasses” e.g. for the upper – sky – part of the image).
      • Even on feature movie sets I have come across formal instructions for film cameras to be deliberately “pushed a stop or two”.  Committing at record-time to something that could, presumably, have been achieved equally-well in post, which itself can be done almost immediately based on HD footage recorded simultaneously from HD cameras attached to the main camera.  I have seen directors receive rushes and quick cuts from such cameras within seconds…
    • The degree of commitment/specialization may depend on the type or uncertainty of the scene and on the consequence of making a mistake.  Feature films are very planned and their shooting is very iterative.  On the other hand there can be one-offs such as special-effects or VIP moments.  At the other extreme may be live events where anything can  happen – subjects, lighting, over-bright/over-dark etc.
    • The missing factors in the “maximum information” principle are then:
      • Relevance – what kinds of information are relevant?
      • Resolution limitations.
        • If we only have 8 bits, then what is the practical limit of grading?
        • Conversely, if we need to maintain maximum latitude etc., when do we need more than 8 bits (in practice mostly 10 bits)?

Burning a standard TV DVD from Windows 7

Saturday, February 19th, 2011

  • <<Windows Vista and 7 use UDF 2.01 which isn’t compatible with DVD-Video which uses UDF 1.02.>>
  • <<Use ImgBurn and your burning problems will go away, now if you have authoring problems that’s a different story.>>
    • Indeed I tried that and it worked!