Log in

View Full Version : Why am I getting a better result with yadif than with mcbob?


nikosvault
27th November 2009, 04:49
I’m new to this forum and avisynth (properly heard that before) so maybe I’m missing something completely obvious.

MCbob+nnedi should be the top of the line in terms of high quality deinterlacers, but I’m getting some small interlacing artefacts when I’m using it in my avisynth script. Then I use yadif and the effect disappears. There is no way yadif should be better, What I’m I doing wrong.

The source is a basketball game (25 fps pal)

yadig script

loadplugin("C:\AviSynth 2.5\plugins\ColorMatrix.dll")
loadplugin("C:\AviSynth 2.5\plugins\RepairSSE2.dll")
loadplugin("C:\AviSynth 2.5\plugins\mvtools.dll")
loadplugin("C:\AviSynth 2.5\plugins\medianblur.dll")
loadplugin("C:\AviSynth 2.5\plugins\RemoveGrainSSE2.dll")
loadplugin("C:\AviSynth 2.5\plugins\nnedi.dll")
loadplugin("C:\AviSynth 2.5\plugins\mt_masktools-26.dll")
loadplugin("C:\AviSynth 2.5\plugins\DirectShowSource.dll")
loadplugin("C:\AviSynth 2.5\plugins\yadifmod.dll")
import("C:\AviSynth 2.5\plugins\LimitedSharpenFaster.avsi")
import("C:\AviSynth 2.5\plugins\mcbob.avs")
DirectShowSource("C:\AviSynth 2.5\plugins\1.mpg")
ColorMatrix(interlaced=true)
converttoYv12(interlaced=true)
lanczos4resize(768,576)
AssumeTFF()
yadifmod(edeint=NNEDI())
LimitedSharpenfaster(ss_x=1.0,ss_y=1.0,Smode=3,strength=40)

Mcbob script

loadplugin("C:\AviSynth 2.5\plugins\ColorMatrix.dll")
loadplugin("C:\AviSynth 2.5\plugins\RepairSSE2.dll")
loadplugin("C:\AviSynth 2.5\plugins\mvtools.dll")
loadplugin("C:\AviSynth 2.5\plugins\medianblur.dll")
loadplugin("C:\AviSynth 2.5\plugins\RemoveGrainSSE2.dll")
loadplugin("C:\AviSynth 2.5\plugins\nnedi.dll")
loadplugin("C:\AviSynth 2.5\plugins\mt_masktools-26.dll")
loadplugin("C:\AviSynth 2.5\plugins\DirectShowSource.dll")
import("C:\AviSynth 2.5\plugins\LimitedSharpenFaster.avsi")
import("C:\AviSynth 2.5\plugins\mcbob.avs")
DirectShowSource("C:\AviSynth 2.5\plugins\1.mpg")
ColorMatrix(interlaced=true)
converttoYv12(interlaced=true)
lanczos4resize(768,576)
AssumeTFF()
MCBob()
LimitedSharpenfaster(ss_x=1.0,ss_y=1.0,Smode=3,strength=40)

Results

mcbob
http://img410.imageshack.us/img410/3705/74541222.png

yadif
http://img228.imageshack.us/img228/869/92149707.png

Revgen
27th November 2009, 06:00
Hey Niko,

Nice to see you here.

The problem with your script is that you are resizing before you deinterlace. You need to resize after you deinterlace. Resizing before deinterlacing destroys the interlacing. Yadif just happens to handle it better. MCBob doesn't work well at all unless the footage is really interlaced. Just add the lanczos4resize(768,576) line after MCBob() and yadifmod(edeint=NNEDI()).

Guest
27th November 2009, 06:09
No, he's resizing only horizontally because his source is PAL and the destination height remains 576.

Revgen
27th November 2009, 07:05
^Hmm, you might be right.

In that case, it would be better for him to just provide a sample.

Leak
27th November 2009, 11:10
I might be wrong, but doesn't MCBob have some kind of maximum precision (half-pel, quarter-pel, I dunno)? If so, it's probably matching the fields as good as it can (but obviously not perfectly) while yadif interpolates directly using information from the other field.

Just a guess, though.

Didée
27th November 2009, 21:34
(Welcome to those who manage to find the forum these days: IP change.)

@Leak - MCBob doesn't really have a halfpel/quarterpel setting. Regarding MVTools' motion engine, it just uses halfpel. Quarter pel could be used via MVTools, but that parameter is not exposed through MCBob. Also, I doubt it would yield any benefit. MCBob has enough other problems, subpel precision is one of the least. :D


@ nikosvault: are those pictures showing the original size, or are they zoomed-in? I'm wondering because e.g. on the letter "G", I see aliasing with a vertical stepsize of 3 pixels. Which is very strange.

Regarding the issue: that's not interlacing, but aliasing. It could be that there is some very slight motion, and MCBob has decided (via mtnth1+mtnth2) to consider those areas as static, and thus did weave the fields. You might crosscheck with some very low motion thresholds, like "mtnth1=0.0,mtnth2=0.05", to see if it improves. Perhaps switch also to mtnmode=2. And, just for testing and to be on the safe side, try lowering the error thresholds errth1+errth2, perhaps like "errth1=0.2,errth2=0.4".

Generally speaking ... if(!) those screenshots show 100% size, then the source is rather soft/blurry, with only little detail. If so, then just use YadifMod. On blurry sources with little detail, Yadif's methodology works pretty good.:D - And OTOH, even the slow+complicated MC bobbers can't improve much on such sources ... they would try to restore something that isn't there from the start.

nikosvault
5th December 2009, 20:23
(Welcome to those who manage to find the forum these days: IP change.)

@Leak - MCBob doesn't really have a halfpel/quarterpel setting. Regarding MVTools' motion engine, it just uses halfpel. Quarter pel could be used via MVTools, but that parameter is not exposed through MCBob. Also, I doubt it would yield any benefit. MCBob has enough other problems, subpel precision is one of the least. :D


@ nikosvault: are those pictures showing the original size, or are they zoomed-in? I'm wondering because e.g. on the letter "G", I see aliasing with a vertical stepsize of 3 pixels. Which is very strange.

Regarding the issue: that's not interlacing, but aliasing. It could be that there is some very slight motion, and MCBob has decided (via mtnth1+mtnth2) to consider those areas as static, and thus did weave the fields. You might crosscheck with some very low motion thresholds, like "mtnth1=0.0,mtnth2=0.05", to see if it improves. Perhaps switch also to mtnmode=2. And, just for testing and to be on the safe side, try lowering the error thresholds errth1+errth2, perhaps like "errth1=0.2,errth2=0.4".

Generally speaking ... if(!) those screenshots show 100% size, then the source is rather soft/blurry, with only little detail. If so, then just use YadifMod. On blurry sources with little detail, Yadif's methodology works pretty good.:D - And OTOH, even the slow+complicated MC bobbers can't improve much on such sources ... they would try to restore something that isn't there from the start.

Thank you for your detailed answer. Yes I did zoom :)

The lowering of motion thresholds worked. Should I just keep this adjustment or will it have any negative effects on the image quality?

Jenyok
30th March 2013, 16:31
Very high quality, super slow deinterlace script...
There is Only deinterlace.
.
Better quality then QTGMC script for deinterlace only.
.

ConvertToYV12(interlaced=true)

AssumeBFF()
#AssumeTFF()

edeintted = eedi3(field = -2, \
sclip = nnedi3(field = -2, \
qual = 2))

TDeint(edeint = edeintted, \
order = -1, \
mode = 2, \
sharp = true, \
mtnmode = 3, \
full = false, \
tryWeave = false, \
type = 2, \
emask = TMM(mode=1))