From 56fd5c2c1ddd9d60b148392e9f8b60eef6e97849 Mon Sep 17 00:00:00 2001 From: Revan654 <38091898+Revan654@users.noreply.github.com> Date: Tue, 5 Mar 2019 16:40:18 -0500 Subject: [PATCH] Add files via upload --- General/VideoScript.vb | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/General/VideoScript.vb b/General/VideoScript.vb index 9c950976..c988eee6 100644 --- a/General/VideoScript.vb +++ b/General/VideoScript.vb @@ -162,12 +162,22 @@ Public Class VideoScript If convertToRGB Then If Engine = ScriptEngine.AviSynth Then If p.SourceHeight > 576 Then - code += BR + "ConvertToRGB(matrix=""Rec709"")" + code += BR + "ConvertBits(8)" + BR + "ConvertToRGB(matrix=""Rec709"")" Else - code += BR + "ConvertToRGB(matrix=""Rec601"")" + code += BR + "ConvertBits(8)" + BR + "ConvertToRGB(matrix=""Rec601"")" End If Else - Dim vsCode = "" + Dim vsCode = " +if clip.format.id == vs.RGB24: + _matrix_in_s = 'rgb' +else: + if clip.height > 576: + _matrix_in_s = '709' + else: + _matrix_in_s = '470bg' +clip = clip.resize.Bicubic(matrix_in_s = _matrix_in_s, format = vs.COMPATBGR32) +clip.set_output() +" code += BR + vsCode End If End If @@ -436,7 +446,7 @@ Public Class VideoScript script.Filters.Add(New VideoFilter("Crop", "Crop", "clip = core.std.Crop(clip, %crop_left%, %crop_right%, %crop_top%, %crop_bottom%)", False)) script.Filters.Add(New VideoFilter("Noise", "DFTTest", "clip = core.dfttest.DFTTest(clip, sigma=6, tbsize=3,opt=3)", False)) script.Filters.Add(New VideoFilter("Field", "QTGMC Medium", $"clip = core.std.SetFieldBased(clip, 2) # 1 = BFF, 2 = TFF{BR}clip = havsfunc.QTGMC(clip, TFF = True, Preset = 'Medium')", False)) - 'script.Filters.Add(New VideoFilter("FrameRate", "SVPFlow", "crop_string = """"" + BR + "resize_string = """"" + BR + "super_params = ""{pel:1,scale:{up:0},gpu:1,full:false,rc:true}""" + BR + "analyse_params = ""{block:{w:16},main:{search:{coarse:{type:4,distance:-6,bad:{sad:2000,range:24}},type:4}},refine:[{thsad:250}]}""" + BR + "smoothfps_params = ""{gpuid:11,linear:true,rate:{num:60000,den:1001,abs:true},algo:23,mask:{area:200},scene:{}}""" + BR + "def interpolate(clip):" + BR + " input = clip" + BR + " if crop_string!='':" + BR + " input = eval(crop_string)" + BR + " if resize_string!='':" + BR + " input = eval(resize_string)" + BR + " super = core.svp1.Super(input,super_params)" + BR + " vectors = core.svp1.Analyse(super[""clip""],super[""data""],input,analyse_params)" + BR + " smooth = core.svp2.SmoothFps(input,super[""clip""],super[""data""],vectors[""clip""],vectors[""data""],smoothfps_params,src=clip)" + BR + " smooth = core.std.AssumeFPS(smooth,fpsnum=smooth.fps_num,fpsden=smooth.fps_den)" + BR + " return smooth" + BR + "clip = interpolate(clip)", False)) + script.Filters.Add(New VideoFilter("FrameRate", "SVPFlow", "crop_string = """"" + BR + "resize_string = """"" + BR + "super_params = ""{pel:1,scale:{up:0},gpu:1,full:false,rc:true}""" + BR + "analyse_params = ""{block:{w:16},main:{search:{coarse:{type:4,distance:-6,bad:{sad:2000,range:24}},type:4}},refine:[{thsad:250}]}""" + BR + "smoothfps_params = ""{gpuid:11,linear:true,rate:{num:60000,den:1001,abs:true},algo:23,mask:{area:200},scene:{}}""" + BR + "def interpolate(clip):" + BR + " input = clip" + BR + " if crop_string!='':" + BR + " input = eval(crop_string)" + BR + " if resize_string!='':" + BR + " input = eval(resize_string)" + BR + " super = core.svp1.Super(input,super_params)" + BR + " vectors = core.svp1.Analyse(super[""clip""],super[""data""],input,analyse_params)" + BR + " smooth = core.svp2.SmoothFps(input,super[""clip""],super[""data""],vectors[""clip""],vectors[""data""],smoothfps_params,src=clip)" + BR + " smooth = core.std.AssumeFPS(smooth,fpsnum=smooth.fps_num,fpsden=smooth.fps_den)" + BR + " return smooth" + BR + "clip = interpolate(clip)", False)) script.Filters.Add(New VideoFilter("ColorSpace", "Respec", "clip = core.fmtc.resample (clip, css=""444"")" + BR + "clip = core.fmtc.matrix (clip, mats=""709"", matd=""709"")" + BR + "clip = core.fmtc.resample (clip, css=""420"")" + BR + "clip = core.fmtc.bitdepth (clip, bits=10, fulls=False, fulld=False)", False)) script.Filters.Add(New VideoFilter("Resize", "Spline64Resize", "clip = core.fmtc.resample(clip, kernel=""spline64"", w=%target_width%, h=%target_height%)", False)) ret.Add(script) @@ -726,7 +736,7 @@ Public Class FilterCategory framerate.Filters.Add(New VideoFilter(framerate.Name, "AssumeFPS | AssumeFPS...", "clip = core.std.AssumeFPS(clip, None, $select:msg:Select a frame rate.;24000/1001|24000, 1001;24|24, 1;25|25, 1;30000/1001|30000, 1001;30|30, 1;50|50, 1;60000/1001|60000, 1001;60|60, 1$)")) framerate.Filters.Add(New VideoFilter(framerate.Name, "InterFrame", "clip = havsfunc.InterFrame(clip, 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$, OverrideAlgo=$select:msg:Which Algorithm Do you Wish to Use?;Strong Predictions|2;Intelligent|13;Smoothest|23$, GPU=$select:msg:Enable GPU Feature?;True;False$)")) framerate.Filters.Add(New VideoFilter(framerate.Name, "SVPFlow", "sup = core.mv.Super(clip, pel=2, hpad=0, vpad=0)" + BR + "bvec = core.mv.Analyse(sup, blksize=16, isb=True, chroma=True, search=3, searchparam=1)" + BR + "fvec = core.mv.Analyse(sup, blksize=16, isb=False, chroma=True, search=3, searchparam=1)" + BR + "$select:msg:Select FPS Filter to Use;FlowFPS|clip = core.mv.FlowFPS(clip, sup, bvec, fvec, mask=2;BlockFPS|clip = core.mv.BlockFPS(clip, sup, bvec, fvec, mode=3, thscd2=12$, num=$enter_text:Enter The Num Value$, den=$enter_text:Enter The Den Value$)")) - 'framerate.Filters.Add(New VideoFilter(framerate.Name, "SVPFlow | SVPFlow", "crop_string = """"" + BR + "resize_string = """"" + BR + "super_params = ""{pel:1,scale:{up:0},gpu:1,full:false,rc:true}""" + BR + "analyse_params = ""{block:{w:16},main:{search:{coarse:{type:4,distance:-6,bad:{sad:2000,range:24}},type:4}},refine:[{thsad:250}]}""" + BR + "smoothfps_params = ""{gpuid:11,linear:true,rate:{num:60000,den:1001,abs:true},algo:23,mask:{area:200},scene:{}}""" + BR + "def interpolate(clip):" + BR + " input = clip" + BR + " if crop_string!='':" + BR + " input = eval(crop_string)" + BR + " if resize_string!='':" + BR + " input = eval(resize_string)" + BR + " super = core.svp1.Super(input,super_params)" + BR + " vectors = core.svp1.Analyse(super[""clip""],super[""data""],input,analyse_params)" + BR + " smooth = core.svp2.SmoothFps(input,super[""clip""],super[""data""],vectors[""clip""],vectors[""data""],smoothfps_params,src=clip)" + BR + " smooth = core.std.AssumeFPS(smooth,fpsnum=smooth.fps_num,fpsden=smooth.fps_den)" + BR + " return smooth" + BR + "clip = interpolate(clip)")) + framerate.Filters.Add(New VideoFilter(framerate.Name, "SVPFlow | SVPFlow", "crop_string = """"" + BR + "resize_string = """"" + BR + "super_params = ""{pel:1,scale:{up:0},gpu:1,full:false,rc:true}""" + BR + "analyse_params = ""{block:{w:16},main:{search:{coarse:{type:4,distance:-6,bad:{sad:2000,range:24}},type:4}},refine:[{thsad:250}]}""" + BR + "smoothfps_params = ""{gpuid:11,linear:true,rate:{num:60000,den:1001,abs:true},algo:23,mask:{area:200},scene:{}}""" + BR + "def interpolate(clip):" + BR + " input = clip" + BR + " if crop_string!='':" + BR + " input = eval(crop_string)" + BR + " if resize_string!='':" + BR + " input = eval(resize_string)" + BR + " super = core.svp1.Super(input,super_params)" + BR + " vectors = core.svp1.Analyse(super[""clip""],super[""data""],input,analyse_params)" + BR + " smooth = core.svp2.SmoothFps(input,super[""clip""],super[""data""],vectors[""clip""],vectors[""data""],smoothfps_params,src=clip)" + BR + " smooth = core.std.AssumeFPS(smooth,fpsnum=smooth.fps_num,fpsden=smooth.fps_den)" + BR + " return smooth" + BR + "clip = interpolate(clip)")) ret.Add(framerate) Dim color As New FilterCategory("Color")