I didn't check your math, but if you are capping from TV or tape, then there is probably noise, which will degrade the result. I would do this to get the best possible result:
1. capture in larger resolution, preferably using huffyuv(need a lot of diskspace, but you should use this, because it's lossless)
2. use some filters to get rid of the noise
3. crop any borders there might be(those degrade result)
4. resize the video back to some acceptable resolution, depending on desired filesize(to be safe, the resolution should be multiple of 16)
5. encode to final video along with the audio
steps 2-4 can be done at once, at least in virtualDub.
Hope this helps