forked from Nuihc88/SVPlite
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
259 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/AviSynth/plugins/*.dll | ||
/installer |
38 changes: 19 additions & 19 deletions
38
SVPlite_Environment.avsi → AviSynth/SVPlite_Environment.avsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
## SVPlite - Set Environmental Variables To Apply Platform-Specific Performance Optimizations. ## | ||
#SetMemoryMax(3072) # Uncomment to trade startup speed for more throughput. | ||
SetCacheMode(0) # 0 gives slight startup boost, 1 increases throughput. | ||
cores=4 # This is for slightly improved compatibility with hyperthreaded CPUs. | ||
threads=8 # 2x core count gives the lowest latency on most CPUs; 1.5x gives higher throughput. | ||
frames=16 # For lowest latency, use same value for 'present queue', 'render queue' & 'buffer'. | ||
SetFilterMTMode("DEFAULT_MT_MODE", 2) # Safe Default - Never change. | ||
SetFilterMTMode("potplayer_source", 3) | ||
SetFilterMTMode("ffdshow_source", 3) # For all Source Filters use mode 3. | ||
SetFilterMTMode("SVSuper", 1) | ||
SetFilterMTMode("SVAnalyse", 1) # All SVPflow Filters support mode 1. | ||
SetFilterMTMode("SVSmoothFps", 1) | ||
LoadPlugin("PlugIns\svpflow1.dll","PlugIns\svpflow2.dll") | ||
#potplayer_source() | ||
#ffdshow_source() | ||
#AvsFilterSource() | ||
## SVPlite - Set Environmental Variables To Apply Platform-Specific Performance Optimizations. ## | ||
|
||
#SetMemoryMax(3072) # Uncomment to trade startup speed for more throughput. | ||
SetCacheMode(0) # 0 gives slight startup boost, 1 increases throughput. | ||
cores=4 # This is for slightly improved compatibility with hyperthreaded CPUs. | ||
threads=8 # 2x core count gives the lowest latency on most CPUs; 1.5x gives higher throughput. | ||
frames=16 # For lowest latency, use same value for 'present queue', 'render queue' & 'buffer'. | ||
|
||
SetFilterMTMode("DEFAULT_MT_MODE", 2) # Safe Default - Never change. | ||
SetFilterMTMode("potplayer_source", 3) | ||
SetFilterMTMode("ffdshow_source", 3) # For all Source Filters use mode 3. | ||
SetFilterMTMode("SVSuper", 1) | ||
SetFilterMTMode("SVAnalyse", 1) # All SVPflow Filters support mode 1. | ||
SetFilterMTMode("SVSmoothFps", 1) | ||
LoadPlugin("plugins\svpflow1.dll","plugins\svpflow2.dll") | ||
|
||
#potplayer_source() | ||
#ffdshow_source() | ||
AvsFilterSource() |
42 changes: 21 additions & 21 deletions
42
SVPlite_Processing.avsi → AviSynth/SVPlite_Processing.avsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
## SVPlite - Employ Generic Cache/Buffer Management Strategies For Specific Usage-Scenarios. ## | ||
Prefetch(1,threads) | ||
if (!IsYV12) {last.ConvertBits(bits=8).ConvertToYV12()} # This automatically converts incompatible input formats, but might add a bit of overhead and some color information could be lost. | ||
#clip=last # Should be unnecessary, but try uncommenting this if AviSynth+ is throwing an error. | ||
#Prefetch(1,Ceil(frames/8)) # Additional instances increase throughput at a slight latency cost. | ||
super=SVSuper(last, super_params) | ||
#Prefetch(1,Ceil(frames/4)) # Earlier Prefetches should be given lower loads to reduce latencies. | ||
vectors=SVAnalyse(super, analyse_params, src=last) | ||
#Prefetch(2,Ceil(frames/2)) # Dividing previous ones by 2 seems to be the performance sweet spot. | ||
#OnCPU(Ceil(cores)) # Above ones are fairly quick and don't need to have cores on standby. | ||
SVSmoothFps(last, super, vectors, smoothfps_params, mt=frames) # Sample scripts use 'threads' here, but using 'frames' seems to refill the buffer much quicker, i didn't notice any downsides. | ||
#OnCPU(Ceil(threads)) # Above one is slower and needs cores on standby, especially with linear=true. | ||
# Diagnostic Notes: Additional Prefetches are made generally obsolete by OnCPU Pipelines and are disabled by default because unlike OnCPU they slow frame drop/delay and seek recovery, but as such turning them on is a reliable and convenient way to determine whether your script is light enough. If not, the video will freeze while still keeping the player responsive. | ||
OnCPU(frames) # # Older AviSynth versions don't support these pipelines, but they make quite a difference. For lower latency at the cost of some throughput, disable this one and enable the other two above. | ||
Prefetch(1,frames) # Higher thread count increases latency, but Prefetch to buffer size prevents Sync-drifting & frame drops with neglible overhead. | ||
## SVPlite - Employ Generic Cache/Buffer Management Strategies For Specific Usage-Scenarios. ## | ||
|
||
Prefetch(1,threads) | ||
if (!IsYV12) {last.ConvertBits(bits=8).ConvertToYV12()} # This automatically converts incompatible input formats, but might add a bit of overhead and some color information could be lost. | ||
#clip=last # Should be unnecessary, but try uncommenting this if AviSynth+ is throwing an error. | ||
#Prefetch(1,Ceil(frames/8)) # Additional instances increase throughput at a slight latency cost. | ||
|
||
super=SVSuper(last, super_params) | ||
#Prefetch(1,Ceil(frames/4)) # Earlier Prefetches should be given lower loads to reduce latencies. | ||
|
||
vectors=SVAnalyse(super, analyse_params, src=last) | ||
#Prefetch(2,Ceil(frames/2)) # Dividing previous ones by 2 seems to be the performance sweet spot. | ||
#OnCPU(Ceil(cores)) # Above ones are fairly quick and don't need to have cores on standby. | ||
|
||
SVSmoothFps(last, super, vectors, smoothfps_params, mt=frames) # Sample scripts use 'threads' here, but using 'frames' seems to refill the buffer much quicker, i didn't notice any downsides. | ||
#OnCPU(Ceil(threads)) # Above one is slower and needs cores on standby, especially with linear=true. | ||
|
||
|
||
# Diagnostic Notes: Additional Prefetches are made generally obsolete by OnCPU Pipelines and are disabled by default because unlike OnCPU they slow frame drop/delay and seek recovery, but as such turning them on is a reliable and convenient way to determine whether your script is light enough. If not, the video will freeze while still keeping the player responsive. | ||
OnCPU(frames) # # Older AviSynth versions don't support these pipelines, but they make quite a difference. For lower latency at the cost of some throughput, disable this one and enable the other two above. | ||
Prefetch(1,frames) # Higher thread count increases latency, but Prefetch to buffer size prevents Sync-drifting & frame drops with neglible overhead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Put svpflow1.dll and svpflow2.dll in this directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using System.IO; | ||
using System.Text.RegularExpressions; | ||
|
||
namespace SVPLiteSetFPS | ||
{ | ||
internal class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
Console.Write("Input Desired Framerate: "); | ||
var fps = Console.ReadLine(); | ||
foreach (string file in Directory.EnumerateFiles(".", "*.avs")) | ||
{ | ||
string contents = File.ReadAllText(file); | ||
contents = Regex.Replace(contents, "{num:[0-9]*,", "{num:" + fps + ","); | ||
File.WriteAllText(file, contents); | ||
} | ||
Console.WriteLine("Done!"); | ||
Console.WriteLine("Press any key to exit!"); | ||
Console.ReadKey(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("SVPLiteSetFPS")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("SVPLiteSetFPS")] | ||
[assembly: AssemblyCopyright("Copyright © 2022")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("6643AB3B-A54B-4B30-8CA5-0E0299BE4B32")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" | ||
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{6643AB3B-A54B-4B30-8CA5-0E0299BE4B32}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>SVPLiteSetFPS</RootNamespace> | ||
<AssemblyName>SVPLiteSetFPS</AssemblyName> | ||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System"/> | ||
<Reference Include="System.Core"/> | ||
<Reference Include="System.Data"/> | ||
<Reference Include="System.Xml"/> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Program.cs"/> | ||
<Compile Include="Properties\AssemblyInfo.cs"/> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"/> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SVPLiteSetFPS", "SVPLiteSetFPS.csproj", "{6643AB3B-A54B-4B30-8CA5-0E0299BE4B32}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{6643AB3B-A54B-4B30-8CA5-0E0299BE4B32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{6643AB3B-A54B-4B30-8CA5-0E0299BE4B32}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{6643AB3B-A54B-4B30-8CA5-0E0299BE4B32}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{6643AB3B-A54B-4B30-8CA5-0E0299BE4B32}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## SVPlite Heavy (For Anime/Mixed Content) ## <-- suggested usage scenario. ## | ||
Import(".\AviSynth\SVPlite_Environment.avsi") | ||
|
||
super_params="{pel:1,gpu:1,full:false}" | ||
analyse_params="{block:{w:32,h:32,overlap:2},main:{ | ||
search:{distance:-9 ,type:4,satd:false,sort:true, | ||
coarse:{distance:-21,type:4,satd:true,trymany:false, | ||
levels:4,width:961,bad:{range:0}}},penalty:{lambda:3.3, | ||
plevel:1.25,pnew:44,pglobal:104,pzero:240,pnbour:74,prev:-1}}}" | ||
smoothfps_params="{rate:{num:75,den:1, abs:true},mask:{cover:50}, | ||
algo:13,cubic:1,linear:true,scene:{mode:1,blend:false, | ||
limits:{scene:2220,zero:4,blocks:30},luma:1}}" | ||
|
||
Import(".\AviSynth\SVPlite_Processing.avsi") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
## SVPlite Heavy (For AVC/XviD Animated Content) ## <-- suggested usage scenario. ## | ||
## SVPlite Heavy (For Anime/Mixed Content) ## <-- suggested usage scenario. ## | ||
Import(".\AviSynth\SVPlite_Environment.avsi") | ||
|
||
super_params="{pel:1,gpu:1,full:false}" | ||
analyse_params="{block:{w:32,h:32,overlap:2},main:{ | ||
search:{distance:-9 ,type:4,satd:false,sort:true, | ||
coarse:{distance:-21,type:2,satd:true,trymany:true, | ||
levels:3,width:961,bad:{range:0}}},penalty:{lambda:3.3, | ||
coarse:{distance:-21,type:4,satd:true,trymany:false, | ||
levels:4,width:961,bad:{range:0}}},penalty:{lambda:3.3, | ||
plevel:1.25,pnew:44,pglobal:104,pzero:240,pnbour:74,prev:-1}}}" | ||
smoothfps_params="{rate:{num:2,den:1},mask:{cover:99}, | ||
algo:2,cubic:1,linear:false,scene:{mode:0,blend:false, | ||
limits:{scene:2220,zero:4,blocks:42},luma:1}}" | ||
smoothfps_params="{rate:{num:75,den:1, abs:true},mask:{cover:50}, | ||
algo:2,cubic:1,linear:true,scene:{mode:1,blend:false, | ||
limits:{scene:2220,zero:4,blocks:30},luma:1}}" | ||
|
||
Import(".\AviSynth\SVPlite_Processing.avsi") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## SVPlite Heavy (For Anime/Mixed Content) ## <-- suggested usage scenario. ## | ||
Import(".\AviSynth\SVPlite_Environment.avsi") | ||
|
||
super_params="{pel:1,gpu:1,full:false}" | ||
analyse_params="{block:{w:32,h:32,overlap:0},main:{ | ||
search:{distance:-0 ,type:4,satd:false,sort:true, | ||
coarse:{distance:-21,type:4,satd:false,trymany:false, | ||
levels:4,width:961,bad:{range:0}}},penalty:{lambda:3.3, | ||
plevel:1.25,pnew:44,pglobal:104,pzero:240,pnbour:74,prev:-1}}}" | ||
smoothfps_params="{rate:{num:75,den:1, abs:true},mask:{cover:50}, | ||
algo:13,cubic:1,linear:true,scene:{mode:1,blend:false, | ||
limits:{scene:2220,zero:4,blocks:30},luma:1}}" | ||
|
||
Import(".\AviSynth\SVPlite_Processing.avsi") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## SVPlite Heavy (For Anime/Mixed Content) ## <-- suggested usage scenario. ## | ||
Import(".\AviSynth\SVPlite_Environment.avsi") | ||
|
||
super_params="{pel:1,gpu:1,full:false}" | ||
analyse_params="{block:{w:32,h:32,overlap:0},main:{ | ||
search:{distance:-9 ,type:4,satd:false,sort:true, | ||
coarse:{distance:-21,type:4,satd:false,trymany:false, | ||
levels:4,width:961,bad:{range:0}}},penalty:{lambda:3.3, | ||
plevel:1.25,pnew:44,pglobal:104,pzero:240,pnbour:74,prev:-1}}}" | ||
smoothfps_params="{rate:{num:75,den:1, abs:true},mask:{cover:50}, | ||
algo:13,cubic:1,linear:true,scene:{mode:1,blend:false, | ||
limits:{scene:2220,zero:4,blocks:30},luma:1}}" | ||
|
||
Import(".\AviSynth\SVPlite_Processing.avsi") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.