#######################################################################################
############################ GOUT Filter By G-force V.5.00 ############################
################################################################################################# setup stage
episode = 4 # <-----set to 4, 5 or 6 for ANH, ESB, or ROTJ respectively
PAL = false # <-----Set to false for NTSC, true for PAL
Mpeg2Source("C:\Program Files\AviSynth 2.5\Scripts\VTS_03_1.d2v") # <-----Set path########## cut off some of the black bars for faster processing (but keep mod 16)
PAL==false ? Crop(0,96,0,-96,align=true) : Crop(0,120,0,-120,align=true).AddBorders(8,0,8,0)########## set black level/gamma, saturation/hue
Levels(10,1.13,255,0,255)
Tweak(sat=1.08,hue=-4)########## global motion stabilization stage
temp = last.TemporalSoften(7,255,255,25,2)
Interleave(temp.Repair(last.TemporalSoften(1,255,255,25,2)),last)
DePan(last,data=DePanEstimate(last,trust=0,dxmax=1,dymax=0),offset=-1)
SelectEvery(2,0)########## local motion stabilization/degrain stage
source = last
temp = source.TemporalSoften(3,255,255,25,2)
sigma = 5
filt = source.fft3dfilter(sigma=sigma,sigma2=sigma*.75,sigma3=sigma*.5,sigma4=sigma*.25,bt=5,sharpen=1)
Median1(source,temp,filt)
Contra(last,source)########## restore stars stage
prest = last
prest.MT_Binarize(threshold=20,upper=true).MT_Expand()
MT_Merge(prest,source,last,chroma="copy first")########## additional "Lucasfilm" and "Along time ago..." stabilization
prest.Trim(0,265)++prest.Trim(266,687).TemporalSoften(3,255,255,25,2)++last.Trim(688,0)########## anti-aliasing
NN=last.NNEDI2(dh=true,field=1)
contra(last.EEDI2(),NN)
last.Repair(NN,9)########## resize to 16x9 AR, remove sides, add borders
PAL==false ? Spline16Resize(720,384).Crop(8,12,-4,-14,align=true).AddBorders(6,61,6,61)
\ : Spline16Resize(736,448).Crop(12,8,-12,-10,align=true).AddBorders(4,73,4,73)########## debanding
GradFunkMirror(2).AddGrainC(1,0,0,0)########## subtitle stage
episode==4 ? ANH(last,PAL) : episode==6 ? ROTJ(last,PAL) : last#######################################################################################
Function ANH(clip input, bool PAL)
{inputf = "Franklin Gothic Medium Cond"
f_col = $ffffff
f_wid = 10
f_pos = PAL==false ? 464 : 557
f_siz = PAL==false ? 38 : 46Subtitle ("Going somewhere, Solo?",
\ -1,f_pos,70663,70698,f,f_siz,f_col,font_width=f_wid)
Subtitle ("It’s too late. You should have paid him when you had the chance.",
\ -1,f_pos,70825,70931,f,f_siz,f_col,font_width=f_wid)
Subtitle ("Jabba’s put a price on your head so large...",
\ -1,f_pos,70940,71005,f,f_siz,f_col,font_width=f_wid)
Subtitle ("...every bounty hunter in the galaxy will be looking for you.",
\ -1,f_pos,71014,71088,f,f_siz,f_col,font_width=f_wid)
Subtitle ("I’m lucky I found you first.",
\ -1,f_pos,71098,71137,f,f_siz,f_col,font_width=f_wid)
Subtitle ("If you give it to me, I might forget I found you.",
\ -1,f_pos,71203,71282,f,f_siz,f_col,font_width=f_wid)
Subtitle ("Jabba’s through with you.",
\ -1,f_pos,71365,71406,f,f_siz,f_col,font_width=f_wid)
Subtitle ("He has no time for smugglers...",
\ -1,f_pos,71435,71489,f,f_siz,f_col,font_width=f_wid)
Subtitle ("...who drop their shipments at the first sign of an Imperial cruiser.",
\ -1,f_pos,71498,71595,f,f_siz,f_col,font_width=f_wid)
Subtitle ("You can tell that to Jabba. He may only take your ship.",
\ -1,f_pos,71656,71748,f,f_siz,f_col,font_width=f_wid)
Subtitle ("That’s the idea.",
\ -1,f_pos,71806,71833,f,f_siz,f_col,font_width=f_wid)
Subtitle ("I’ve been looking forward to this for a long time.",
\ -1,f_pos,71843,71931,f,f_siz,f_col,font_width=f_wid)Return(last)
}#######################################################################################
Function ROTJ(clip input, bool PAL)
{inputf = "Franklin Gothic Medium Cond"
f_col = $ffffff
f_wid = 10
f_pos = PAL==false ? 464 : 557
f_siz = PAL==false ? 38 : 46Subtitle ("There will be no bargain.",
\ -1,f_pos,14382,14476,f,f_siz,f_col,font_width=f_wid)
Subtitle ("I will not give up my favorite decoration.",
\ -1,f_pos,14538,14706,f,f_siz,f_col,font_width=f_wid)
Subtitle ("I like Captain Solo where he is.",
\ -1,f_pos,14741,14824,f,f_siz,f_col,font_width=f_wid)
Subtitle ("I have come for the bounty on this Wookiee.",
\ -1,f_pos,20524,20626,f,f_siz,f_col,font_width=f_wid)
Subtitle ("At last we have the mighty Chewbacca.",
\ -1,f_pos,20774,20886,f,f_siz,f_col,font_width=f_wid)
Subtitle ("I want fifty thousand. No less.",
\ -1,f_pos,21502,21553,f,f_siz,f_col,font_width=f_wid)
Subtitle ("This bounty hunter is my kind of scum...",
\ -1,f_pos,22554,22663,f,f_siz,f_col,font_width=f_wid)
Subtitle ("...fearless and inventive.",
\ -1,f_pos,22685,22753,f,f_siz,f_col,font_width=f_wid)
Subtitle ("It's too late for that, Solo.",
\ -1,f_pos,28765,28856,f,f_siz,f_col,font_width=f_wid)
Subtitle ("You may have been a good smuggler...",
\ -1,f_pos,28857,28972,f,f_siz,f_col,font_width=f_wid)
Subtitle ("...but now you're Bantha fodder.",
\ -1,f_pos,28973,29058,f,f_siz,f_col,font_width=f_wid)
Subtitle ("Take him away.",
\ -1,f_pos,29224,29273,f,f_siz,f_col,font_width=f_wid)
Subtitle ("Bring her to me.",
\ -1,f_pos,29449,29503,f,f_siz,f_col,font_width=f_wid)
Subtitle ("I'm sure.",
\ -1,f_pos,29750,29796,f,f_siz,f_col,font_width=f_wid)
Subtitle ("I told you not to admit him.",
\ -1,f_pos,33466,33568,f,f_siz,f_col,font_width=f_wid)
Subtitle ("He must be allowed to speak.",
\ -1,f_pos,33615,33684,f,f_siz,f_col,font_width=f_wid)
Subtitle ("You weak-minded fool!",
\ -1,f_pos,33703,33774,f,f_siz,f_col,font_width=f_wid)
Subtitle ("He's using an old Jedi mind trick.",
\ -1,f_pos,33821,33927,f,f_siz,f_col,font_width=f_wid)
Subtitle ("Your mind powers will not work on me, boy.",
\ -1,f_pos,34154,34280,f,f_siz,f_col,font_width=f_wid)
Subtitle ("There will be no bargain, young Jedi.",
\ -1,f_pos,34685,34795,f,f_siz,f_col,font_width=f_wid)
Subtitle ("I shall enjoy watching you die.",
\ -1,f_pos,34824,34910,f,f_siz,f_col,font_width=f_wid)
Subtitle ("Bring me Solo and the Wookiee.",
\ -1,f_pos,39727,39816,f,f_siz,f_col,font_width=f_wid)
Subtitle ("They will all suffer for this outrage.",
\ -1,f_pos,39817,39920,f,f_siz,f_col,font_width=f_wid)
Subtitle ("Soon you will learn to appreciate me.",
\ -1,f_pos,43151,43304,f,f_siz,f_col,font_width=f_wid)
Subtitle ("Move him into position.",
\ -1,f_pos,45220,45288,f,f_siz,f_col,font_width=f_wid)
Subtitle ("Put him in.",
\ -1,f_pos,45866,45922,f,f_siz,f_col,font_width=f_wid)Return(last)
}#######################################################################################
Function Contra(clip denoised, clip orig)
{# re-write of Didée's contra sharpening routine from TemporalDegrain.avsInterleave(denoised,denoised.RemoveGrain(12,-1),denoised.RemoveGrain(4,-1))
Clense(reduceflicker=false,grey=true)
SelectEvery(3,1)MT_MakeDiff(last,last.RemoveGrain(12,-1).RemoveGrain(12,-1))
last.Repair(MT_MakeDiff(orig,denoised),1,-1).MT_LUTxy(last,"x 128 - abs y 128 - abs < x y ?")denoised.MT_AddDiff(last,chroma="copy first")
Return(last)
}#######################################################################################
Function GradFunkMirror(clip c, float "strength")
{# Border processing fix for GrandFun by MugFunky and Alain2strength = default(strength,2)
w = c.Width()
h = c.Height()
vflip = c.FlipVertical()
hflip = c.FlipHorizontal()
StackHorizontal(hflip.Crop(w-16,0,16,h).AddBorders(0,16,0,16),
\ StackVertical(vflip.Crop(0,h-16,w,16),c,vflip.Crop(0,0,w,16)),
\ hflip.Crop(0,0,16,h).AddBorders(0,16,0,16))
GradFun2db(strength)
Crop(16,16,-16,-16)Return last
}#######################################################################################
Function Median1(clip input_1, clip input_2, clip input_3, string "chroma")
{# median of 3 clips from Helpers.avs by G-forcechroma = default(chroma,"process") #default is "process". Alternates: "copy first" or "copy second"
Interleave(input_1,input_2,input_3)
chroma == "process" ? Clense(reduceflicker=false) : Clense(reduceflicker=false,grey=true)
SelectEvery(3,1)chroma == "copy first" ? last.MergeChroma(input_1) : chroma == "copy second" ? last.MergeChroma(input_2) : last
Return(last)
}
"I love Darth Editous and I'm not ashamed to admit it." ~ADigitalMan

"I love Darth Editous and I'm not ashamed to admit it." ~ADigitalMan
Here they come!!!

Here they come!!!

Here they come!!!

Here they come!!!
