Reino
17th February 2011, 22:47
When it comes to available Avisynth filters I'm not that resourceful, so I was wondering if anyone can tell me if the following script can be done more efficiently, because rendering this script alone uses ± 90% of my cpu.
http://img707.imageshack.us/img707/33/rewp.th.png (http://img707.imageshack.us/img707/33/rewp.png/) http://img268.imageshack.us/img268/5224/rewmask.th.png (http://img268.imageshack.us/img268/5224/rewmask.png/)
BlankClip(200,640,480,"RGB32",25,color=$FFFFFF)
rew = ImageReader("D:\test\rew.png", fps=25)
rewMask = ImageReader("D:\test\rew_mask.png", fps=25)
a=rewMask.Loop(28).Animate(0,28,"Levels", 0,1.0,255,0,0, 0,1.0,255,0,224)
b=rewMask.Loop(20).Animate(0,20,"Levels", 0,1.0,255,0,64, 0,1.0,255,0,224)
c=rewMask.Loop(20).Animate(0,20,"Levels", 0,1.0,255,0,224, 0,1.0,255,0,64)
d=rewMask.Loop(28).Animate(0,28,"Levels", 0,1.0,255,0,224, 0,1.0,255,0,0)
JDL_ReplaceRange(last,Overlay(last, rew,mode="multiply",mask=a),12,39)
JDL_ReplaceRange(last,Overlay(last.Trim(40,0), rew,mode="multiply",mask=c),40,59)
JDL_ReplaceRange(last,Overlay(last.Trim(60,0), rew,mode="multiply",mask=b),60,79)
JDL_ReplaceRange(last,Overlay(last.Trim(80,0), rew,mode="multiply",mask=c),80,99)
JDL_ReplaceRange(last,Overlay(last.Trim(100,0), rew,mode="multiply",mask=b),100,119)
JDL_ReplaceRange(last,Overlay(last.Trim(120,0), rew,mode="multiply",mask=c),120,139)
JDL_ReplaceRange(last,Overlay(last.Trim(140,0), rew,mode="multiply",mask=b),140,159)
JDL_ReplaceRange(last,Overlay(last.Trim(160,0), rew,mode="multiply",mask=d),160,187)
http://img707.imageshack.us/img707/33/rewp.th.png (http://img707.imageshack.us/img707/33/rewp.png/) http://img268.imageshack.us/img268/5224/rewmask.th.png (http://img268.imageshack.us/img268/5224/rewmask.png/)
BlankClip(200,640,480,"RGB32",25,color=$FFFFFF)
rew = ImageReader("D:\test\rew.png", fps=25)
rewMask = ImageReader("D:\test\rew_mask.png", fps=25)
a=rewMask.Loop(28).Animate(0,28,"Levels", 0,1.0,255,0,0, 0,1.0,255,0,224)
b=rewMask.Loop(20).Animate(0,20,"Levels", 0,1.0,255,0,64, 0,1.0,255,0,224)
c=rewMask.Loop(20).Animate(0,20,"Levels", 0,1.0,255,0,224, 0,1.0,255,0,64)
d=rewMask.Loop(28).Animate(0,28,"Levels", 0,1.0,255,0,224, 0,1.0,255,0,0)
JDL_ReplaceRange(last,Overlay(last, rew,mode="multiply",mask=a),12,39)
JDL_ReplaceRange(last,Overlay(last.Trim(40,0), rew,mode="multiply",mask=c),40,59)
JDL_ReplaceRange(last,Overlay(last.Trim(60,0), rew,mode="multiply",mask=b),60,79)
JDL_ReplaceRange(last,Overlay(last.Trim(80,0), rew,mode="multiply",mask=c),80,99)
JDL_ReplaceRange(last,Overlay(last.Trim(100,0), rew,mode="multiply",mask=b),100,119)
JDL_ReplaceRange(last,Overlay(last.Trim(120,0), rew,mode="multiply",mask=c),120,139)
JDL_ReplaceRange(last,Overlay(last.Trim(140,0), rew,mode="multiply",mask=b),140,159)
JDL_ReplaceRange(last,Overlay(last.Trim(160,0), rew,mode="multiply",mask=d),160,187)