Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
6th August 2008, 23:34 | #42 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Ok, Seraphic, here's the function using EEDI2 for you. Twice as slow.
Code:
function ESharpAAMC(clip orig, float "ds", int "ShPre", int "ShPost", int "SmPost") { ds=default(ds,0.2) #strokes darkening strength ShPre=default(ShPre,80) #Presharpening ShPost=default(ShPost,300) #Postsharpening SmPost=default(SmPost,100) #Postsmoothing a=orig.assumetff() w=width(a) h=height(a) m=logic( a.DEdgeMask(0,255,0,255,"5 10 5 0 0 0 -5 -10 -5", divisor=4,Y=3,U=3,V=3) \ ,a.DEdgeMask(0,255,0,255,"5 0 -5 10 0 -10 5 0 -5", divisor=4,Y=3,U=3,V=3) \ ,"max").greyscale.levels(0,0.8,128,0,255,false) b=a.Toon(ds).Warpsharp(depth=ShPre) b=b.TurnLeft().EEDI2().TurnRight().EEDI2().spline64resize(w,h,0.5,-0.5,2*w+.001,2*h+.001) b=b.LimitedSharpenFaster(edgemode=1,strength=ShPost,overshoot=1,soft=SmPost) mt_merge(a,b,m,Y=3,U=3,V=3) sD=mt_makediff(a,last) fv2 = a.MVAnalyse(isb=false,delta=2,idx=13) fv1 = a.MVAnalyse(isb=false,delta=1,idx=13) bv1 = a.MVAnalyse(isb=true, delta=1,idx=13) bv2 = a.MVAnalyse(isb=true, delta=2,idx=13) sDD = sD.MVDegrain2(bv1,fv1,bv2,fv2,idx=14) reduc = 0.4 sDD = mt_lutxy(sD,sDD,"x 128 - abs y 128 - abs < x y ?").mergeluma(sDD,1.0-reduc) a.mt_makediff(sDD,U=2,V=2) return last }
__________________
...desu! |
6th August 2008, 23:55 | #43 | Link |
Fighting spam with a fish
Join Date: Sep 2005
Posts: 2,699
|
Hell, I can't tell the difference. I'll stick with the sangnom one.
Although, I got maa() (from the animeivtc package) and some other filters to achieve essentially the same results, with a much faster render time. Sure, it's not exactly the same, but it works. |
7th August 2008, 00:00 | #44 | Link |
Forum Member
Join Date: May 2006
Posts: 698
|
Quote:
All I meant was I used EEDI2 to do some testing here and there. I'm getting a "no function named DEdgeMask" error. I have LimitedSharpenFaster, mt_masktools-26.dll, and warpsharp.dll During a search said you needed those three, but still returns the error. |
7th August 2008, 01:32 | #48 | Link | ||
Forum Member
Join Date: May 2006
Posts: 698
|
Quote:
It over smooths on some of my other videos, so I'll have to mess around with the settings. I tried to load your EEDI2 version from post #42, but get no function named "SharpAAMC". However, after searching, I found nothing on it so I'm not sure what I'm missing. (No AA Top - With AA Bottom) Quote:
For a 3:30 long video, that works out to about two hours. Last edited by Seraphic-; 7th August 2008 at 01:40. |
||
7th August 2008, 09:09 | #51 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Fast motion scenes are handled fine, but look a little jerky due to unusual sharpness. Actually, nothing special needs to be done for fast motion. Motion compensation is done for slow motion to compensate the flicker.
__________________
...desu! |
7th August 2008, 16:26 | #52 | Link |
Fighting spam with a fish
Join Date: Sep 2005
Posts: 2,699
|
Hmm...I seem to see a couple of artifacts produced from this script, such as here:
http://i34.photobucket.com/albums/d1...0807082354.jpg I assume there is a setting I can change to protect against this? |
7th August 2008, 16:34 | #53 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
If you are sure that it is caused by that function, just disable motion compensation. I'll make it adjustable in the function a bit later.
@Didée, how can we make it apply MC only to if scene changes a little? 'Twould be good if it took a scene change threshold as parameter.
__________________
...desu! Last edited by Mystery Keeper; 7th August 2008 at 16:45. |
7th August 2008, 16:56 | #54 | Link |
Fighting spam with a fish
Join Date: Sep 2005
Posts: 2,699
|
Yep, this was the only function in the filter chain. It's funny, I have seen pictures of artifacts like this before, and there is a way to guard against it in MVTools, but I can't for the life of me recall what it is.
|
7th August 2008, 17:11 | #55 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
That artefact looks like if the sharpen-difference is merged in without motion compensation from a neighbor frame. From the way how MVAnalyse & MVDegrain work and how the script is layed out, I don't see how such a thing can sneak in at all.
Try truemotion=false,search=3,searchparam=256
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
7th August 2008, 17:18 | #56 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
0_0 WEIRD. I suddenly started getting an error "RemoveGrain: invalid mode 19 (LimitedSharpenFaster.avsi, line 106)"
Fixed
__________________
...desu! Last edited by Mystery Keeper; 7th August 2008 at 17:31. |
7th August 2008, 18:35 | #57 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Sorry, Merlin. I don't get such artifacts anywhere, so I can't help. Here's the function in which you can disable/enable MC easily.
Code:
function SharpAAMC(clip orig, int "aastr", float "ds", int "ShPre", int "ShPost", int "SmPost", bool "MC") { aastr=default(aastr,255) #antialiasing strength ds=default(ds,0.2) #strokes darkening strength ShPre=default(ShPre,80) #Presharpening ShPost=default(ShPost,300) #Postsharpening SmPost=default(SmPost,100) #Postsmoothing MC=default(MC, true) #Motion Compensation a=orig w=width(a) h=height(a) m=logic( a.DEdgeMask(0,255,0,255,"5 10 5 0 0 0 -5 -10 -5", divisor=4,Y=3,U=3,V=3) \ ,a.DEdgeMask(0,255,0,255,"5 0 -5 10 0 -10 5 0 -5", divisor=4,Y=3,U=3,V=3) \ ,"max").greyscale.levels(0,0.8,128,0,255,false) b=a.Toon(ds).Warpsharp(depth=ShPre) b=b.spline64resize(w*2,h*2).TurnLeft().SangNom(aa=aastr).TurnRight().SangNom(aa=aastr) b=b.spline64resize(w,h).LimitedSharpenFaster(edgemode=1,strength=ShPost,overshoot=1,soft=SmPost) b=mt_merge(a,b,m,Y=3,U=3,V=3) sD=mt_makediff(a,b) fv2 = a.MVAnalyse(isb=false,delta=2,idx=13) fv1 = a.MVAnalyse(isb=false,delta=1,idx=13) bv1 = a.MVAnalyse(isb=true, delta=1,idx=13) bv2 = a.MVAnalyse(isb=true, delta=2,idx=13) sDD = sD.MVDegrain2(bv1,fv1,bv2,fv2,idx=14) reduc = 0.4 sDD = mt_lutxy(sD,sDD,"x 128 - abs y 128 - abs < x y ?").mergeluma(sDD,1.0-reduc) b=MC ? a.mt_makediff(sDD,U=2,V=2) : b return b }
__________________
...desu! |
7th August 2008, 18:43 | #58 | Link |
x264aholic
Join Date: Jul 2007
Location: New York
Posts: 1,752
|
IIRC, I saw somewhere that you could do a pseudo scene-change based on change in luminance, and depending on that it could ramp up a filter to process more if there was fast motion or less if low motion.
|
7th August 2008, 18:55 | #59 | Link |
masktools2 (ab)user
Join Date: Oct 2006
Location: PAL-I :(
Posts: 235
|
http://avisynth.org/mediawiki/Condit...ring:_part_III
It's not thought through well. I've got a badly modified version with some fixes, so if you want to use it as a reference or something just ask. Also masktools has some scenechange stuff, as well as mvtools IIRC. |
7th August 2008, 19:00 | #60 | Link |
Fighting spam with a fish
Join Date: Sep 2005
Posts: 2,699
|
Blast you Didee!!! Blast you!!
It takes nearly a minute to render 1 frame! That is insane!! Hell, I can't see the artifacts when the clip is in motion. It was pure chance that I managed to spot it when stepping through frames. |
Tags |
anime, antialiasing, avisynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|