PDA

View Full Version : Aligning DVD -> VHS -> capture with original DVD


mg262
3rd December 2005, 19:03
I want to try writing the AVISynth equivalent of a hardware detailer, i.e. a box that brings out video detail by boosting high frequencies. Since I can't find any precise specifications for a detailer, I thought I would try copying a DVD to VHS, capturing the VHS, and comparing with the original to see which frequencies have been attenuated and by how much.

So far so good, except that unless I'm extremely lucky with the capture window I'm not going to get 1 captured pixel per DVD pixel and, less importantly, there may be horizontal drift between scanlines. (My Panasonic NV-SV121 VCR has a TBC which may help with the latter, but I don't think it will eliminate it completely.) Resizing after capture isn't an ideal solution because any resizer introduces its own distortion. If possible, I need to get hold of a capture where the pixels match up 1-to-1 with the original DVD pixels.

Can anyone think of a way around the issues mentioned? [My capture device is a msi TV@nywhere master. It will be a while before I try this, so there's no hurry to reply.]

gnuz187
3rd December 2005, 20:58
I also have an MSI TV@nywhere Master and used the program originally created by tedkunich in this thread (http://forum.doom9.org/showthread.php?t=79819) to reset the horizontal delay and horizontal scale registers to the default values specified in the CX23883 datasheet since the values that the MSI drivers default to are far out of whack. The default values given in the datasheet appear to give a perfect 53.3333us capture window.

I can attach a copy of the compiled program, but first I'll need the base address for your capture card since it's absolutely needed (see this post (http://forum.doom9.org/showpost.php?p=526532&postcount=10) from the above thread). Mine was the same as tedkunich's so I didn't have to change it, but yours might be different. Download and run RegSpy (http://sourceforge.net/project/showfiles.php?group_id=7420&package_id=69037), choose your CX2388x card in the drop-down list, and reply with all of the values under "Hardware" (video decoder, vendor ID, device ID and subsystem ID). I'll get back to you with a copy of the program for your card.

mg262
4th December 2005, 10:07
gnuz187,

That would be absolutely brilliant! Thank you very much.
CX2388x Card [0]:

Video Decoder: CX2388x
Vendor ID: 0x14f1
Device ID: 0x8800
Subsystem ID: 0x86061462
(By the way, there really is no hurry for this... so please take your time.)

gnuz187
4th December 2005, 20:45
There's one more thing you must do, and that's download and install the MemAccess Library (http://www.zealsoftstudio.com/memaccess/download.html) since it's needed to access and change PCI registers. This is an evaluation version so you'll get "countdown" windows once in a while. Wait and press "OK" to get back to CX Tweaker.

Once that's installed, follow these steps:

1) Run your capture program and configure it to your liking (capture resolution, capture filters, etc.).

2) Open the attached "CX Tweaker.exe" and click on "Get Base Addr". Make sure the address beside "Address(*)" is the same as the address beside "Base Address:". If not, close the program since something is wrong. It should be though, but I don't promise anything since tedkunich wrote this is a "very ugly hack" as a comment in the source :p.

3) If the addresses are the same, go ahead and click on "Read Registers". This reads the values of the registers that pertain to horizontal and vertical settings on the chip.

4) Click on either "NTSC Defaults" or "PAL Defaults (CCIR601)" depending on your location to change the horizontal delay and scale to the datasheet defaults. Since you're in the UK you'd choose "PAL Defaults (CCIR601)". I haven't tested the PAL defaults since I'm in Canada so get back to me if you have any problems with it.

5) Begin capturing in your capture program, but DON'T press play on your analog source (VCR, TV, etc.). When you start capturing, the capture card's drivers reset the registers to the driver's defaults. You want to override this using the next step.

6) Click on "Write Registers". The preview in your capture program should change instantly according to the settings you changed in CX Tweaker.

7) Press "Play" on your analog source.

I hope this works out for you.

EDIT: I forgot to add, for those that code in Visual Basic you may have noticed that this program looks similar to tedkunich's but is not the same. This is because I've gotten rid of some settings that most people shouldn't need to change, left only horizontal and vertical delay/scale/filter settings, cleaned up the GUI a bit, added a small bit of code to automatically detect the base address of the capture card and also some code to streamline what you're supposed to click. There's no need to compile this program twice to get the base address and thus it *should* work for all owners of this card.