I been seeing many posts on how crushed the black levels and highlights are with the Canon 5D video mode. Stu Maschwitz has a great post on how to tweak the camera to improve the situation, but also points out the default presentation FCP is also wrong.
It turns out that this presentation fault is in all popular editing packages on Mac and PC. They could possibly share the same AVC decoder, but I have a different theory below.
Using a 5D MOV video originally posted DPReview.com, here you can see the clipping that occurs within tools like Vegas, Premiere Pro and FCP when directly opening the MOV files. This zoomed in section shows much of the tree details are crushed into the blacks, when compared to the same sequence converted to an AVI using HDLink with CineForm NEO HD.

After some image enhancement, the black truncation becomes more apparent. These images where manipulated with a 32-bit levels filter (it is not truncating the data) so we see how much data is being lost, a failure to see "the trees from the forest" type of problem.

One common reason for all this error, is the camera H.264 I-frame compression is using 4:2:0 YUV, where display black is 16 and white is 235 out of a 0-255 luma range. If the NLE took this YUV data directly, everything should be fine, but instead is likely going through series YUV to RGB transforms that are truncating the data. Most NLEs extracting RGB from YUV sources map the 16-235 YUV to 0 to 255 RGB, truncating data in the supers, yet it turns out the Canon 5D doesn't even use much in super range (blacks between 0-15 and whites up to 255) as this non-truncated luma histogram shows:
It seems that the 5D is limiting the output to broadcast standards (yet another thing the 5D does wrong for video heading for post.) Whereas most video cameras do use the extra range, they assume the broadcast limiting will be handled in post (as they should.) So the NLE's mapping of the 16-235 to 0-255 RGB is actually not the issue, somehow the H.264/AVC decoder used is actually mapping a range like 30-220 only into the NLE space. I have not seem such a big error before, which makes me think there an incorrect flag in the 5D bit-stream that is causing the use of the wrong output math.
Luckly within CineForm NEO HD we use direct YUV to YUV conversion wherever possible, this eliminates many trunction errors, and preserves highlight for mulitple camera sources. In current version of NEO/Prospect HD (v3.4) we don't ship an AVC decoder, so NEO HD searches out for registered decoders already installed, resulting in some users reporting this error and others not so. So the failure is AVC decoder dependent, although this may not be a bug in the decoders, as they all handle regular AVCHD sources without issue (again leading me to believe there is something wrong/different in the 5D bit-stream.) The one AVC decoder that produces the full range of YUV range is CoreAVC. We have been recommending it to AVCHD users as it is both fast and inexpensive (only $15), but it seems it might have extra value for those trying to get the most out of their Canon 5Ds.
In our next major release of NEO HD (and up) we intend to direct support Canon 5D, yet in the meantime for those using CineForm products I recommend you get CoreAVC, the latest version of NEO or Prospect which now favors CoreAVC over any other AVC decoder it might find. This version is currently in public beta and will likely become official in a day or so.
------
1/21/09
Update 1: The new software is now released and available for upgrade or trial directly from cineform.com.
Update 2: I have discover more on AVC Decoders issues for the Canon 5D in the next post.
Monday, January 19, 2009
Full dynamic range video from Canon 5D MkII.
Tuesday, January 13, 2009
CineForm's Winning Streak
Not only did Slumdog Millionaire clean up at the Golden Globes this year, Slumdog being a mostly CineForm RAW acquired feature shot with the Silicon Imaging SI-2K Mini, one of CineForm's engineers just won a Audi RS4 (Audi Record the Rush Challenge) from a CineForm posted video he self produced also shot with an SI-2K and a Sony V1U. Looking to be a good 2009 for those at CineForm.
Wednesday, December 24, 2008
Mastering 24p DVDs from HD using Premiere Pro.
24p DVD mastering.
First some basics, there is no true 24p mode on standard DVD, there are is only 60i encoding (and 50i for PAL.) So all those film source are encode to DVD by adding 3:2 pulldown (or 2:2 for PAL with a 4% speed up for 24p sources.) How this pulldown is added impacts how well your DVD presents on today's common progressive displays.
The advantage of pulldown that uses the MPEG2's repeat flags, this can help with quality as only fields used to construct the 24p signal are compressed, the repeat flag pad the data out to 60i. This flags also help progressive scan DVD players reconstruct the correct 24p signal more reliably. The manually created pulldown in AE works for most situations as many DVD players can use the data-rate pattern to guess the pulldown, but it is not always extracted correctly (seen as a weave pattern during motion.) Of course there is no issue for non-progressive outputs where the display is reasonable for pulldown detection (if needed.)
The way I produced several 24p DVDs in the last weeks is to export out of Premiere as a 1920×1080 24p (23.976) master CineForm AVI, then I used VirtualDub and scale using Lanzcos 3 filter to 720×480 and export out to CineForm 444 SD. Load the SD clip back into Premiere SD 24p preset, interpret footage back to 16×9, and export with Adobe Media Encoder to MPEG2-DVD 24p. Encore will take this file without further transcoding. Now that seems to be an odd path and it is, plus using VirtualDub is unnecessary, but the export to 1920x1080 master first is a very important step.

Friday, December 12, 2008
What, no more Aspect HD?
After 5 years we are now retiring Aspect HD, and I say Yah!!!! David Taylor, CineForm's CEO, has post as to why on DVInfo.net, but I like this change as we no longer need to remove key features from Prospect HD to make Aspect HD (that is how it is built.) This will streamline development and testing, plus slicing off all the really good stuff always bothered me. We will still have entry level products in the NEO line (more news to come,) but today's customers are increasingly purchasing their first CineForm product at the Prospect HD level (some going directly to P4K as Red users really need a workflow.) Recently Aspect was falling into no man's land, too pricey for the hobbiest and too feature limited for many professionals. The Prospect product line now starts at $749, lowering the entry point for professionals and existing Aspect users can product jump for $199 (only around $50 more than typical upgrade between AHD versions.) This upgrade will also include the upcoming CS4 version of PHD.
Aspect and Prospect a short History.
5+ years ago when Aspect HD was first released it retailed $1199, it was the only HDV professional product of its day for post. The only HDV camera at the time was the barely HD single chip 720p JVC HD10U, so Aspect HD took in only one camera format, 720p HDV and converted into an 8-bit AVI for much easier post within Premiere 6.5 (wow, we come so far since then.) Aspect HD was upgraded to Premiere Pro 1.0 and we soon added 1080i support as Sony FX1/Z1U was coming (we have a bread-boarded prototype of the Z1 in box at the office -- somewhere.) Then HDV exploded, many great cameras, and CineForm implemented the first HDV support for Adobe into Premiere 1.5.1, and Aspect HD prices fell and the sales volumes grew. Around the same time a Prospect HD beta version was used in the post of Dust to Glory, the first film sourced (and HDCAM, DV, etc.) theatrical release ever to have had an compressed online DI workflow. Support for more and more cameras where added, XDCAM-HD, P2, AVCHD, etc. While Aspect was growing beyond it HDV roots (bumping up against it 1440x1080 8-bit limits,) and Prospect was turning in the swiss army knife for all input types with the addition of DPX sequences, XDCAM-EX, Grass Valley Infinity, SI-2K, Red, Dalsa, Phantom all with HDSDI I/O. Over the years of Prospect, feature additions includes 10-bit, 12-bit, 4:4:4, alpha channels, RAW compression, Active Metadata and much more. So today the Prospect line fits the role for today's indie professional, with so many input formats and many possible output types, it is nice to have an intermediate that handle yours resolution, bit-depth needs in real-time, without breaking the budget, your disk system, or the PC your are try run on. Aspect HD was being left behind when compared to Prospect, so I hope many Aspect users will make the jump to Prospect, as it is a big step up.
Bits of Fun
Here are a couple of videos internally created by CineForm engineers (plus friends) just for fun. The first is this year's entry to the 48 Hour Film Project. We drew the tough genre of "Holiday Film", so it is now seasonally appropriate (we created this one back in August.)
Competition requirements: a "Holiday Film" to be written, shoot, edited and delivered within 48 hours with these elements:
1) Character: Joe or Josie Beeble -- Construction Worker
2) Prop: Tweezers
3) Line of Dialog: Hey, have you heard the news?
The second is currently a finalist on www.recordtherush.com, which is a competition entry to help one of our engineers win an Audi S4. The entry is called Visceral Thirst, so please vote for Tim (he said I can have a drive if he wins.)
Both films where shot using an SI-2K Mini, although Tim used some Sony V1U footage (all the beautiful car shoots in Visceral Thirst are SI-2K,) and both where finished in tight time-frames using Prospect 4K and Active Metadata.
Wednesday, November 19, 2008
Intel Core i7 and CineForm
Wow! That was my immediate reaction when I first did a CineForm decoder performance test on the new Core-i7 processor. I've had access to these new Intel processors for a while now and I knew they where fast, I just didn't how fast. The system we very honored to have early access to was a Intel Core i7-965 Extreme Edition system (Nehalem architecture) running a 3.2Ghz quad core. When we first booted the system, we saw 8 CPUs within task manager, even though this is a quad core. These new chips have re-introduced the concept of Hyper Threading, each core can be setup as 2 virtual cores -- this means we will likely see 16 virtual CPUs in upcoming dual quad workstations. Nice! With so many virtual CPUs to run on, I knew we had to upgrade our decoder for better n-way threading (which the encoder already had.) This work I was most involved with over the last month, resulted a 50% boost in frame rate over our already fast decoder on Core-2 architecture dual-quads. Now it is time to test Core i7-965 .
In these tests I compared my beloved xw8600 HP workstation 3.16Ghz 8 core with 4GB RAM, running XP-Pro 4GB RAM, with a gaming configured desktop Core-i7 4 core running Vista 64 and 3GB RAM. No operations used GPU assistance.
Running with only half the number cores, this new processor nearly doubles the average performance of CineForm HD and 2K in 4:2:2, 4:4:4 and RAW formats, and even approaches real-time full resolution playback of 4K (a workstation class Core-i7 will be playing back 4K without issue from CineForm RAW or 4:4:4 encoded sources.) All this frame rate overhead greatly eases multiple stream processing and allows for huge efficiency increasing in batch processing of mezzanine and image archives. It also allows for much more Active Metadata (AM) processing through CDL style color databases, 3D LUT film looks and other yet to annouced AM features.
Intel and/or HP, when can I get my hands on an i7 dual Xeon? Please.
Where i7 didn't scale as well was with high quality 4K RAW demosaicing filters. Both the 4K R3D decodes and high quality debayer modes in CineForm RAW produce minimal speed-ups from 8-core Core2 to the 4-core i7 (still amazing considering the reduction in cores.) Looking at our own code, the demosaic has not used much of the SIMD (media) instruction set, nor is it particularly memory I/O limited, just lot of operations per pixel. It seems we do have room for more performance optimization in the demosaic.
All the transcodes where performed using the CineForm R2CF utility that comes with our NEO 4K and Prospect 4K products. R2CF has a very efficient implementation of the R3DSDK, allowing for close to 100% CPU utilization. I have included the R3D to CineForm transcode times, as REDCODE is known to be a particularly compute heavy format. These times do also include time for a CineForm encode, but this only effects the FPS numbers by around 10% as our encoder is very fast (up to ten times faster than a R3D decode plus additional processing [adding curves and color space controls.]) I'm showing the combined numbers as that is the CineForm workflow for R3D, you do a R3D decode once to convert to CineForm, then work with (decoding multiple time) CineForm files for the extra speed and flexibility.
I expect another factor in the widening margins for the CineForm decode performance on the Core-i7, is we avoid arithmetic coding, which is tricky and compute intensive for CPUs (and nearly impossible for GPUs to do efficiently -- we are asked about GPU acceleration often.) CineForm codec was always designed for speed on Intel processors, where faster memory and faster media instructions almost directly relates to proved frame rates, as we have compute-lite entropy coding engine. While arithmetic coding would increase bit-efficiency maybe 5-10%, the performance gains of 4-6X by not using it, made the easy choice when we started this codec work 7 years ago (on 1.7GHz P4s using MMX -- the fastest we could get could only do NTSC/PAL SD in real-time.) Now someone needs to suggest a fun use of for Express files running at 450 frame per second.
Tuesday, November 18, 2008
2K is still compelling
On my drive into the office I'm often listening to media related podcasts like TWIM, Red Centre, and Filmspotting. Today's drive I was catching up on Filmspotting podcast episode #235, which opens with a nice review of Slumdog Millionaire, the latest feature from Danny Boyle (Trainspotting, 28 Days Later, Sunshine, etc.) Now I knew this was Silicon Imaging SI-2K project, shoot as CineForm RAW, but other than that I've been too busy to learn anything more about. Filmspotting is a film review show, so not a techno-geek-out fest like Red Centre or elements of TWIM, so you never hear them talk about cameras, but after raves for the story, acting, narrative structure, there where high praises for the cinematography, amazed that is was digitally acquired and the types of shots where able to get in India, commenting "you do not film in the streets of Mumbai...you are taking your life into your own hands, and they actually did." Clearly this points to the huge advantage of a 2K camera with a real 11 stops of dynamic range at the size of deck of tarot cards. Yet this is "only" a super-16mm equivalent sensor, proving again that making a film has very little to do with megapixels and sensor size. Now I'll have to see the film, as it is getting a 92% freshness rating over on rottentomatoes.com.