Having just finished 3 workshops at Cinegear and a full day F5/F55 workshop at AbelCine one thing became apparent. There is a lot of confusion over raw and log recording. I overheard many people talking about shooting raw using S-log2/Slog3 or people simply interchanging raw and log as though they are the same thing.
Raw and Log are completely different things!
Generally what is being talked about is either Raw recording or recording using a log format such as S-Log2/S-log3 using component or RGB full colour video. Raw simply records the raw, image data coming off the video sensor, it’s not even a color picture as we know it. It is just the brightness information each pixel on the sensor captures with each pixel sitting beneath a colour filter. It is an image bitmap, but to be able to see a full colour image it will need further extensive processing. This processing is normally done in post production and is called “de-bayering” or “de-mosaicing” and is a necessary step to make the raw useable.
S-Log, S-Log2/3, LogC or C-Log is a signal created by taking the same sensor output as above, then processing it in to an RGB or YCbCr signal by de-mosiacing in camera and then applying a log gamma curve. It is conventional video but instead of using a “normal” gamma curve such as Rec-709 it uses an alternate gamma and just like any other conventional video format it is full colour. S-Log and other log gammas can be recorded using a compressed codec or uncompressed, but even when uncompressed, it is still not raw, it is component or RGB video.
So why the confusion?
Well, if you tried to view the raw signal from a camera shooting raw in the viewfinder without processing it, it would not be a colour image and it would have a very strange brightness range. This would be impossible to use for framing and exposure. To get around this a raw camera will convert the raw sensor output to conventional video for monitoring. Sony’s cameras will convert the raw to S-Log2/3 for monitoring as only S-Log2/3 can show the cameras full dynamic range. At the same time the camera may be able to record this S-Log2/3 signal to the internal recording media. But the raw recorded by the camera on the AXS cards or external recorder is still just raw, nothing else.
UPDATE: Correction/Clarification. There is room for more confusion as I have been reminded that ArriRaw as well as the latest versions of ProResRaw use Log encoding to compact the raw data and record it in a more efficient way. It is also likely that Sony’s raw uses data reduction for the higher stops via floating point math or similar (as Sony’s raw is ACES compliant it possibly uses data rounding for the higher stops).
ArriRaw uses log encoding for the raw data to minimise data wastage and to squeeze a large dynamic range into just 12 bits, but the data is still unencoded data, it has not been encoded into RGB or YCbCr. To become a useable colour image it will need to be de-bayered in post production. Sony’s S-Log, S-Log2/3 Arri’s LogC, Canon’s C-Log as well as Cineon are all encoded and processed RGB or YCbCr video.
9 thoughts on “Raw is not log (but it might be), log is not raw. They are very different things.”
I agree they are not the same thing. But I would dispute “very similar to conventional video”. Log has many of the benefits of raw, as this demo video for my FCP X LUT plugin illustrates – http://bit.ly/12tUSs2
While the theoretical ideal would always be to record the pure unmodified 16-bit linear sensor output, some form of compromise is often necessary. Both ARRIRAW and REDCODE RAW use log coding internally as a means of data rate reduction. Sony do not publish how their raw works, but if they use no use any log coding as part of their compression they are missing a trick. Any lossy compression needs to remove information the loss of which will be least noticed.
Linear uses half of the available code values for the brightest stop, which is very inefficient. In 16 bit linear you are using 32768 levels to code the variations in the highlights right up against clipping. This is not where the important image detail is, and the vast majority of those levels will be merged in the grade anyway. Log coding uses the same number of code values per stop. At 10-bit, Cineon log is 90 code values per stop, which is not really enough but was hidden by film grain. 14-bit log can code 16-bit linear with no meaningful loss, but I would challenge anyone to see the difference in the end result between 16 bit linear and 12 bit log, particularly considering that the last couple of bits in a 16 bit A/D will be well into the noise floor.
But no one I’m aware of is recording 14 bit log. The ACES workflow does use data reduction for the higher stops using rounding above bit 2048 and as the Sony raw is designed to be compliant with this I suspect Sony use data rounding to minimise data wastage as for the brighter stops you can afford to have less data precision. But this is still very different to log as there is still a lot more data allocated to the brighter stops. You must remember that the top stop may be using a lot more data with raw, but that’s simply because it does contain a lot more picture information. It is our own visual system the perceptively thinks there is no more information in a brighter stop than a darker stop, the reality is different and this is important when manipulating an image. Many, many people get bitten by this when they over expose log, putting skin tones too high up the log curve. When you grade the levels back down the skin tones remain squashed together and while they can be stretched back apart by de-logging etc, they still never look as they should because the log compression means the in between values were never actually recorded and some of the important subtleties of the skin tones are lost. Log is very good for what it is designed for, capturing a bigger range where perceptually we don’t notice the data reduction in the highlights, but over expose log and it will bite you. Raw is far more forgiving and you can push linear raw far more than log.
“Raw is far more forgiving and you can push linear raw far more than log.”
But so called linear raw is not usually actually linear when it’s from a digital cinema camera. Blackmagic DNGs and ARRIRAW files are both 12-bit log coded internally. I do not know about Sony Raw.
Sony states that their Raw is linear, and compressed 3.6:1.
The sensor is linear, so for me, the ideal has always been linear raw. But if bits are to be chopped off, log encoding of raw has advantages, just as it does with RGB.
It is possible Sony are using some bit rounding to get better data distribution, this would have very little effect on the image, less so than log encoding. This is how ACES linear works and Sonys raw is fully ACES compliant.
Do you have a response to Nick’s point: Red and Arri do use a log-encoded raw format. The way it’s worded sounds like its not just truncating the noisy bits. Surely there’s a reason they’re recording raw to a perceptual rather than linear format?
Thank you for your comments. I learn so much from hearing these conversations between intelligent folks.
Arri still use 12 bit log raw. It works well, but times are moving on and it’s now really pretty easy to record 16 bit data. Red used to use log, but now use 16 bit linear. The big thing about recording 16 bit linear is you simply take the data direct from the sensor and record it with zero processing. Why discard picture information when these days there really is no need?