Hi there all I’ve been messing around with the 1986 ROTJ Laserdisk and just recently did a capture of side 1 through my LD-V4400 and i was messing around and created this script
loadplugin(“DGDecode.dll”)
loadplugin(“SangNom.dll”)
loadplugin(“FDecimate.dll”)
loadplugin(“ColorMatrix.dll”)
import(“deblockqed.avis”)
loadplugin(“MaskTools.dll”)
loadplugin(“UnDot.dll”)
loadplugin(“mt_masktools.dll”)
loadplugin(“deen.dll”)
loadplugin(“hqdn3d.dll”)
loadplugin(“GrainOpt.dll”)
loadplugin(“GuavaComb.dll”)
loadplugin(“Decomb.dll”)
loadplugin(“cnr2.dll”)
loadplugin(“TDeint.dll”)
loadplugin(“mvtools.dll”)
import(“SeeSaw.avs”)
loadplugin(“RemoveGrainSSE3.dll”)
loadplugin(“RepairSSE3.dll”)
loadplugin(“RSharpenSSE3.dll”)
import(“mvbob.avs”)
import(“MCBob_v03u.avs”)
loadplugin(“EEDI2.dll”)
loadplugin(“nnedi.dll”)
loadplugin(“GuavaComb.dll”)
loadplugin(“BruteIVTC.dll”)
BlindDeHalo - v0.1
This script removes the light & dark halos from too strong “Edge Enhancement”
Adaption of the parameters has to be done manually for each source, the function is not adaptive.
Needed Plugins: MaskTools.dll >= 1.4.15
# undot.dll
function BlindDeHalo( clip clp, int “strength”, int “radius_x”, int “radius_y”, float “darkamount”, string “mode”, float “maskblur”, bool
“fullframe” )
{
strength = default( strength, 80)
radius_x = default( radius_x, 2)
radius_y = default( radius_y, 2)
darkamount = default( darkamount,1.0)
mode = default( mode, “soft”)
maskblur = default( maskblur, 1.0)
fullframe = default( fullframe, false)
modus = mode==“hard” ? “hardlight” : “softlight”
ox = clp.width
oy = clp.height
rx = sqrt(radius_x)
ry = sqrt(radius_y)
clp
edge=Dedgemask(0,255,0,255,“6 10 6 10 -64 10 6 10 6”,setdivisor=true,divisor=64).levels(2,0.5,6,0,255,false).undot#.coloryuv
(analyze=true)#
blur1 = bicubicresize(int((ox/rx)/4 +.5)*4,int((oy/ry)/4 +.5 )*4,-1.0,1.0).lanczosresize(ox,oy)
blur2 = bicubicresize(int((ox/rx)/4 +.5)*4,int((oy/ry)/4 +.5 )*4, 1.0,0.0).lanczosresize(ox,oy)
diff = YV12subtract(blur1,blur2)
overlay(diff,diff,mode=“hardlight”).levels(0,1.0,255,88,168,false)
darkamount == 1.0 ? NOP : overlay(last,last.levels(0,1.0,128,int(128-128*darkamount),128,false),mode=“lighten”)
overlay(last,last.levels(0,1.0,255,128+strength,128-strength,false)) # levels reversed: no more “invert” in below overlay()
overlay(clp,last.greyscale.blur(maskblur),mode=modus)
fullframe ? NOP : MaskedMerge(clp,last,edge.deflate.expand.blur(1.58).inflate)
return(last)
}
#Load Sources and trim frames to match
a=avisource(“i:\Composite 2_20050702_204306.avi”).trim(96,50228).guavacomb(“NTSC”)
b=avisource(“i:\Composite 2_20050702_183413.avi”).trim(207,50339).guavacomb(“NTSC”)
c=avisource(“i:\Composite 2_20050703_001628.avi”).trim(378,50510).guavacomb(“NTSC”)
d=avisource(“i:\Composite 2_20050702_180458.avi”).trim(202,50334).guavacomb(“NTSC”)
e=avisource(“i:\Composite 2_20050702_234755.avi”).trim(200,50332).guavacomb(“NTSC”)
#Merging sources
f=merge(merge(merge(a,b),merge(c,d)),e,0.2)
#IVTC/Decimation
g=f.converttoyv12(interlaced=true).bruteivtc().tdecimate(hybrid=1).crop(0,52,0,-140).NNEDI(dh=true,field=1)
h=g.lanczos4resize(720,288)
#Degrain
backward_vec2 = h.MVAnalyse(blksize=16,isb = true, delta = 2, pel = 2, overlap=8, sharp=2, idx = 1)
forward_vec2 = h.MVAnalyse(blksize=16,isb = false, delta = 2, pel = 2, overlap=8, sharp=2, idx = 1)
i=h.MVDegrain1(backward_vec2,forward_vec2,thSAD=400,idx=1)#.limitedsharpenfaster(smode=4,dest_x=1280,dest_y=544,wide=true,strength=250
#Derainbow
j=i.fft3dfilter(sigma=3,sigma2=3,sigma3=12,sigma4=3,bt=3,plane=1).fft3dfilter(sigma=3,sigma2=3,sigma3=12,sigma4=3,bt=3,plane=2)
#Upscale to 856x364
k=j.limitedsharpenfaster(smode=4,dest_x=856,dest_y=364,wide=true,strength=250)
return k
And i was curious what else i can do to this. And on the last 2 frames i was wondering what the weird lines and blocks were and i was also curious about what you guys use for IVTCing and how to fix the strange halos?