Magic Lantern enables 14-bit RAW CinemaDNG on 5D

Theoretically HDMI could do the job, at least concerning the bandwith: 2K 14 bit rgb 4:4:4 are 2,23 Gbps, HDMI 1.0 already did 4.9 Gbps.


http://web.forret.com/tools/video_fps.asp?width=2048&height=1080&fps=24&space=rgb444&depth=14

"HDMI 1.0: The original spec called for a single-cable digital audio/video connection with 165MHz bandwidth and a maximum bitrate of 4.9Gbps."

Yeah HDMI bandwidth spec is not the issue. It is the bandwidth of the signal processing circuitry on each end of the chain and whether the raw stream can even be routed to the HDMI port. DNG raw is far less data intensive than uncompressed encoded RGB or component video if you don't process it. For 24 fps 12 bit DNG raw, about 600Mbps not including metadata and audio.
Still requires storage media and pipeline processors that can sustain around 90MBps data rate for the full record to capacity time of the SD card without overheating or dropping frames.
Latest gen 1000x UDMA 7 cards can do that, at least some can. Data rates the card supports can drop severely as it gets close to full capacity.
 
As I understand it, what the ML devs have done is found a way to access the video stream that the camera is already creating for its live-view function, and that stream is "pristine" in that it hasn't been manipulated by the encoder yet. It isn't scanning the sensor any differently than the camera normally does. Someone feel free to correct me if I'm mistaken about that.

Correct. The trick is to get the data rate under control so it can be recorded to CF. The DNGs are 4.5Mb per frame, to get 24p their target bit-rate is 1-2Mb per frame. To achieve that they're exploring a way to compress the RAW files or go with a 1920x720 crop which they think is doable with a 1000x card. Toshiba has just released a 1066x card that does a minimum sustained 65MB/s. Despite what the naysayers are saying this is looking doable. The BM pocket camera is writing compressed RAW 1080p to SD cards so I don't get why people think this is impossible.

If RAW doesn't happen uncompressed YUV422 probably will, which fixes the resolution and codec problems with the 5D MK3.
 
Correct. The trick is to get the data rate under control so it can be recorded to CF. The DNGs are 4.5Mb per frame, to get 24p their target bit-rate is 1-2Mb per frame. To achieve that they're exploring a way to compress the RAW files or go with a 1920x720 crop which they think is doable with a 1000x card. Toshiba has just released a 1066x card that does a minimum sustained 65MB/s. Despite what the naysayers are saying this is looking doable. The BM pocket camera is writing compressed RAW 1080p to SD cards so I don't get why people think this is impossible.

If RAW doesn't happen uncompressed YUV422 probably will, which fixes the resolution and codec problems with the 5D MK3.

The BMCC is specifically designed to do that. But so far they are only enabling Prores 422HQ for the Pocket Cam, max data rate at 1080p is 220 Mbps. The DNG consortium is supposed to be working on a new compressed DNG format, the existing Huffman mathematically lossless encoding typically gives between 1.5 and 2.5 x compression per frame depending on content.

By comparison uncompressed 10 bit YUV 4:2:2 runs over 1Gbps, nearly twice the rate of uncompressed raw DNG.
 
Last edited:
It's not really being a naysayer when the Magic Lantern says "don't hold your breath, and not likely."

Just means I agree with them... not likely. The raw 24P is what I mean. I'm sure they will come up with something, they have always made improvements in the past...but I don't think it will be 24 raw frames a second for any meaningful span of time.
 
Just means I agree with them... not likely. The raw 24P is what I mean. I'm sure they will come up with something, they have always made improvements in the past...but I don't think it will be 24 raw frames a second for any meaningful span of time.

It will be every bit as revolutionary as their HDR video mode...
 
Even if they can't crack it due to card write restraints, short of nuclear war Moore's law isn't gonna come to an abrupt halt. Who knows what the CF card manufacturers have in the pipeline over the next 12 months. The new Toshiba cards might be fast enough.
 
I am following the nightly builds and testing them as well. They are making progress. The first build I tried dated
April 28, I could only record around 8-9frames with corrupted bottom of frame and black bar on side, also exposure seem to vary per frame.
April 29, I could already record 11-12 frames and the frames are now clean, exposures stable throughout.
Now, just uploaded,
April 30 build. I was now able to record 51 frames, DNG.

Note that I'm only using 5D mkii with a transcend 133x 8gig card, I use this small card for tests since my 32gig cards are loaded with the stable 2.3 release.

I bet those using the newer mkIII with fast cf cards are getter longer results especially using 720P which the mkII cannot do.
 
Last edited:
Even if they can't crack it due to card write restraints, short of nuclear war Moore's law isn't gonna come to an abrupt halt. Who knows what the CF card manufacturers have in the pipeline over the next 12 months. The new Toshiba cards might be fast enough.

PATA technology can only go so fast, due to cross talk, and the camera can only output so fast. I believe more companies are going to start moving over to CFAST, which is the SATA version of CompactFlash.
 
Edited my previous post. My frames captured is not 36 frames but 51 frames DNG per burst. ;) I missed setting the end trigger in the burst settings.
 
Last edited:
Sorry about the 102 its only 51. I missed the break since the test was locked down. Corrected the previous posts. This time after several tests its only 51 on my 133x cf card.
 
OK, time for a recap and some math, to fill some time as we wait for progress...

* HDMI out: for me, this would be the best way to get the RAW signal out of the camera: disguise the RAW (i.e. monochrome) 14-bit signal as a 422 8-bit signal (just rearrange the bits and add two bits of padding, so all the original information is preserved), send it out, record it uncompressed on a BM shuttle, then make a PC program that undoes that disguise and gives you a DNG sequence. Trouble is: it looks like canon's HDMI-out is doing all kinds of nasty things to the data (sharpening, averaging, etc), and without knowing exactly the mathematical formula for this, it's impossible to get back your original data. Looks like a dead end right now. The only way forward is if they found a flag that turned off all this nasty processing.

* recording to CF: it would be nice if the card was the bottleneck, as this would mean we would just need faster cards. But I fear that's not going to be the case ( <--totally uninformed guess).For uncompressed 1920x1080 14-bit RAW at 24fps, you need 664 Mbps, or 83 MB/s.
If you crop 2.39:1 in camera, you get 1920x804, and that means 495 Mbps, or 62 MB/s.
Crop further to 1920x720, and you need 443 Mbps, or 55 MB/s.
I've never used one of those super-fast CF cards, but they claim speeds in this area, don't they? If you have one, you can test its writing speed on the PC (use uncompressed DNG files, it may matter how compressible the information is).
If the bottleneck is the card, somebody could create a CF-to-SSD adapter that takes a cable out of the CF door and connects it to an external SSD drive. This would be a lot cheaper than an external recorder, since it's ony a simple IDE-to-SATA adapter with a special form (CF and IDE are basically the same, except for the physical connector). Side-effect: a 512GB SSD drive is a lot cheaper than a slower and much smaller CF card.
Something similar to this:
http://www.ebay.com/itm/CF-Compact-...t=US_Drive_Cables_dapters&hash=item2a14949f36
But not exactly the same: this one presents a CF card to a SATA controller, we would need one that presents a SATA drive to a CF controller.
And of course: if the bottleneck is the camera's controller, then none of this will work.


* compression: the standard Huffman enconding from the DNG spec gets very minimal compression, only 1.2:1 to 1.5:1, and it still requires a fair amount of processing power. You would get a better ratio if you just transformed the 14-bit linear data into 10-bit log (much easier to do than Huffman coding, and it gives you a 1.4:1 ratio). Still, they tell me they don't have the resources for that. Even Cineform RAW would be less computing-intensive than Huffman coding, and it can give you anything from 5:1 to 20:1 compression. But it's out of their reach in terms of computing power too.

If I was the developer, my next steps would be:
* get a very fast card (if they set up a tip jar for this, I'll be first in line)
* start cropping the image vertically until I get a frame size that I can write to card continuously, i.e. calculate the bandwidth limit
* if 1920x800 with 1.4:1 compression fits in the bandwidth limit, I would go for the 10-bit log transform (if it helps, write a version of ML that can do this and only this, leave every other feature out if you have to!)

Looking at the dpreview numbers for the 5D3, they could record 2.7 fps RAW stills after the buffer was full, which means the controller can do at least 70 MB/s. The 1920x800 crop should be doable, even at 14-bit!! Except, things are never that easy...
http://www.dpreview.com/reviews/canon-eos-5d-mark-iii/13
 
Note that I'm only using 5D mkii ...

I have looked at 5D3 samples, but I'd love to see some from the 5D2 too. If the RAW video thing happens, the 5D2 (or even the 6D) may be just as good as the 5D3 for this.

Could you send me (similaar.feedback@gmail.com) an image from the ML LV-RAW thing, and the same shot but as a standard RAW still? Just to check how close sharpness and detail are to a downsampled RAW still.
If you do it properly exposed, heavily underxposed, and heavily overexposed, I can also check if DR is the same as in stills mode (nearly the case in the 5D3).

These are my results with the 5D3, at ISO 800 and 3200:
http://www.similaar.com/aarchive/800_lv.jpg
http://www.similaar.com/aarchive/800_st.jpg
http://www.similaar.com/aarchive/3200_lv.jpg
http://www.similaar.com/aarchive/3200_st.jpg
 
Sent you two dng frames from res chart test. One with VAF filter the other without. From the way it looks, the VAF is still needed for the 5D2. Maybe not with mk3.

After testing the current build(aprl 30) Its consistent at 51 frames at 24p. I too don't think its the card speed.
 
For the 5D mk2 the raw dng hack will not improve moire and aliasing. The mosaic filter will still be needed. Maybe the mkIII's softness will be improved.

Res chart I did on the mkII also with and without mosaic filter.

Remember though that this is the early stages and this is just from the nightly builds. For this test I used the April 30 build.

 
Last edited:
^ ouch! the DNG footage with no filter looks horrible :(
(and even worse in motion than in the stills that you sent me!)
 
Back
Top