Import("C:\Program Files\XviD4PSP 5\dlls\AviSynth\functions\AudioFunctions.avs")
Import("C:\Program Files\XviD4PSP 5\dlls\AviSynth\functions\VideoFunctions.avs")
LoadPlugin("C:\Program Files\XviD4PSP 5\apps\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\NicAudio.dll")
Import("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\QTGMC.avs")
LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\mvtools2.dll")
LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\RemoveGrainSSE2.dll")
LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\RepairSSE2.dll")
LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\mt_masktools-26.dll")
LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\fft3dfilter.dll")
#LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\VerticalCleaner.dll")
LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\nnedi3.dll")
#LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\EEDI3.dll")
#LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\EEDI2.dll")
LoadCPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\yadif.dll")
#LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\TDeint.dll")
#LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\AddGrainC.dll")
LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\ColorMatrix.dll")
LoadPlugin("C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\SplineResize.dll")
MPEG2Source("C:\TEMP\Title_1.index\Title_1.d2v", cpu=0, info=3)
ConvertToYV12(interlaced = true)
ColorMatrix(hints=true, interlaced=true)
Tweak(hue=0, sat=1.2, bright=0, cont=1.00, coring=false, dither=false)
QTGMC(Preset="Very Slow", Sharpness=1.0, FPSDivisor=2)
###[FILTERING]###
XviD4PSPPluginsPath = "C:\Program Files\XviD4PSP 5\dlls\AviSynth\plugins\"
LoadPlugin(XviD4PSPPluginsPath + "avstp.dll")
LoadPlugin(XviD4PSPPluginsPath + "RGTools.dll")
LoadPlugin(XviD4PSPPluginsPath + "mvtools2mod.dll")
LoadPlugin(XviD4PSPPluginsPath + "tcanny.dll")
LoadPlugin(XviD4PSPPluginsPath + "fft3dfilter.dll")
LoadPlugin(XviD4PSPPluginsPath + "nnedi3.dll")
LoadPlugin(XviD4PSPPluginsPath + "dither.dll")
LoadPlugin(XviD4PSPPluginsPath + "average2.dll")
LoadPlugin(XviD4PSPPluginsPath + "SangNom2.dll")
LoadPlugin(XviD4PSPPluginsPath + "TEdgeMask.dll")
LoadPlugin(XviD4PSPPluginsPath + "medianblur.dll")
LoadPlugin(XviD4PSPPluginsPath + "Fluxsmooth.dll")
LoadPlugin(XviD4PSPPluginsPath + "MSharpen.dll")
LoadPlugin(XviD4PSPPluginsPath + "flash3kyuu_deband.dll")
LoadPlugin(XviD4PSPPluginsPath + "SSE2Tools.dll")
LoadPlugin(XviD4PSPPluginsPath + "GRunT.dll")
LoadPlugin(XviD4PSPPluginsPath + "fturn-26.dll")
LoadPlugin(XviD4PSPPluginsPath + "masktools2.dll")
Import(XviD4PSPPluginsPath + "QTGMC.avs")
Import(XviD4PSPPluginsPath + "srestore_27h.avs")
Import(XviD4PSPPluginsPath + "mt_xxpand_multi.avsi")
Import(XviD4PSPPluginsPath + "Dither.avsi")
Import(XviD4PSPPluginsPath + "HQDeringmod.avsi")
Import(XviD4PSPPluginsPath + "ContraSharpen_mod.avsi")
LoadPlugin(XviD4PSPPluginsPath + "mvtools2.dll")
LoadPlugin(XviD4PSPPluginsPath + "bifrost.dll")
Import(XviD4PSPPluginsPath + "FadeDeRainbow.avs")
FadeDeRainbow (thSAD=3000,diff=3, th=10, show=false)
# setmemorymax(768)
AssumeTFF()
# AssumeBFF()
RemoveGrain(0) # No-Op filter, just to do frame request
ChangeFPS(last,last,true) # initiate a small forward buffer
# QTGMC(preset="Placebo", Edithreads=1)
SelectEven()
# srestore(Frate=23.976)
# srestore(Frate=25.000)
CSmod(chroma=false, ss_w=1.50, ss_h=1.50, thr=0, filter_ss="AA") # Sharpening
HQDeringmod() # DeRing
f3kdb(sample_mode=2,dynamic_grain=false,keep_tv_range=false,dither_algo=3,y=52,cb=36,cr=36,grainY=32,grainC=16) # DeBanding
###[FILTERING]###
Crop(10, 0, -12, -0)
Spline144Resize(992, 768)