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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 23rd July 2005, 23:39   #11  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
@yaz
I had some time to work on my functions the last night. My next just better Cdeint version I´ll offer next week. But I also created the function for your use.
So here is my motion_interpolate_deblend function:
Code:
crop(8,8,-8,-8)

ord = last.getparity() ? 1 : 0

a = tdeint(mode=1)

c = leakkernelbob(order=ord).BilinearResize(480,288)	

motion_interpolate_deblend(a, tclip=c, thresh=45)



Function motion_interpolate_deblend(clip input, clip "tclip", float "thresh") 
{
###### PREPARATION ######
e = input.selecteven()
o = input.selectodd()
tempe1 = e.MVAnalyse(isb=true, sx=4,sy=4, lambda=4000)
tempe2 = e.MVAnalyse(isb=false, sx=4,sy=4, lambda=4000)
eout = MVInterpolate(e, tempe1, tempe2, nb=1, bl=0.5, el=0.5, fbw=4).trim(1,0)
tempo1 = o.MVAnalyse(isb=true, sx=4,sy=4, lambda=4000)
tempo2 = o.MVAnalyse(isb=false, sx=4,sy=4, lambda=4000)
oout = MVInterpolate(o, tempo1, tempo2, nb=1, bl=0.5, el=0.5, fbw=4)

global intout = interleave(oout,eout)
global diffval = default(thresh,50.0)/100.0 + 1.0
global output = input
global blendclip = tclip

###### FRAMES FOR BLENDPARAMETERS ######
global frame_c0 = blendclip
global frame_c1 = blendclip.trim(1,0)
global frame_c2 = blendclip.trim(2,0)

###### VAR.. ######
global diff_c2 = 1
global btest1 = 1
global btest0 = 1

###### Conditional Function Chain, evaluated from bottom to top (!) ######
b99=scriptclip(input, "(btest0 / btestb + btest0 / btest1) < diffval ? intout : output")

b4=FrameEvaluate(b99, "global btest1 = LumaDifference(MergeLuma(frame_c0,frame_c2,blendl), frame_c1) / 
		\	(diff_c1 < diff_c2 ? diff_c1 : diff_c2)")
b3=FrameEvaluate(b4, "global blendl = diff_c1 < diff_c2 ? 0.5 * Exp(0.85 * Log(diff_c1 / diff_c2)) :
				\	1 - 0.5 * Exp(0.85 * Log(diff_c2 / diff_c1))
		global btest0 = btest1")
b2=FrameEvaluate(b3, "global diff_c2 =  YDifferenceToNext(frame_c1)
		global btestb = btest0")      
b1=FrameEvaluate(b2, "global diff_c1 = diff_c2")
return(b1) 
}
It use the newer simpler and better Cdeblend, but it doesn´t double the frames, it interpolates the motion.
I don´t like the results of mvinterpolate too much, just to blocky for my eyes. But of course better than your strange blends.
Higher thresh values mean detecting more blends (everything higher than 75 is too heavy I think).
Just try it out. I don´t tested it till now together with Cdeint, but you can try if they run together. Alone it just runs stable for me.
I hope this help you a little bit.

ps: I don´t know much about the mvtools parameter. If you want to tweak them, therefore you should ask anybody else.

Last edited by MOmonster; 26th July 2005 at 00:00.
MOmonster is offline   Reply With Quote
 

Tags
mrestore, srestore

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:59.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.