View Full Version : Color Compression with Redcode Raw
Musashi
04-27-2007, 03:59 AM
Hey,
well long story, our company is just thinking about jumping on the "HD Train" but is still hesitating. Iam currently the responsible one for the main Information about the new workflow with HD or even 4k material.
And okay, i took quite a while to get all the information that i need, but after a shot time i was quite sure, that Red is the one camera, that will fit our needs.
I'm allready quite exited about when we will order it, but first i would like to know some details i never found on the page...
Okay so the actual Datarate of 4k Redcode RAW Footage is actually about 30MB/s.
But we gonna work with a lot of keying... So uncompressed Footage would be desireable. But i think capturing a ~880MB/s für uncompressed 2k footage would blow our credit card in a few shots ;)
So to get the point: At what level is the Color compressed in Redcode Raw Footage? I know i can choose between 4:2:2 or 4:4:4 via Dual HD-SDI, but i never found information regarding Color Compression with RedCode Raw or RGB!
Anyone can reveal the fog in this mistery?
Musashi
Stephen Gentle
04-27-2007, 04:12 AM
REDCODE RAW is 4:4:4. It's also excellent for keying, and I highly doubt that you'll ever need to pull uncompressed data off the camera, unless you want 120fps @ 2K. Some people have suggested that REDCODE RAW 4K will give you a better key than uncompressed 2K.
There are some greenscreen grabs from a really old RED prototype here (http://www.cinematography.net/Red/comp-matrix.html). They're all a one click key in After Effects with Keylight form me. Apparently REDCODE has improved significantly since then too.
-Stephen
Musashi
04-27-2007, 06:40 AM
4:4:4?
This seems nearly impossible to me, since we have a datarate of ~30MB/s.
This is only slightly more than the compression of a DV Tape, and Red contains ~16 times more Pixel than DV, even no color compression...
Can someone give me the hint, where the fault in my thoughts is?
Well if there is none, maybe the RED Team should next answer questions like "What was first - Chicken or egg" or "What is the sense of life", they seem to be the only one who are capaple of solving big problems :blink:
Musashi
Lucas Wilson
04-27-2007, 06:54 AM
4:4:4?
This seems nearly impossible to me, since we have a datarate of ~30MB/s.
This is only slightly more than the compression of a DV Tape, and Red contains ~16 times more Pixel than DV, even no color compression...
Can someone give me the hint, where the fault in my thoughts is?
Hi Musashi,
I think your main misconception was in your first e-mail - 880MB/s.
The RAW data that will come off the RED ONE is only 323 MB/s. It is raw Bayer data - a greyscale image that only needs one value for each pixel to represent red, green, and blue.
A really good brief and basic explanation of how sensors deal and interpret RAW data is here...
www.adobe.com/digitalimag/pdfs/understanding_digitalrawcapture.pdf
REDCODE compression is approximately 12:1 - which turns 323 into about 26MB/s.
Lucas
-----
ASSIMILATE, Inc.
LA, CA, USA.
donatello b
04-27-2007, 06:58 AM
" impossible to me, since we have a datarate of ~30MB/s.
This is only slightly more than the compression of a DV Tape"
DV is 25Mbs ( that is b not B)which is about 3.5MBs ...
Graeme Nattress
04-27-2007, 07:00 AM
Easy - DV is 25Mbits, whereas REDCODE RAW is somewhere between 24MBytes and 27MBytes, well over 8 times as much data.
Next, REDCODE RAW is neither 4:4:4 or any other number designation of chroma subsampling. It's RAW, and that means it just records a copy of whatever information hits the sensor. No data points are directly thrown away, just compressed with a modern wavelet based codec set at 12 bits.
Hope that helps,
Graeme
IAN SUN
04-27-2007, 07:06 AM
To my understanding it is not really 4:4:4 as we are originating from a bayer sensor. There are two green pixels for every blue or red. So perhaps it is closer to 4:2:2, (but with some interpolation ?). There is no difference between RAW RAW and REDcode RAW in this respect, REDcode does not reduce the color information.
The Keys are indeed magnificent, I doubt you will need uncompressed unless you are a dedicated FX house.
Graeme Nattress
04-27-2007, 07:09 AM
It's even more complex than that, Bro, as you're interpolating with the goal of full RGB in such a way that it looks good. Bayer algorithms are clever and give great looking resolution in both green and red and blue, so really, it's not a worry.
Graeme
IAN SUN
04-27-2007, 07:12 AM
Thanks Graeme, if I had seen your previous post I wouldn't have even bothered responding!
Andrew M.
04-27-2007, 07:19 AM
Ian, the best explanation that works for me about RAW is that RAW for Bayer sensors is one channel stream of data.
RGB will have 3 channels and 3XCCD RAW will have 3 channels.
The way you get RGB out of one channel is by exploiting the fact that Bayer pattern is always RGB (hast minimum one red two green and one blue pixels ) pattern each time you offset your reading by only one pixel on the sensor no matter what direction your offset will go.
IAN SUN
04-27-2007, 07:28 AM
Good info on the readout offset Andrew.
Graeme Nattress
04-27-2007, 07:30 AM
Although remember, that's just a way of thinking of how a bayer pattern reconstruction can work, showing how you get unique RGB values for each pixel. It's not necessarily how it will work....
Graeme
Musashi
04-27-2007, 07:31 AM
Ah got it now!
Simply read Mbit as MByte, what a significant fault...
So we have no subsampling regarding chroma, i guess Redcine is the point, where i can interpret color in 4:2:2 or 4:4:4 or whatever else i wish the color to be subsampled?
Hm concidering the RAW and uncompressed Datarate... I thought i've seen a tab anywhere in this forum, listing, that Uncompressed RAW is sent via fibre to any recorder capable of managing this datarate.
So, im getting more and more confused about this datarate stuff :(
Andrew M.
04-27-2007, 07:45 AM
Although remember, that's just a way of thinking of how a bayer pattern reconstruction can work, showing how you get unique RGB values for each pixel. It's not necessarily how it will work....
Graeme
Can we include more than 4 sensors each time we offset reading without compromising resolution? Also does it help if we operate on two subsequent values from the adjacent frames? I guess all this RAW to RGB conversion is math intensive if we want to do it right way?
Emery Wells
04-27-2007, 07:47 AM
Musashi you were seeing figures related to RAW 4520 x 2540 60p output. This is only available via the high speed data port and the data rate reaches near 1BG/sec. This is still outputting uncompressed RAW. If you were to convert this to a linear RGB format that data rate would be astronomical.
Andrew M.
04-27-2007, 07:48 AM
Ah got it now!
Simply read Mbit as MByte, what a significant fault...
So we have no subsampling regarding chroma, i guess Redcine is the point, where i can interpret color in 4:2:2 or 4:4:4 or whatever else i wish the color to be subsampled?
Hm concidering the RAW and uncompressed Datarate... I thought i've seen a tab anywhere in this forum, listing, that Uncompressed RAW is sent via fibre to any recorder capable of managing this datarate.
So, im getting more and more confused about this datarate stuff :(
There was a good explanation here on this forum about datarate.
Try keyword bitrate or datarate.
Graeme Nattress
04-27-2007, 08:15 AM
Andrew, yes you can sample more and more of the pixels around the one you're making into RGB without compromising resolution. There as many ways to demosaic an image as there are people writing demosaicing algorithms - all work different, all have different properties.
Graeme
Rob Lohman
04-27-2007, 10:25 AM
Musashi: REDCINE as well as the QuickTime code are full "4:4:4" internally. Obviously you can output that to whatever chroma sampling you want.
To our RED-DRIVE or flash memory options you're recording REDCODE RAW which is a compressed form of raw. Just think of it as a 4 channel RGB image, and as indicated we do not drop any samples what so ever.
There is an uncompressed RAW output port that basically outputs the uncompressed RAW data that is coming off the sensor. This is a much higher data rate since it's uncompressed. You'll need a special recorder (RED-RAID) to record that.
Musashi
04-28-2007, 03:19 AM
Ok thx for the link about Raw Bayer Codec. Quite some nice information there!
So I guess the compressed Raw Data will be enough for our purposes.
But just to check if I understood the workflow...
So i get the 4k Redcode RAW via 320GB Reddrive ( approx. 2,5h each drive ), The Datarate is about 30MByte/sek. This RAW format need to be Demosaiced in RedCine. And then i need to transform the Format to whatever format i want to. ( For example 2k 4:4:4 for keying ) But this means, that i have the uncompressed files besides my compressed files.
So unfortunately besides my Data i've captured in RedCode Raw, i have the complete Data uncompressed on my Raid to be able to work in Edit and 3D application. am I right? But this also means, that i have the Uncompressed Data, with the equal Datarate as the uncompressed RGB Out of the Red Camera?
Or is that the big plus of Red working with Apple FCP? So that you can work with the actual Redcode RAW format without having to DeMosaic it etc?
Gosh i see, there's still much to know about that new IT based workflow, but already thanks to everyone in here, who is trying to help ;)
Musashi
Gavin Greenwalt
04-28-2007, 11:43 AM
You're getting closer. Whether you work in REDCode or Uncompressed DPX/Tiffs will be up to you and your wise judgment. :) Since REDCode is a quicktime format any application which can read Quicktimes will be able to take it in as an input (which is pretty much everybody). Your input node will require more processing than an uncompressed file, how much so remains to be seen however if you're using a RAM based compositor such as everybody except for Flame/Flint/Inferno the 4k frame will be saved to RAM uncompressed multiple times, so you're going to see your RAM needs dramatically increase once the Input node/operator is taking in 4k RAW.
You can compensate of course by using DODs, Automatic Proxies and other tricks depending on your compositing application to keep things workable. I strongly recommend working in the 4k REDCode for keying and then downsampling the matte it'll make your job much easier. I have a compression comparison to illustrate the advantages of working with 4k Redcode vs Uncompressed 2K.
Compressed 4k | Compressed 2k | Uncompressed 2k | Compressed HD
http://vaporware.w3dzine.net/Swap/compression_comparison.jpg
Stephen Gentle
04-28-2007, 06:05 PM
Next, REDCODE RAW is neither 4:4:4 or any other number designation of chroma subsampling. It's RAW, and that means it just records a copy of whatever information hits the sensor. No data points are directly thrown away, just compressed with a modern wavelet based codec set at 12 bits.
Hope that helps,
Graeme
Yeah, I meant 4:4:4 after processing...