View Single Post
Old 22nd December 2006, 19:52   #34  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
One my russian friend (Drakon Rider) reports about some memory leakage with variableblur for big frame sizes 1920x1080, 100 frames eat 2 Gbytes.
img_src size is 4220х3294
I did not test it.

Code:
LoadPlugin("VariableBlur.dll")
 
Function GBlurRange (clip clin, int StartFrame, int EndFrame, float StartBlur, float EndBlur)
{
  clip_before=Trim(clin, 0, StartFrame-1)
  clip_after=Trim(clin, EndFrame+1, 0)
  clip_proc=Trim(clin, StartFrame, EndFrame)
 
  clip_proc=Animate(clip_proc, 0, EndFrame-StartFrame, "gaussianblur", StartBlur,StartBlur,3,false,3,3,3, EndBlur,EndBlur,3,false,3,3,3)
 
  return(clip_before+clip_proc+clip_after)
}
 
fps=30
 
src=ImageReader("img_src.bmp",fps=fps)
 
src=ConvertToYV12(src)
 
cl01=Crop(src,0,0,1920,1080)
 
cl02=Trim(cl01,0,fps*4)
 
cl02=GBlurRange(cl02,0,fps*4,80.0,0.1)
 
cl03=Trim(cl01, 0, fps)
 
stt01=BlankClip(cl02,length=fps*5).Subtitle("My Text01", align=8, size=70, first_frame=0, last_frame=fps*5, text_color=$7FFF00, halo_color=$2F2F2F).Coloryuv(levels="tv->pc")
maskstt01=Tweak(stt01,cont=10.0)
stt02=BlankClip(cl02,length=fps*5).Subtitle("Other Text 02", align=2, size=80, first_frame=0, last_frame=fps*5, text_color=$7FFF00, halo_color=$2F2F2F).Coloryuv(levels="tv->pc")
maskstt02=Tweak(stt02,cont=10.0)
 
cl02=overlay(cl02,stt01,mode="blend",mask=maskstt01)
cl02=overlay(cl02,stt02,mode="blend",mask=maskstt02)
 
intro=Dissolve(cl02,cl03,fps)
return(intro)
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.

Last edited by Fizick; 22nd December 2006 at 19:54.
Fizick is offline   Reply With Quote