Guest User

Untitled

a guest
Jan 21st, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. function autofix(clip video, int dirty, int clean, bool vertical) {
  2. video
  3. dirty=dirty+(dirty<0 ? vertical ? width : height : 0)
  4. clean=clean+(clean<0 ? vertical ? width : height : 0)
  5. GScriptClip("
  6. video=last
  7. ConvertToRGB()
  8. clipdirty=vertical ? Crop(dirty,0,1,0) : Crop(0,dirty,0,1)
  9. clipclean=vertical ? Crop(clean,0,1,0) : Crop(0,clean,0,1)
  10. BlankClip(clipdirty)
  11. dr=Int(RGBDifference(ShowRed(clipclean))-RGBDifference(ShowRed(clipdirty)))
  12. dg=Int(RGBDifference(ShowGreen(clipclean))-RGBDifference(ShowGreen(clipdirty)))
  13. db=Int(RGBDifference(ShowBlue(clipclean))-RGBDifference(ShowBlue(clipdirty)))
  14. RGBAdjust(clipdirty,rb=dr,gb=dg,bb=db)
  15. Overlay(video,last,x=vertical ? dirty : 0,y=vertical ? 0 : dirty)
  16. ",args="dirty,clean,vertical")
  17. }
Add Comment
Please, Sign In to add comment