Colour+recovery+-+using+virtual+dub+filters

These were my first thoughts on this problem (for what they're worth!)

I envisaged using a Virtual Dub filter chain, starting with a deformation filter to try to correct geometric distortions.

The second filter would be a standard Deinterlacer, followed by a Resampling filter to take samples at 4 times the colour subcarrier frequency. I thought this would allow the PAL to decode itself, in the same way as a component digital VT samples a PAL composite signal to obtain the Y, U and V.

A fourth filter would use a matrix transform and multi-tap stage to separate out the U and V remnants, and a final filter would recombine these with the original Y.

The advantage of using a filter chain is that you could tweak each one of the filters in turn, and almost instantly see the results on the final recolourised image (assuming you were working initially with a single sample frame). So for example you could tweak the deformation filter until you saw some usable colour being salvaged.

The main problems with this are:

1) The phase lock would drift with each line due to the missing parts of the signal (i.e. the back and front porch, the sync pulse and the cropping of the active line which occurs during the film recording process). So you would have to rephase your sampling on every line.

2) There could be subcarrier frequency drift across the line.

3) The cropping of the active line means the subcarrier would be at a lower frequency than expected.

I think the first problem could be solved by using the PAL V-axis switch to detect the correct U/V phase.

The other problems would require a fourier analysis to detect the actual subcarrier frequency, and adjust the resampling rate accordingly.

All these things could in theory be done within a Virtual Dub filter; but unfortunately I'm not a C++ programmer, so I'm unable to design filters myself. I was hoping there'd be a general purpose matrix filter I could adapt; but have yet to find one.

Instead I hoped to experiment with a sample image using Photoshop and Jasc Paintshop Pro; but I don't have any suitable hi-res image to work with at the moment.

Sorry if this is all stating the obvious; but I thought some of it might be of interest to the group.