Color voodoo

The process by which real life turns into digital video is, by all accounts, pretty arcane. Not necessarily because of bad design decisions (though there are plenty of those) but just because real life is very complex, and our tiny little brains haven’t figured out great ways to capture it.

In any case, color sampling and color spaces is an area that trips up many folks in this field. You’ve got analog ranges, digital ranges, 8bit, 10bit, 12bit, and then you’ve got color profiles on the computer to contend with.

DV.com has a two part article (part 1, part 2) dealing with color spaces in video. Take a look if you’re at all interested in understanding why your image changes colors when you move it from Photoshop to Final Cut, or from your Mac to a PC. Keep in mind though, that all of this happens separate of the color subsampling step. The detail lost by going to 4:2:2 or 4:2:0/4:1:1 is independent of the latitude lost due to color space conversion.

Pan’s Labyrinth VFX

FXGuide has an article up about the VFX in Pan’s Labyrinth. It’s a film I really hope to see soon. It sounds like there was a fair amount of practical work done on the set – from the trailer, I was sort of expecting that every shot would be a VFX shot. It’s worth reading to just to learn about all the tools that were used. I’m not well schooled in the world of 3d, but I’m always interested to hear people talking about the ways in which one renderer can be worlds above another. A lot of kung foo going on there.

Greatest Email Ever

This has nothing to do with video, but I just got this email from my polisci professor and can’t stop laughing. The paper was about Iraq policy …

Hi all,

We have one final exam paper that doesn’t have a name. The paper has no title page, all the class info in the upper left-hand corner of the first page, and the first sentence reads: “The strapping hero stands, sword in hand, ready to slay the mighty dragon; two powers evenly matched.”

I’m assuming this is a final exam and not a review of “Eragon,” so please send an email to me and the two TAs (Cc’d above) if this is your paper.

Apple Patent for Dynamic mpeg encoding

Macnn has a post about a recent patent granted to Apple for dynamic field/frame encoding of MPEG. It’s not terribly exciting, but I figured I’d comment since I’ve seen some other sites mischaracterizing it.

Basically, when you have interlaced video, you get better codec efficiency if you compressed each field separately, instead of compressing a frame made up of two fields combined. The reason is pretty straightforward. A field is more or less a picture of your scene, taken once every 60th of a second. So, two sequential fields can be very different if there’s fast motion or the camera is moving. MPEG encoding works in terms of macroblocks – 16×16 blocks of pixels. If there’s lots of continuity among the pixels in that block, you’ll get good compression. However, if every other line in that block is totally different, you’ll either get terrible compression or have terrible quality. So, with interlaced video, field based compression is great. With progressive video, or animation, or other non-interlaced video, you’ll get better efficiency with frame-based encoding.

That’s great if you’re able to tell the compressor in advance about the source video. However, with many video codecs, it’s not easy to programatically determine whether the video is interlaced or progressive. It gets even worse when both formats are mixed within a single video!

What Apple’s patent proposes is a compression process that dynamically selects between field-based and frame-based encoding with each macroblock. The only bit that really matters is the discrete cosine transform on the luminance macroblock. So, Apple does two DCTs on the macroblock (actually double that, but then it gets confusing), one treating the block as if it were field based, and one treating it as if it were frame based. Because a DCT can easily be vectorized, you can do multiple DCTs in parallel. Then you just check to see which block has the most zeros and use it.

With H.264, the entropy encoding (CABAC or CAVLC) takes far more CPU than the DCT, so this is a pretty clever way to get better efficiency with a really simple addition.

Rock on.

Film School in a Box

Stealing shamelessly from DVGuru today – Check out Film School in a Box. They’re selling harddrives preloaded with all the footage from a 90 minute film, with 9 camera angles for every scene. They’ve set it up as a multicam project in Final Cut, so that you can go through and cut the film in the way you want, with the angles you want. I think this is a pretty cool concept as a way to learn about story telling through editing. You can do it all in realtime. Slick.

I’ve been Living a Lie

All this time, I thought I was working with HD. You know, the beautiful HD images produced by our $9,000 Canon XL-H1s, or a $25,000 Sony F350.

I was wrong.

You see, I was reading Wired tonight, and stumbled upon a Canon ad which explains that their new HV10 shoots in “True HD,” because it has a 1920×1080 imager. Everyone else is just a poser.

Time to throw out the XL-H1s I suppose. Or maybe not.

You see, the HV10 is an HDV camera. Which means that the signal it puts to tape is 1440×1080. Just like all 1080i HDV cameras. Some 1080i cameras (Sony HVR-V1U) have chips that are actually lower in resolution than 1440×1080. Some, like the XL-H1 and the XDCam have chips that are exactly 1440×1080. It seems nobody else has deemed it necessary to build a camera that images at a higher resolution than it records. Wonder why?