Advertisement
tophf

depansafe

Nov 1st, 2014
645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function depansafe( clip c, float "dxmax", float "dymax", float "error", clip "prefilter", bool "info", string "log" ) {
  2.     dxmax = default(dxmax, 1.5)
  3.     dymax = default(dymax, 1.5)
  4.     error = default(error, 4.0)
  5.     prefilter = default(prefilter,c.removegrain(4,4))
  6.  
  7.     c
  8.     DepanStabilize(data=MDepan(prefilter.MSuper.MAnalyse(isb=false),log=log,error=error),
  9.         \dxmax=dxmax,dymax=dymax,zoommax=1,rotmax=0,info=info)
  10.  
  11.     cropx = ceil(dxmax)*2
  12.     cropy = ceil(dymax)*2
  13.     ratiox = "YPlaneMax("+string(ceil(99-dxmax/cropx*100))+")"
  14.     ratioy = "YPlaneMax("+string(ceil(99-dymax/cropy*100))+")"
  15.  
  16.     crop(width-cropx,0,0,0).conditionalfilter(
  17.         \crop(0,0,cropx,0).conditionalfilter(
  18.             \crop(0,height-cropy,0,0).conditionalfilter(
  19.                 \crop(0,0,0,cropy).conditionalfilter(
  20.                     \last,c,ratioy,">","0"),
  21.                 \c,ratioy,">","0"),
  22.             \c,ratiox,">","0"),
  23.         \c,ratiox,">","0")
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement