Thursday, October 26, 2006

Resolution Revalation

Hey, ev-ery-body.

Yeah, the apocalypse with the shoulderpads and the sadness... eh, I'm half over it. Half. Much as I'm depressed and angry and kinda' worried and all that crap, I refuse to let any sort of blog I put up degenerate in to an Emo love fest in which I curse my family and life, which despite being very poor ain't half bad. That's what talking to me on the phone or on AIM is for and you know it. I'm still happily married, I still have ramen noodles and coke, and if my boss comes through I may not have to I.O.U. everyone's X-mas gift this year. So, back to work, eh?

I'm not actually OFF eBay, I just need to shift my focus from yaoi to... something else. While hentai is kinda' out by default (bastards are wise to me selling Haitoku no Shoujo 'n all), I have other, less pornoriffic films currently on the block. Esoteric, crazy stuff that may or may not make me a pittance. But with nearly $30 worth of listing fees having been restored to my account, I may as well go for broke and see what I can do.

Now then, it's time to bring up something that may make your head hurt. Hurt like a throbbing sum'bitch, infact. If you don't like math - and lord knows I don't - you may want to skip this entry entirely. I wish I could, but I need to get everything all orderly in the ol' noodle before moving on with my plan.

I have films on VHS that don't have any better release available to them. VHS, the dead tape based bastard that it is, wasn't all -that- bad. Certainly the color reproduction was poor, at best, there was a lot of chroma noise, and worst of all basic playbakc devices introduced time base errors that made the video all... wobbley. Pop in an old tape, particularly in a cheap VCR, and watch how straight lines bend and wiggle. While I love that DVD can have uncompressed PCM audio, component mastering that kills the rainbow effect and 720 by either 480 or 576 glorious lines of resolution... the fact that straight lines are perfectly straight makes me love it more than anything. I've since learned that laserdisc does this as well... but that's so not what I'm getting in to, so I'll let it ferment while I move on.

Now, the biggest problem VHS faces is the resolution. Resolution is a tricky thing; "more" doesn't mean "better", and analog versus digital resolution is, quite simple, teh suck. It doesn't make any sense, but neither does how video works, so I suppose that's fitting. To put it simply, digital video is a very controled source; you have 720 lines going horizontally, 480 going vertically on any NTSC signal. Hence, full "D1" NTSC is 720 x 480. The NTSC signal in the analog world is 720 x 525, no matter WHAT you're feeding it: perfectly encoded DVD, 20 year old unwatchable VHS tapes, whatever. NTSC is what it is, and that's 720 x 525. The digital realm created the nearest equivalent, which just happened to be 720 x 480. Seems simple enough.


Now, VHS is about 240 lines of resolution. What this means is that the signal is, in theory, 240 lines by 480 lines. The problem is, the signal is stored as analog video. Analog isn't a series of lines going this way and a series of lines going that way. It's more like a seemingly random assortment of dots that fluctuate in and out to create a 720 x 525 signal. Whenever you hook a DVD player up to a $6,000 HDTV using component video, the same thing is happening - you convert the digital signal on the DVD to an analog NTSC signal, and then the TV re-converts that back to the TV's resolution. Whatever that may be. Either way, NTSC is limited to 720 x 480, and whatever size the video file REALLY is, to view it on NTSC compatable equipment it's being converted - up or down - to 720 x 525 analog NTSC. In other words, what you save the the video at doesn't matter, as long as it's less than or equal ot 720 x 480. Killer, right?

Well, we established that VHS in the analog world had, oh, 240 x 480 resolution. For years, people said VCD was "VHS Quality". I've thought for many years that these people were simply on drugs. Really awesome drugs. They argue "both has 240 lines of resolution". Well, yes. But on the wrong axis. VHS in the digital realm is something like 240-280 x 480, really. Depending on how it was recorded, how stable those unpredictable analog dots are, etc... the quality of the tape and how it was recorded can have a huge impact on just how that works. VCD has a resolution of 352 x 240 in the digital realm.

352 > 240. Okay, VCD wins for vertical resolution.

240 < 480. VCD fails, right here. When fed 480 lines of resolution, it deinterlaces it by default. Weak!

SVCD has a resolution of 480 x 480. VCD's 352 x 240 is compatable with every single DVD player manufactured by spec, but 480 x 480 is totally optional. So that fucker's right out, despite having more than enough resolution to tickle my fancy.

So what about CVD resolution? It's less commonly used, and was never as popular as it's better known little brother, but let's check the resolution on that bastard format which was just as developed as S/VCD, but managed to be even less popular for reasons I'll never understand:

352 > 240. Heard that before.

480 = 480. Bing-bong, hello!

Here's the gravy in this situation: CVD standard is mandatory acceptable resolution in every single NTSC compatable DVD player that bears the DVD logo.

Game. Set. Match, motherfucker.

Now, here's the fun part: why I explained this relatively esoteric and complex formula, at length. I have a lot of VHS material recorded at high bitrates of 720 x 480. I want to re-encode it, for various reasons (including color correction, or fitting more material on a single DVD-R). Now, the way compression in MPEG works is you use a set chunk of data - let's say 5 megabits per second - over a one second period. The higher the compression/the smaller the filesize, the less visible compression you'll get. Which means the higher quality you'll see.

Now, let's do some math again. D1 resolution, 720 x 480, is a total of 345,600 pixels. 352 x 480, meanwhile, is a total of 168960 pixels - in otherwords, "Half D1" has about half the pixels of "Full D1". Now, if we were to encode 2 clips at 5 mbps (megabits per second). Which one is going to have more "visible" compression problems, the one that's got twice as many pixels, or the one that's got half as many? The answer is the bigger video will have bigger, and more visible compression problems. That's not to say that the smaller one will look "perfect", but to get the same quality, you basically have to double the birate. What I'm driving at is, when your video resolution (ie; number of pixels per frame) is twice as large, you need twice the bitrate to keep the quality the same as half the pixels-per-bitrate.

So, at 720 x 480, I can fit 1 hour at 9 mbps with more or less perfect quality. At 352 x 480, I can fit 2 hours at 5mbps with more or less perfect quality. I'd lose resolution on DVD or LD sourced material, but for VHS, there's simply not enough detail in the original signal to justify Full D-1.

So with all this conceptualizing back and fourth, here's the REAL question: does Half D-1 on VHS material look as good as Full D-1?

Here's a recent test I did for ISHII Teruo's infamous pinku violence film released in Germany as TOKUGAWA III: IM REICH DER SINNE (Realm of the Senses - also known as 'Orgies of Edo' and 'Genroku Onna Keizu', which means "Genealogy of Genroku Era Women"... give or take), a film desperately in need of a Kentai Films restoration. Released only on VHS in Japan to this day, there was a German DVD... but it was taken from a vintage (early 1970's) theatrical print, and has not only plenty of problems with scratches and grime on the print, but was heavily edited by the German censors all those decades ago. Forget that it's dubbed in Deutsch. It IS anamorphic widescreen, but a detailed print of a heavily edited film just isn't doing it for me.

When comparing these screencaps, remember: BIGGER IS NOT BETTER! They'd both be blown up considerably to fit either a TV or a computer screen.

First up, we have the untouched D-1 MPEG master file. It's pretty soft... well, that's the way VHS is. It's also a bit macroblockey to begin with - that's what happens when you record soft video at roughly 5mbps at 720 x 480, which happens to be the way that NTSC DVD recorders do their thing. It's actually notably better on "actual" playback, and screencaps are never a fair way to judge a transfer since, most of the time, they let you focus in on the flaws. So, this is the "original". Total size: 3.38 Gigs.




And here's the Half D-1 MPEG master file. I didn't correct the colors (tried to, and the results weren't too pretty... let's forget that ever happened?), and I -did- apply a "sharpening" filter. Why? Because VHS has low resolution and edge enhancement (lightly colored 'halos' around solid colors, giving an artificially "sharper" image) to begin with, and adding a sharpen edge filter basically just brings out the texture that's somewhat inherent as video noise. In short, what it does is dither the solid areas, making the picture "grainier". It's no substiture for natural film grain, but you won't find any of THAT on a VHS print, so this little trick helps to emulate what the film "should" look like. With all that in mind, take a look at the (not so) fine detail, on the kimono, in the reflections of the hawtly painted concubine, the wrinkles in the shogun's bad bald cap wig... between the resizing, sharpening filter, and re-encoding at HALF the average bitrate, do you honestly see any difference between the two? I know I don't. And with file sizes like this I can fit not 1, but -2- full length VHS movies on a single DVD without any 'real' quality loss. Nice! Oh yeah, total file size: 1.8 Gigs. Day~um!

So, dear friends, my question is this: is any ACTUAL detail lost on the Kentai Films remaster? Personally, I don't see ANY goddamn difference in perceptible detail in either of them, nor do I see any "crawling" artifacts that are associated with low bitrates and MPEG. I'll be the first to admit that the video being (heavily - 2.35:1 scope!) letterboxed helps the bitrate stay strong since only about a third of the image is shifting in any notable way, but still, this a real world test, with real world results. If I could encode my masters at 5mbps

Ugh. Well, that's my post-apocalyptic thought for the day. I'm still broke, still kinda' hungry, and still not sure quite what to do with myself... but at least I'm still trying to do what it is that I do.

No comments: