Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #importing the 1080p remux
- a=import("D:\Sync\1080premux.avs")
- FFVideoSource("D:\Sync\Rear.Window.1954.2160p.UHD.BluRay.Remux.HDR.HEVC.FLAC.2.0-PmP.mkv")
- #Tonemapping the UHD HDR source
- ConvertYUVtoLinearRGB(Color=0,OOTF=false,OutputMode=2).ConvertLinearRGBtoYUV(Color=0,HDRMode=1,HLGLw=500,HLGColor=2,OOTF=false).ConvertYUVtoXYZ(Color=1).ConvertXYZtoYUV(pColor=1)
- ConvertBits(16).ConvertToStacked().SmoothLevels16(gamma=1.05).ConvertFromStacked(16)
- b=last
- #Removing black borders
- b=b.crop(126,0,-126,0)
- a=a.crop(66,0,-66,0)
- #Dithering the tonemapped UHD source to 8 bits
- b=b.ConvertBits(bits=8,dither=1.0)
- #Resizing the UHD source to 1080p
- b=b.z_Spline36Resize(1788,1080,dither="error_diffusion")
- #Converting the UHD HEVC source to AVC by overlaying it over 1080p source
- c=Overlay(a,b,opacity=1.0,mode="blend")
- #Cropping 1 px dirty line on the left from 1080p source
- a=a.crop(2,0,0,0)
- #Overlaying 1080p source over the UHD source shifted by 1 px
- d=Overlay(c,a,x=1,opacity=1.0,mode="blend")
- d=d.FillBorders(1,0,1,0,mode=2) #Fill Margining borders
- #fixing chroma bleeding
- e=d.mergechroma(d.aWarpSharp(depth=10, thresh=0.75, blurlevel=3, cm=1))
- e=e.turnright()
- e=e.mergechroma(e.aWarpSharp(depth=5, thresh=0.75, blurlevel=2, cm=1))
- e=e.turnleft()
- #Debanding
- f=d.f3kdb()
- #combining the debanded scenes, Chroma bleeding fixed scenes with the rest of the video
- g=d.trim(0,27)+f.trim(28,730)+e.trim(731,2280)+d.trim(2281,d.FrameCount()-1)
- g
Advertisement
Add Comment
Please, Sign In to add comment