How can I optimize this code? >> Video Games >> Our Forum
Our Forum

Our Forum



SearchSearch   Users   Registration   Entrance
Today: 23.07.2025 - 20:44:59
Pages:  1  

How can I optimize this code?

Advertising


MessageAuthor

I was trying to make a 60i->24p+simulated motion blur script for half an hour, and I could only get it to work like this: loadcplugin("c:\program files\avisynth 2.5\plugins\yadif.dll") loadplugin("c:\program files\avisynth 2.5\plugins\mvtools2.dll") source = AviSource("Tape 2 - Clip 012.avi").ConvertToYV12().AssumeBFF().Yadif(1).RemoveGrain().Blur(0.16) super = source.MSuper() mvbw = MAnalyse(super,isb=true) mvfw = MAnalyse(super,isb=false) source.MFlowFps(super,mvbw,mvfw,num=24000,den=1001) super2 = last.MSuper() bv = MAnalyse(super,isb=true) fv = MAnalyse(super,isb=false) last.MFlowBlur(super2,bv,fv,blur=20) I'm getting ~6 fps output. Is there any way I can make it faster? Also, if the original footage was filmed with 1/60 shutter speed, what blur value should I input into MFlowBlur if I want it to look like it was filmed with 1/48 shutter speed?

---------------------

Deutscher Konnt

users




Statistics:
Messages: 577
Registration: 11.09.2002
06.11.22 - 13:01:02
Message # 1
RE: How can I optimize this code?

If you have a dual core cpu, you could use MT Avisynth.

---------------------

Rave TT

users




Statistics:
Messages: 836
Registration: 08.10.2002
06.11.22 - 13:12:13
Message # 2
RE: How can I optimize this code?

How would I run MFlowFps and MFlowBlur multithreaded? SetMTMode?

---------------------
97 M3/4

ICTBMW

users




Statistics:
Messages: 2,817
Registration: 02.04.2003
06.11.22 - 13:17:16
Message # 3
RE: How can I optimize this code?

There's not much you can do. Unless you're willing to sacrifice some quality, you can't really make it faster. Edit: Yes, you would use SetMTMode if you want to use MT. MVtools 2 supports multithreading nicely with SetMTMode, unlike the last (depreciated) version. Be sure to put your SMM() call ALL the way at the top of your script.

---------------------
proper propaganda

BlackM

users




Statistics:
Messages: 9
Registration: 03.04.2002
06.11.22 - 13:28:20
Message # 4
RE: How can I optimize this code?

Yeah, I'm sticking with simple Yadif() 30p, because the crazy slow speed and artifacts of MFlowFps and MFlowBlur just aren't worth it.

---------------------
mistah kurz--"the diamond geezer" 03 M3

mrkurz

users




Statistics:
Messages: 194
Registration: 04.07.2002
06.11.22 - 13:39:50
Message # 5
RE: How can I optimize this code?

I'm not surprised at all you're getting artifacts like that: You're doing frame rate conversion on an -interlaced- source. No good! I didn't notice this at first. I thought it was 60p -> 24p. Try doing yadif -> 24p + motion blur instead.

---------------------
NEW RIDE: 2001 Z06, black on black, showroom cond. Lowered, chromed OEM's. Vararam CAI, Dynatech Stainless LT's, Vette Docs tuned. 377rwhp/374rwtq. 1999 red WS6 TA 30k mile garage queen Full Exhaust + BG Ram Air SLP & BMR Suspension 17X9 w/275/40's F

99LS1

users




Statistics:
Messages: 145
Registration: 07.21.2003
06.11.22 - 13:51:11
Message # 6
RE: How can I optimize this code?
Crazy Screeching Feedback! : Previous topicNext topic: Customize menus / toolbars (Consolidated thread)
Pages:  1  

The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants