MysteryX
7th October 2015, 00:50
I have this plugin to run HLSL pixel shaders in AviSynth.
https://github.com/mysteryx93/AviSynthShader/
This code runs at 3.3fps @ 80% CPU. When I run it on a Intel HD 4000, however, it is only using 10-25% of the GPU, including KNLMeans's usage.
Is there a way I could make better use of the GPU?
PluginPath=".\"
LoadPlugin(PluginPath+"ColorMatrix.dll")
LoadPlugin(PluginPath+"KNLMeansCL.dll")
LoadPlugin(PluginPath+"nnedi3.dll")
LoadPlugin(PluginPath+"Shader.dll")
Import(PluginPath+"SuperRes.avsi")
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
SetMTMode(3,4)
AviSource("Preview.avi", audio=false, pixel_type="YV12")
SetMTMode(2)
ColorMatrix(mode="Rec.601->Rec.709")
Crop(0, 0, -10, -0)
SetMTMode(5)
KNLMeansCL(D=2, A=1, h=3, device_type="GPU")
SetMTMode(2)
SuperRes(2, 0.42, 0, true, """nnedi3_rpow2(2, nns=4, cshift="Spline16Resize", Threads=2)""")
InterFrame(Cores=4, Tuning="Smooth", NewNum=60000, NewDen=1001, GPU=true)
SuperRes(2, 0.42, 0, true, """nnedi3_rpow2(2, nns=4, cshift="Spline36Resize", fwidth=940, fheight=728, Threads=2)""")
Spline36Resize(940, 720, 0, 4, -0, -4)
Distributor()
SuperRes is defined here
https://github.com/mysteryx93/AviSynthShader/blob/master/Shaders/SuperRes/SuperRes.avsi
https://github.com/mysteryx93/AviSynthShader/
This code runs at 3.3fps @ 80% CPU. When I run it on a Intel HD 4000, however, it is only using 10-25% of the GPU, including KNLMeans's usage.
Is there a way I could make better use of the GPU?
PluginPath=".\"
LoadPlugin(PluginPath+"ColorMatrix.dll")
LoadPlugin(PluginPath+"KNLMeansCL.dll")
LoadPlugin(PluginPath+"nnedi3.dll")
LoadPlugin(PluginPath+"Shader.dll")
Import(PluginPath+"SuperRes.avsi")
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
SetMTMode(3,4)
AviSource("Preview.avi", audio=false, pixel_type="YV12")
SetMTMode(2)
ColorMatrix(mode="Rec.601->Rec.709")
Crop(0, 0, -10, -0)
SetMTMode(5)
KNLMeansCL(D=2, A=1, h=3, device_type="GPU")
SetMTMode(2)
SuperRes(2, 0.42, 0, true, """nnedi3_rpow2(2, nns=4, cshift="Spline16Resize", Threads=2)""")
InterFrame(Cores=4, Tuning="Smooth", NewNum=60000, NewDen=1001, GPU=true)
SuperRes(2, 0.42, 0, true, """nnedi3_rpow2(2, nns=4, cshift="Spline36Resize", fwidth=940, fheight=728, Threads=2)""")
Spline36Resize(940, 720, 0, 4, -0, -4)
Distributor()
SuperRes is defined here
https://github.com/mysteryx93/AviSynthShader/blob/master/Shaders/SuperRes/SuperRes.avsi