PDA

View Full Version : Any chance to improve this DVD: Decomb? Deblend? other filter?


kypec
26th March 2010, 17:22
Dear fellow experts,
please have a look at this sample (http://www.mediafire.com/file/0mujzzygyyt/sample.zip) demuxed from original DVD and give me some advice which filter could improve that horribly looking frames?
All I know is that this is not regular interlaced MPEG-2. It's progressive but almost all mid/high motion scenes are awfully combed. Is it possible to repair somehow such frames at all?
http://i39.tinypic.com/swwryg.jpg
TIA, kypec.

osgZach
26th March 2010, 17:56
I'm not familiar with how PAL sources work (no telecine?).. Someone who knows more than me will tell you for sure.

Also don't include your D2V as 1) you set it to include absolute paths, and 2) it references 3 different VOB's and not the m2v you included. An M2V file will suffice when providing samples, we can re-index them on our end.

TempGaussmc_beta2().SelectEven() from what I can see will work on this, but it is an extremely slow filter unless you have a Dual Core, Quad Core, or better CPU (and then would require using a multithreaded Avisynth mod to gain th speed). Sure other deinterlacers will work fine too, but again, don't know what to tell you in the case of PAL. I'm an R1 guy.

TGMC does give exceptional quality however, so if you don't care about speed you can go ahead and use that. Unless I'm just totally wrong about this :p

Also you seem to have some rainbowing, you should get that taken care of too. Not too familiar with rainbow removal filters, however. So I'm not much help in either case

Didée
26th March 2010, 18:19
From what I see, there's not much point to pull out the big guns. The odd fields stand by their name, they're odd. Their chroma is b0rked, and a quick empirical test shows that their luma isn't very important, either. (In particular, the odd fields are sufficiently funky so that TGMC can not pull anything useful out of them.) I'd just kick the odd fields out.

mpeg2source("sample.d2v")

bob().selecteven() # fast & easy

# NNEDI2() # alternative #1, slower
# separatefields().eedi2().selecteven() # alternative #2, slower

return(last)

StainlessS
26th March 2010, 18:50
Hi Kypec

This below code shows either Didee's fixed clip or the dodgy Odd fields
so that you can better see what the problem was.


MPEG2Source("D:\AVS\sample.d2v").AutoYUY2(mode=0)
Return Bob.selectEven().Test() # Fixed
Return Bob.selectOdd().Test() # Dodgy
Return SeparateFields().Test() # Unfixed, maybe more apparent


Function TesT(clip Last)
{
ChromaU=ColorYUV(cont_y=-256,cont_v=-256,cont_u=256) # Y=128, V=128, U *2 AMPLIFIED
ChromaV=ColorYUV(cont_y=-256,cont_u=-256,cont_v=256) # Y=128, U=128, V *2 AMPLIFIED
Grey=GreyScale() # U = V = 128
T=StackHorizontal(Last,Grey)
B=StackHorizontal(ChromaU,ChromaV)
Stackvertical(T,B)
return last
}



Nice job Didée :)

kypec
30th March 2010, 07:14
Thanks Didée, your approach did the trick.
Currently my script looks like this:# Initialize variable with path to my A/V tools
avdir=GetSystemEnv("PROGRAMFILES")+"\AVTools\"
# Load all the plugins that will be used in the script
LoadPlugin(avdir + "dgmpgdec\DGDecode.dll")
LoadPlugin(avdir + "plugins\nnedi2.dll")
LoadPlugin(avdir + "plugins\ColourizeSmooth.dll")
# Open source video clip
MPEG2Source("sample.d2v",info=3)
bob().selecteven().NNEDI2() # fast & easy, alternative #1, slower
ColourizeSmooth(false,1,false,0,195)
Now, there is just one more flaw in the output that I like to improve before running full x264 encode.
This is frame #56 -> it's fine, I wish all frames looked like that
http://i44.tinypic.com/o1big.jpg

This is frame #64 -> note the colour artifacts at bear's hat and scarf, ColourizeSmooth apparently didn't help here.
What other filter would you recommend to smooth such flat uniformly coloured areas?
http://i39.tinypic.com/szagxd.jpg

tengo6dedos
30th March 2010, 15:46
Hello, that is chroma noise. If you want to stay fast and simple try fft3d for the noise and awarpshap for the badplacement, that is the green on the borders. It is something like this:

FFT3DFilter(plane=3, bt=3, sigma=3, sigma2=3, sigma3=30, sigma4=3, bw=32, bh=32,ow=16,oh=16)
mergechroma(AddBorders(4, 0, 4, 0).awarpsharp(depth=20.0, thresh=0.75, blurlevel=2, cm=1).Crop(4,0,-4,0))


Also you may want to add "cpu=4" to mpeg2source to clean at least a little the luma.


And you dont need bob().selecteven() + NNEDI2(), just put NNEDI2()




Saluts

kypec
30th March 2010, 22:08
Thank you very much tengo6dedos, FFT3D works wonderful. I couldn't get awarpsharp to work, in which package is it included?
And what green on the borders you meant to eliminate it with? Do you mean that little greenish spots along the edges of bear's fingers?
P.S. I used bob().selecteven() because Didee suggested it this way. I wouldn't dare question an advice of someone with his knowledge and experience! :stupid:

Didée
30th March 2010, 22:22
Perhaps I wasn't clear enough ... see the comments in the script state "alternative". I meant either bob.selecteven (very fast filer, just to see the result very quickly) - OR NNEDI2, - OR separatefields.eedi2. Only one out of those three. Not a combination of those.

kypec
31st March 2010, 06:02
Yeah, now I see what you had in mind Didee, thanks again.
I made the final touches to my script and must say the outcome is JUST INCREDIBLE, thank you all for fantastic help, much appreciated:thanks:
BTW I've used rewritten aWarpSharp from SEt (http://forum.doom9.org/showthread.php?t=147285) instead of original (little bit buggy) one.
# Initialize variable with path to my A/V tools
avdir=GetSystemEnv("PROGRAMFILES")+"\AVTools\"
# Load all the plugins that will be used in the script
LoadPlugin(avdir + "dgmpgdec\DGDecode.dll")
LoadPlugin(avdir + "plugins\nnedi2.dll")
LoadPlugin(avdir + "plugins\FFT3DFilter.dll")
LoadPlugin(avdir + "plugins\aWarpSharp.dll")
# Open source video clip
MPEG2Source("sample.d2v",info=3,cpu=4)
NNEDI2()
FFT3DFilter(plane=3, bt=3, sigma=3, sigma2=3, sigma3=30, sigma4=3, bw=32, bh=32, ow=16, oh=16)
aWarpSharp2(thresh=160, blur=2, type=0, depth=16, chroma=4)