Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Import("support.avs")
- #
- DGDecode_mpeg2source("VTS_01_1.d2v").YLevels(16,1.0,255,16,235)
- #
- __film = last
- __t0 = AutoDeinted(__film.trim(0, 40758), mode=6,cthresh=6, MI=64)
- __t1 = AutoDeinted(__film.trim(40759, 43337),mode=0,cthresh=1, MI=16, PP=4)
- __t2 = AutoDeinted(__film.trim(43338, 43924),mode=6,cthresh=6, MI=64)
- __t0 ++ __t1 ++ __t2
- Decimate(mode=4,threshold=2.0,timecodes="hybrid_timecodes_01.txt",vfrstats="hybrid_01.vfrstats")
- #
- nnedi2_rpow2(rfactor=2,cshift="spline64resize",ep0=8,nsize=2,qual=3,pscrn=true,threads=4,opt=4)
- #
- orig = last
- prepedgemask = orig.mt_edge("prewitt",6,30,5,10,y=3,v=3,u=3)
- areamask = prepedgemask.mt_binarize(9,y=2,v=3,u=3,upper=true).mt_binarize(8,y=3,v=2,u=2,upper=true)
- orig
- noisy = last
- interp = noisy.blackmanresize(width*2,height*2,src_left=0.5,src_top=0.5,taps=8)
- sclip = noisy.msuper(pelclip=interp)
- vf1=manalyse(sclip,isb=false,delta=1,overlap=4,blksize=8,search=5,pelsearch=2,truemotion=true,sadx264=0)
- vb1=manalyse(sclip,isb=true,delta=1,overlap=4,blksize=8,search=5,pelsearch=2,truemotion=true,sadx264=0)
- #
- clean=MDegrain1(sclip, vb1,vf1,thSAD=120)
- mt_merge(noisy,clean,noisy.blur(1).mt_lut("x 2 *"),luma=true)
- #
- interleave(\
- mcompensate(noisy,sclip,vf1,thSCD1=600)\
- ,noisy\
- ,mcompensate(noisy,sclip,vb1,thSCD1=600))
- #
- DeGrainMedian(limitY=1,limitUV=3,mode=3)
- selectevery(3,1)
- mt_merge(orig,last,areamask,y=3,v=3,u=3)
- #
- 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")
- #
- BlackmanResize(1024,576,7,4,-6,-0,taps=8)
- #
- clp = last
- maskc = mt_edge("prewitt",thY1=5,thY2=12,thc1=5,thc2=10,u=3,v=3,y=2)
- maskl = mt_edge("prewitt",thY1=6,thY2=15,thc1=6,thc2=15,u=2,v=2,y=3)
- maskcl = mt_lutxy(utoy(maskc),vtoy(maskc),"x y + 2 /").spline144resize(clp.width,clp.height)
- finmask = mt_logic(maskcl,maskl,"or").mt_binarize(9,upper=true).mt_inpand(u=1,v=1,y=3)
- deband = clp.Gradfun2dbmod(temp=100,thr=1.15,strC=0.0,str=0.65,thrC=1.15,adapt=62,mode=3)
- mt_merge(clp,deband,finmask,u=3,v=3,y=3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement