Advertisement
Guest User

Untitled

a guest
Jun 20th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Import("support.avs")
  2. #
  3. DGDecode_mpeg2source("VTS_01_1.d2v").YLevels(16,1.0,255,16,235)
  4. #
  5. __film = last
  6. __t0 = AutoDeinted(__film.trim(0, 40758), mode=6,cthresh=6, MI=64)
  7. __t1 = AutoDeinted(__film.trim(40759, 43337),mode=0,cthresh=1, MI=16, PP=4)
  8. __t2 = AutoDeinted(__film.trim(43338, 43924),mode=6,cthresh=6, MI=64)
  9. __t0 ++ __t1 ++ __t2
  10. Decimate(mode=4,threshold=2.0,timecodes="hybrid_timecodes_01.txt",vfrstats="hybrid_01.vfrstats")
  11. #
  12. nnedi2_rpow2(rfactor=2,cshift="spline64resize",ep0=8,nsize=2,qual=3,pscrn=true,threads=4,opt=4)
  13. #
  14. orig = last
  15. prepedgemask = orig.mt_edge("prewitt",6,30,5,10,y=3,v=3,u=3)
  16. areamask = prepedgemask.mt_binarize(9,y=2,v=3,u=3,upper=true).mt_binarize(8,y=3,v=2,u=2,upper=true)
  17. orig
  18. noisy = last
  19. interp = noisy.blackmanresize(width*2,height*2,src_left=0.5,src_top=0.5,taps=8)
  20. sclip =  noisy.msuper(pelclip=interp)
  21. vf1=manalyse(sclip,isb=false,delta=1,overlap=4,blksize=8,search=5,pelsearch=2,truemotion=true,sadx264=0)
  22. vb1=manalyse(sclip,isb=true,delta=1,overlap=4,blksize=8,search=5,pelsearch=2,truemotion=true,sadx264=0)
  23. #
  24. clean=MDegrain1(sclip, vb1,vf1,thSAD=120)
  25. mt_merge(noisy,clean,noisy.blur(1).mt_lut("x 2 *"),luma=true)
  26. #
  27. interleave(\
  28. mcompensate(noisy,sclip,vf1,thSCD1=600)\
  29. ,noisy\
  30. ,mcompensate(noisy,sclip,vb1,thSCD1=600))
  31. #
  32. DeGrainMedian(limitY=1,limitUV=3,mode=3)
  33. selectevery(3,1)
  34. mt_merge(orig,last,areamask,y=3,v=3,u=3)
  35. #
  36. ConditionalFilter(last,ConditionalFilter(last,last.MaskedSharp(upsample=false,mY1=15, warp=true, adepth=6,addsharp=false, SmergeY=3,SmergeV=3,SmergeU=3,expnd=false),last.YAHR(blur=2,adepth=28),"AverageLuma()", "<", "57"),last.YAHR(blur=2,adepth=32).FastLineDarken(43),"AverageLuma()", "<", "67")
  37. #
  38. BlackmanResize(1024,576,7,4,-6,-0,taps=8)
  39. #
  40. clp = last
  41. maskc = mt_edge("prewitt",thY1=5,thY2=12,thc1=5,thc2=10,u=3,v=3,y=2)
  42. maskl = mt_edge("prewitt",thY1=6,thY2=15,thc1=6,thc2=15,u=2,v=2,y=3)
  43. maskcl = mt_lutxy(utoy(maskc),vtoy(maskc),"x y + 2 /").spline144resize(clp.width,clp.height)
  44. finmask = mt_logic(maskcl,maskl,"or").mt_binarize(9,upper=true).mt_inpand(u=1,v=1,y=3)
  45. deband = clp.Gradfun2dbmod(temp=100,thr=1.15,strC=0.0,str=0.65,thrC=1.15,adapt=62,mode=3)
  46. mt_merge(clp,deband,finmask,u=3,v=3,y=3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement