﻿
[Source]
Automatic = # can be configured at: Tools > Settings > Source Filters
AviSource = AviSource("%source_file%", audio=false)
D2VSource = D2VSource("%source_file%")
DirectShowSource = DirectShowSource("%source_file%", audio=false)
DSS2 = DSS2("%source_file%")
FFMS2 = FFMS2("%source_file%", atrack=-1, cachefile="%source_temp_file%.ffindex")
FFVideoSource = FFVideoSource("%source_file%", cachefile="%source_temp_file%.ffindex")
LSMASHVideoSource = LSMASHVideoSource("%source_file%")
LWLibavVideoSource = LWLibavVideoSource("%source_file%", cachefile="%source_temp_file%.lwi")
Manual = # shows the filter selection dialog
MPEG2Source = MPEG2Source("%source_file%")

[Color]
ColorYUV | AutoAdjust = AutoAdjust(gamma_limit=1.0, scd_threshold=16, gain_mode=1, auto_gain=$select:msg:Enable Auto Gain?;true;false$, auto_balance=$select:msg:Enable Auto Balance?;true;false$, Input_tv=$select:msg:Is the Input using TV Range?;true;false$, output_tv=$select:msg:Do you want to use TV Range for Output?;true;false$, use_dither=$select:msg:Use Dither?;true;false$, high_quality=$select:msg:Use High Quality Mode?;true;false$, high_bitdepth=$select:msg:Use High Bit Depth Mode?;true;false$, threads_count=$enter_text:How Many Threads do You Wish to use?$)
ColorYUV | AutoGain = ColorYUV(autogain=$select:msg:Enable AutoGain?;true;false$, autowhite=$select:msg:Enable AutoWhite?;true;false$)
ColorYUV | Levels = $select:TV to PC|ColorYUV(levels="TV->PC");PC to TV|ColorYUV(levels="PC->TV")$
ColorYUV | Stack = $select:To Stack|ConvertToStacked();From Stacked|ConvertFromStacked()$
ColorYUV | Tweak = Tweak(realcalc=true, dither_strength=1.0, sat=0.75, startHue=105, endHue=138 )
Convert | ConvertBits = ConvertBits($select:msg:Select the Bit Depth You want to Convert To;8;10;12;14;16;32$)
Convert | ConvertFromDoubleWidth = ConvertFromDoubleWidth(bits=$select:msg:Select the Bit Depth;8;10;12;14;16;32$)
Convert | ConvertTo = ConvertTo$enter_text:Enter The Format You Wish To Convert To$()
Convert | Format = z_ConvertFormat(pixel_type="$enter_text:Enter the Format You Wish to Convert to$", colorspace_op="$select:msg:Select Input Color Matrix;rgb;709;unspec;fcc;470bg;170m;240;ycgco;2020ncl;2020cl;chromancl;chromacl;ictcp$:$select:msg:Select Input Color Transfer;709;unspec;470m;470bg;601;240m;linear;log100;log316;xvycc;srgb;2020_10;2020_12;st2084;std-b67$:$select:msg:Select Input Color Primaries;709;unspec;470m;470bg;170m;240m;film;2020;st428;st431-2;st432-1;jedec-p22$:$select:msg:Select Pixel Range;limited;l;full;f$=>$select:msg:Select Output Color Matrix;rgb;709;unspec;fcc;470bg;170m;240;ycgco;2020ncl;2020cl;chromancl;chromacl;ictcp$:$select:msg:Select Output Color Transfer;709;unspec;470m;470bg;601;240m;linear;log100;log316;xvycc;srgb;2020_10;2020_12;st2084;std-b67$:$select:msg:Select Output Color Primaries;709;unspec;470m;470bg;170m;240m;film;2020;st428;st431-2;st432-1;jedec-p22$:$select:msg:Select Pixel Range;limited;l;full;f$", dither_type="$select:msg:Select Dither Type;none;ordered;random;error_diffusion$")
Dither | 8Bit to 16Bit = Dither_convert_8_to_16()
Dither | DFTTest(LSB) = dfttest(lsb=true)
Dither | DitherPost = DitherPost()
Dither | Gamma / Linear = $select:Gamma To Linear|Dither_y_gamma_to_linear;Linear To Gamma|Dither_y_linear_to_gamma$(curve="$select:msg:Select the Color Curve;601;709;2020$")
Dither | Sigmoid = $select:Sigmoid Direct|Dither_sigmoid_direct();Sigmoid Inverse|Dither_sigmoid_inverse()$
Dither | YUV / RGB = $select:RGB To YUV|Dither_convert_rgb_to_yuv();YUV To RGB|Dither_convert_yuv_to_rgb()$
HDRCore | Cube = Cube("$browse_file$")

[Crop]
Crop = $select:msg:Select Version;Crop;Dither_Crop16$(%crop_left%, %crop_top%, -%crop_right%, -%crop_bottom%)
Hardware Encoder = # hardware encoder crops

[Field]
Assume = $select:TFF|AssumeTFF();BFF|AssumeTFF()$
EEDI3 = EEDI3()
FieldDeinterlace = FieldDeinterlace()

IVTC =
    Telecide(guide=1)
    Decimate()

nnedi3 = nnedi3(field=1)

QTGMC | QTGMC With Repair =
    QTGMC1 = QTGMC(preset="Slower", inputType=2)
    QTGMC2 = QTGMC(preset="Slower", inputType=3, prevGlobals="Reuse")
    $select:msg:Select Repair Mode To Use;Repair|Repair(QTGMC1, QTGMC2, 1);Repair16|Dither_Repair16(QTGMC1, QTGMC2, 1)$

QTGMC | QTGMC... = QTGMC(preset="$select:msg:Select a preset.;Draft;Ultra Fast;Super Fast;Very Fast;Faster;Fast;Medium;Slow;Slower;Very Slow;Placebo$", InputType=$select:msg:Select Input Type;Interlaced|0;Progressive|1;Progressive Repair Details|2;Progressive Full Repair|3$, sourceMatch=3, sharpness=0.2, tr2=2, ediThreads=8)
Select = $select:Even|SelectEven();Odd|SelectOdd()$
TDeint = TDeint()
yadifmod2 = yadifmod2()

[Frame Rate]
AssumeFPS = AssumeFPS($select:msg:Select a frame rate;23.976|24000, 1001;24;25;29.970|30000, 1001;30;50;59.940|60000, 1001;60;120;144;240$)
AssumeFPS Source File = AssumeFPS(%media_info_video:FrameRate%)
ChangeFPS = ChangeFPS($select:msg:Select a frame rate;23.976|24000, 1001;24;25;29.970|30000, 1001;30;50;59.940|60000, 1001;60;120;144;240$)
ConvertFPS = ConvertFPS($select:msg:Select a frame rate;23.976|24000, 1001;24;25;29.970|30000, 1001;30;50;59.940|60000, 1001;60;120;144;240$)
InterFrame = InterFrame(preset="Medium", tuning="$select:msg:Select the Tuning Preset;Animation;Film;Smooth;Weak$", newNum=$enter_text:Enter the NewNum Value.$, newDen=$enter_text:Enter the NewDen Value$, cores=$enter_text:Enter the Number of Cores You want to use$, overrideAlgo=$select:msg:Which Algorithm Do you want to Use?;Strong Predictions|2;Intelligent|13;Smoothest|23$, GPU=$select:msg:Enable GPU Feature?;True;False$)

SVPFlow =
    Threads = 8
    super_params = "{pel:2,gpu:1}"
    analyse_params = """{block:{w:16,h:16}, main:{search:{coarse:{distance:-10}}}, refine:[{thsad:200}]}""" 
    smoothfps_params = "{rate:{num:4,den:2},algo:23,cubic:1}"
    super = SVSuper(super_params)
    vectors = SVAnalyse(super, analyse_params)
    SVSmoothFps(super, vectors, smoothfps_params, mt=threads)
    #Prefetch(threads) must be added at the end of the script and Threads=9 after the source
    Prefetch(threads)

YRFC = YFRC(BlockH=16, BlockV=16, OverlayType=0, MaskExpand=1)

[Line]
Anti-Aliasing | DAA = daa3mod()
Anti-Aliasing | MMA2 = MAA2(mask=1, chroma=false, ss=2.0, aa=48, aac=40, threads=4, show=0)
Anti-Aliasing | SangNom2 = Sangnom2()
Sharpen | aWarpSharp2 = aWarpSharp2(thresh=128, blur=2, type=0, depth=16, chroma=3)
Sharpen | FineSharp = $select:msg:Select Strength;Light|FineSharp(mode=1, sstr=2, cstr=0.8, xstr=0.19, lstr=1.49, pstr=1.272);Moderate|FineSharp(mode=2, sstr=2.0,  cstr=1.3, xstr=0.0,  lstr=1.49, pstr=1.472);Strong|FineSharp(mode=3, sstr=6.0,  cstr=1.3, xstr=0.0,  lstr=1.49, pstr=1.472)$
Sharpen | LSFmod = LSFmod(defaults="slow", strength=100, Smode=5, Smethod=3, kernel=11, secure=true, Szrp=16, Spwr=4, SdmpLo=4, SdmpHi=48, Lmode=4, overshoot=1, undershoot=1, Overshoot2=1, Undershoot2=1, soft=-2, soothe=true, keep=20, edgemode=0, edgemaskHQ=true, ss_x=1.50, ss_y=1.50, dest_x=%target_width%, dest_y=%target_height%, show=false, screenW=1280, screenH=1024)
Sharpen | MSharpen = MSharpen(threshold=10, strength=100, highq=true, mask=false)
Sharpen | MultiSharpen = MultiSharpen(1)
Sharpen | pSharpen = pSharpen(strength=25, threshold=75, ss_x=1.0, ss_y=1.0)

[Misc]
AddBorders = AddBorders(0,0,0,0) #left,top,right,bottom
f3kdb Neo = neo_f3kdb(y=64, cb=64, cr=64, grainy=0, grainc=0)
Histogram = Histogram("levels", bits=$select:msg:Select BitDepth;8;10;12$)
MTMode | Prefetch = Prefetch($enter_text:Enter the Number of Threads to Use$)
MTMode | Set Max Memory = SetMemoryMax($enter_text:Enter the Maximum Memory Avisynth Can use$)
MTMode | Set Threads = threads=$enter_text:Enter The Number of Threads to Use$
MTMode | SetMTMode Filter = SetFilterMTMode("$enter_text:Enter The FilterName$",$enter_text:Enter Mode You Wish to Use$)
SelectRangeEvery = SelectRangeEvery(1500,50)
SplitVertical = Splitvertical=true

[Noise]
AddGrainC = AddGrainC(var=1.0, uvar=0.0, hcorr=0.0, vcorr=0.0, seed=6, constant=false, sse2=true)
DeGrainMedian = DeGrainMedian(limitY=4, limitUV=6, mode=1, interlaced=false, norow=false)
DeNoise | Denoise MD = DeNoiseMD1(sigma=4, overlap=2, thcomp=80, str=0.8)DitherPost(mode=7, ampo=1, ampn=0)
DeNoise | Denoise MF = DenoiseMF2(s1=2.0, s2=2.5, s3=3.0, s4=2.0, overlap=4, thcomp=80, str=0.8, gpu=$select:msg:Use GPU Enabled Feature?;True;False$)
DFTTest = dfttest($select:msg:Select Strength;Light|sigma=6, tbsize=3;Moderate|sigma=16, tbsize=5;Strong Static|sigma=64, tbsize=1;Strong Temporal|sigma=64, tbsize=3$,$select:msg:Reduce Banding?;No Deband| dither=0;Deband| dither=1;Add Noise| dither=2;More Noise| dither=3$)
DFTTest Neo = neo_dfttest(ftype=0, sigma=2.0, y=3, u=3, v=3)
FFT3D Neo = neo_fft3d(sigma=2.0, bt=3, y=3, u=3, v=3)
FFT3DFilter | FFT3DFilter = FFT3DFilter()
FFT3DFilter | FFT3DGPU = FFT3DGPU(sigma=1.5, bt=3, bw=32, bh=32, ow=16, oh=16, sharpen=0.4, NVPerf=$select:msg:Enable Nvidia Function;True;False$)
HQDN3D = HQDN3D(ls=4.0, cs=3.0, lt=6.0, ct=4.5, restart=7)
mClean = mClean()
MCTemporalDenoise | MCTemporalDenoise = MCTemporalDenoise(settings="medium")

MCTemporalDenoise | MCTemporalDenoisePP =
    source=last
    denoised=FFT3Dfilter()
    MCTemporalDenoisePP(denoised)

MiniDeen = MiniDeen(radius=1, thrY=10, thrUV=12, Y=3, U=3, V=3)
NLMeans | KNLMeansCL = KNLMeansCL(D=1, A=1, h=$select:msg:Select Strength;Light|2;Medium|4;Strong|4$, device_type="auto")
NLMeans | TNLMeans = TNLMeans(Ax=4, Ay=4, Az=0, Sx=2, Sy=2, Bx=1, By=1, ms=false, rm=4, a=1.0, h=1.8, sse=true)
NLMeans | xNLMeans = xnlmeans(a=4,h=2.2,vcomp=0.5,s=1)
RemoveGrain | RemoveGrain = RemoveGrain(mode=2, modeU=2, modeV=2, planar=false)

RemoveGrain | RemoveGrain | RemoveGrain16 with Repair16 =
    Processed = Dither_removegrain16(mode=2, modeU=2, modeV=2)
    Dither_repair16(Processed, mode=2, modeU=2, modeV=2)

RemoveGrain | RemoveGrain With Repair =
    Processed = RemoveGrain(mode=2, modeU=2, modeV=2, planar=false)
    Repair(Processed, mode=2, modeU=2, modeV=2, planar=false)

SMDegrain | SMDegrain Hard Grain = SMDegrain(tr=6, thSAD=600, contrasharp=true, refinemotion=true)
SMDegrain | SMDegrain Light Grain = SMDegrain(tr=1, thSAD=300, contrasharp=true)

SMDegrain | SMDegrain MDegrain2 =
    super_search = Dither_Luma_Rebuild(S0=1.0, c=0.0625).MSuper(rfilter=4)
    bv2 = super_search.MAnalyse(isb=true,  delta=2, overlap=4)
    bv1 = super_search.MAnalyse(isb=true,  delta=1, overlap=4)
    fv1 = super_search.MAnalyse(isb=false, delta=1, overlap=4)
    fv2 = super_search.MAnalyse(isb=false, delta=2, overlap=4)
    MDegrain2(MSuper(levels=1), bv1, fv1, bv2, fv2, thSAD=300, thSADC=150)

TemporalDegrain2 = TemporalDegrain2(degrainTR=2, postFFT=3, postSigma=3)
VagueDenoiser = VagueDenoiser(threshold=0.8, method=1, nsteps=6, chromaT=0.8)

[Resize]

Advanced | CropResize =
    CropResize(%target_width%, %target_height%, \
        %crop_left%, %crop_top%, -%crop_right%, -%crop_bottom%, \
        InDAR=%source_dar%, OutDAR=%target_dar%, Info=true)

Advanced | Dither_Resize16 = Dither_resize16(%target_width%, %target_height%)

Advanced | Dither_Resize16 In Linear Light =
    Dither_convert_yuv_to_rgb (matrix="2020", output="rgb48y", lsb_in=true)
    Dither_y_gamma_to_linear(tv_range_in=false, tv_range_out=false, curve="2020", sigmoid=true)
    Dither_resize16nr(%target_width%, %target_height%, kernel="spline36")
    Dither_y_linear_to_gamma(tv_range_in=false, tv_range_out=false, curve="2020", sigmoid=true)
    r = SelectEvery (3, 0)
    g = SelectEvery (3, 1)
    b = SelectEvery (3, 2)
    Dither_convert_rgb_to_yuv(r, g, b, matrix="2020", lsb=true)

Advanced | Hardware Encoder = # hardware encoder resizes
Advanced | ResizeMT = $select:BicubicResizeMT;BilinearResizeMT;BlackmanResizeMT;GaussResizeMT;Lanczos4ResizeMT;LanczosResizeMT;PointResizeMT;SincResizeMT;Spline16ResizeMT;Spline36ResizeMT;Spline64ResizeMT$(%target_width%, %target_height%, prefetch=4)
Advanced | SuperRes = $select:msg:Select Version;SuperResXBR|SuperResXBR;SuperRes|SuperRes;SuperXBR|SuperXBR$(passes=$select:msg:How Many Passes Do you wish to Perform?;2;3;4;5$, factor=$select:msg:Factor Increase by?;2;4$)
Resize... = $select:BicubicResize;BilinearResize;BlackmanResize;GaussResize;Lanczos4Resize;LanczosResize;PointResize;SincResize;Jinc36Resize;Jinc64Resize;Jinc144Resize;Jinc256Resize;Spline16Resize;Spline36Resize;Spline64Resize$(%target_width%, %target_height%)

[Restoration]
DeBlock | DeBlock_QED = Deblock_QED(quant1=24, quant2=26, aOff1=1, aOff2=1, bOff1=2, bOff2=2, uv=3)
DeBlock | DeBock = Deblock(quant=25, aOffset=0, bOffset=0)
DeBlock | MipSmooth = MipSmooth(downsizer="lanczos", upsizer="bilinear", scalefactor=1.5, method="strong")
DeBlock | SmoothD2 = SmoothD2(quant=3, num_shift=3, Matrix=3, Qtype=1, ZW=1, ZWce=1, ZWlmDark=0, ZWlmBright=255, ncpu=4)
DeHalo | DehaloAlpha = DeHalo_alpha_mt(rx=2.0, ry=2.0, darkstr=1.0, brightstr=1.0, lowsens=50, highsens=50, ss=1.5)
DeHalo | FineDehalo = FineDehalo(rx=2.0, ry=2.0, thmi=80, thma=128, thlimi=50, thlima=100, darkstr=1.0, brightstr=1.0, showmask=0, contra=0.0, excl=true)
DeHalo | HQDeringmod = HQDeringmod()
RCR | CNR2 = Cnr2(mode="oxx", scdthr=10.0, ln=35, lm=192, un=47, um=255, vn=47, vm=255, log=false, sceneChroma=false)
RCR | ColorBanding = $select:GradFun3|GradFun3();f3kdb|f3kdb()$
RCR | Vinverse = $select:Vinverse|vinverse(sstr=2.7, amnt=255, uv=3, scl=0.25);Vinverse2|vinverse2(sstr=2.7, amnt=255, uv=3, scl=0.25)$

[Rotation]
Left = TurnLeft()
Right = TurnRight()
Upside Down = Turn180()
