View Full Version : Faster interpolation than EEDI2?
kumi
24th December 2007, 09:50
Hi,
I am trying to squeeze some more quality out of my deinterlacer without breaking the bank, CPU-wise. Yadif() is fast, but I'm unhappy with the oil-painting look and the abundant artifacting. So I'm searching for something to plug into yadifmod(edeint=?). So far I've benched NNEDI, FastEDIUpsizer, and EEDI2. Here are the speeds, compared to Yadif():
13.89 FPS
Yadif()
8.79 FPS (WINNER! :D)
TDeint(type=1,hints=false,slow=0)
vinverse()
5.25 FPS (Good choice for fast+high-quality)
tdeint(hints=false,type=1,slow=0,emask=tmm(length=6,ttype=0,mtqC=0,mthC=0))
vinverse()
4.64 FPS
tdeint(hints=false,type=1,slow=0,emask=tmm(length=6))
vinverse()
3.00 FPS
interp = separatefields().selecteven().eedi2(pp=0)
yadifmod(edeint=interp)
2.75 FPS
interp = separatefields().selecteven().eedi2()
yadifmod(edeint=interp)
1.87 FPS
interp = SeparateFields().SelectEven().FastEDIUpsizer(mvar=32).BilinearResize(720,480)
yadifmod(edeint=interp)
1.69 FPS
interp=NNEDI()
yadifmod(edeint=interp)
All three EDI scripts look much much better than yadif() alone, but they are just too slow. Isn't there a lower-quality and faster clip that I can plug into yadifmod's edeint parameter? I would settle for an extra 2 or 3 FPS faster than EEDI2(pp=0), really. But I have not found any other candidate plugins to test from searching doom9 and google, so I ask here. Cheers!
scharfis_brain
24th December 2007, 10:03
Sangnom() is really fast.
On 352x576 videos it is able to interpolate one field in realtime.
But this all comes with cost of strong artifacting in image areas of high detail.
kumi
24th December 2007, 10:44
Thanks, I checked it out and you're right: it's blazing-fast. But I can't seem to find a good balance between anti-aliasing and artifacting, so Sangnom() is out of question.
Any other suggestions would be most welcome.
tritical
25th December 2007, 04:06
These might still be too slow for you, but you could try:
tdeint(mthreshL=-1,mthreshC=-1,hints=false,type=2)
or
tdeint(mthreshL=-1,mthreshC=-1,hints=false,type=3)
type=2 is kernel interpolation. type=3 is rather crappy, but pretty fast, edge directed interpolation.
kumi
25th December 2007, 06:01
Thank you, they are quite speedy compared to yadifmod+EEDI2, and in fact I had been reexamining your tdeint() as a deinterlacer today, before you replied. I haven't had time to benchmark though.
I tested your suggestion of dumb-bobbing with mthreshL=-1,mthreshC=-1, but that obliterates the onscreen characters of the DV stuff I'm working on. And there is a lot of onscreen text unfortunately.
tdeint(type=2) is what I first discovered for deinterlacing. Eventually I switched to yadif() to avoid the aliasing (it's just too much for me, I'm afraid.)
tdeint(type=3) looks a lot like Yadif() to me. There is reduced aliasing which is nice, and some of the edges are very well defined. But it makes many types of thin lines thinner, are the artifacts around certain fine lines are far too prominent and "yadif-like" (hard dots instead of "bubbles"). It's especially annoying on human faces, where the lines in between the teeth (of a grinning smile) can get obliterated, and the edges around the eyes sometimes get little streaks. The result is unpleasant and reminds me of an oil-painting. I can imagine this mode is well-suited for Anime.
tdeint(type=1) is the best tdeint mode I've found. It is mid-way between type=2 and type=3 in aliasing, which is acceptable. It does not oil-paint over human faces like type=3 and yadif(). It artifacts on certain types of thin lines and high-contrast edges, but the artifacting is much more subdued than type=3 and yadif(). That is: less "dotty" and more "aliasy" or "bubble-like". It preserves the thickness/thinness of lines and patterns better than type=3 & yadif().
So tdeint(type=1) seems to be a good match for this sort of live-action DV material. The only problem I have is some slight artifacting which (AP=20,APType=2) and/or vinverse() seems to cure. Oh, and the internal motion mask plays havoc on the abundant on-screen text when there is background movement. I have found TMM() to be wonderful in fixing this, but the speed drops dramatically... I will do some more test of TMM and benchmark stuff tomorrow. TDeint rocks :D
kumi
25th December 2007, 21:38
8.79 FPS
TDeint(type=1,hints=false,slow=0)
vinverse()
4.64 FPS
tdeint(hints=false,type=1,slow=0,emask=tmm(length=6))
vinverse()
5.25 FPS
tdeint(hints=false,type=1,slow=0,emask=tmm(length=6,ttype=0,mtqC=0,mthC=0))
vinverse()
Hmm... TMM() is almost half the speed of TDeint alone, yet still significantly faster than yadifmod+EEDI2 and has significant advantages over both (artifacting & onscreen text mostly). It's quite slow, but will be worth it on some videos. As for routine deinterlacing, I'm probably going to start using TDeint(type=1,hints=false,slow=0).vinverse()...
By the way, if I set mthreshC=-1, but don't touch mthreshL, should I set link=0?
kumi
26th December 2007, 03:24
Hmm, I wonder if it's possible to feed tdeint's interpolated pixels into yadifmod. This looks quite good, similar to the improvement seen with TMM:
interp=tdeint(hints=false,type=1,slow=0,mthreshC=-1,mthreshL,-1)
yadifmod(mode=0,edeint=interp)
...but, contrary to what I expected, the speed is slower than this script:
tdeint(hints=false,type=1,slow=0)
So it seems yadifmod's motion mask creation (I think that's what it's called) is actually slower than tdeint's. Or am I doing something wrong in that first script?
tritical
26th December 2007, 05:19
By the way, if I set mthreshC=-1, but don't touch mthreshL, should I set link=0?
link=0 or link=2 would give the same results in that case, but 0 would be faster since it wont have to do anything.
So it seems yadifmod's motion mask creation (I think that's what it's called) is actually slower than tdeint's. Or am I doing something wrong in that first script?
The difference is because in the first script TDeint only runs the interpolation on pixels that it decides not to weave... so it is calculating the motion mask, but only interpolating some of the pixels. Whereas in the second script TDeint isn't generating a motion mask, but is interpolating every pixel. Complexity wise, interpolating every pixel with type=1 is more costly than creating the motion mask and interpolating only some of the pixels. On top of that, yadifmod has to create its own motion mask... so I would actually expect the second script to be slower. There isn't any real way to speed it up though since yadif requires a spatial prediction for every pixel (you can't just calculate the interpolated values for only some of the pixels).
kumi
26th December 2007, 05:32
Ah, that explains it. And helps me finally understand weaving/interpolating. Thanks for the help.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.