koopa
17th June 2009, 04:00
I have a DVR setup that is meant to be capable or rendering fullly independent 704x576 pixels (in good light, with no motion), but is actually falling far short of that, with many video distortions.
http://www.2shared.com/file/6345303/97bdc1a2/sample.html
The worst thing is that the inputs off this DV cam are completely clean, but when it comes in and out of the DVR box, it gets all aliased and rainbowy.
Two questions:
1) What is a good script to de-antialias this vid, and
2) What causes this error, is it the worlds worst resize?
This is my best attempt to fix it so far:
**********************************************
LoadVirtualDubPlugin("C:\1Drv\VirtualDub-1.7.8\plugins\msu_smartdeblock.vdf","MSU_Smart_Deblocking", 0)
directshowsource("sample.avi")
converttoyv12()
spline36resize(352,288)
Bifrost(scenelumathresh=2,altclip=SSIQ(11,300,false),interlaced=false)
spline36resize(704,576)
source=directshowsource("sample.avi").converttoyv12()
MergeLuma(source, 1)
ConvertToRGB32.MSU_Smart_Deblocking(1, 1, 1, 1)
ConvertToYuy2()
saturation_v = 1.12
cv = - (1-saturation_v)*256
ColorYUV(gain_y=-26,cont_y=50,cont_v = cv, opt="coring" )
NNEDI().turnright().NNEDI().turnleft()
source=last
backward_vec2 = source.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
backward_vec1 = source.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec1 = source.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec2 = source.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
smooth = last
smooth.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)
LimitedSharpenFaster(SMode=4,LMode=3,Strength=120,wide=true)
**********************************************
It uses Bifrost to de-rainbow, but because the rainbow effect is so bad, I separated the luminance and chrominance, decreased the resolution of the chrominance, then Bifrosted it, then spline36'd it back to the original res and replaced the colour of the original video. There has been some loss of colour resolution, but the tradeoff seems worth it.
I then fixed the colour/luminance levels, antialiased the whole thing with NNEDI (seemed much better than EEDI2), temporal denoised it, and sharpened it.
There has been some blurring of the colour, some oversharpening of contrasts and over-smoothing of flat surfaces, but otherwise it has cleaned up the video quite a lot.
Please suggest anything that would help further, or suggest what the hell did this to the footage of some nice DV cams!
Cheers
http://www.2shared.com/file/6345303/97bdc1a2/sample.html
The worst thing is that the inputs off this DV cam are completely clean, but when it comes in and out of the DVR box, it gets all aliased and rainbowy.
Two questions:
1) What is a good script to de-antialias this vid, and
2) What causes this error, is it the worlds worst resize?
This is my best attempt to fix it so far:
**********************************************
LoadVirtualDubPlugin("C:\1Drv\VirtualDub-1.7.8\plugins\msu_smartdeblock.vdf","MSU_Smart_Deblocking", 0)
directshowsource("sample.avi")
converttoyv12()
spline36resize(352,288)
Bifrost(scenelumathresh=2,altclip=SSIQ(11,300,false),interlaced=false)
spline36resize(704,576)
source=directshowsource("sample.avi").converttoyv12()
MergeLuma(source, 1)
ConvertToRGB32.MSU_Smart_Deblocking(1, 1, 1, 1)
ConvertToYuy2()
saturation_v = 1.12
cv = - (1-saturation_v)*256
ColorYUV(gain_y=-26,cont_y=50,cont_v = cv, opt="coring" )
NNEDI().turnright().NNEDI().turnleft()
source=last
backward_vec2 = source.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
backward_vec1 = source.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec1 = source.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec2 = source.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
smooth = last
smooth.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)
LimitedSharpenFaster(SMode=4,LMode=3,Strength=120,wide=true)
**********************************************
It uses Bifrost to de-rainbow, but because the rainbow effect is so bad, I separated the luminance and chrominance, decreased the resolution of the chrominance, then Bifrosted it, then spline36'd it back to the original res and replaced the colour of the original video. There has been some loss of colour resolution, but the tradeoff seems worth it.
I then fixed the colour/luminance levels, antialiased the whole thing with NNEDI (seemed much better than EEDI2), temporal denoised it, and sharpened it.
There has been some blurring of the colour, some oversharpening of contrasts and over-smoothing of flat surfaces, but otherwise it has cleaned up the video quite a lot.
Please suggest anything that would help further, or suggest what the hell did this to the footage of some nice DV cams!
Cheers