Skip to content

Commit

Permalink
Update v1.33a
Browse files Browse the repository at this point in the history
  • Loading branch information
XyLe-GBP committed Dec 25, 2022
1 parent 1b3bc7e commit 34ea85c
Show file tree
Hide file tree
Showing 11 changed files with 1,112 additions and 937 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ nihui氏開発の [waifu2x ncnn Vulkan](https://github.com/nihui/waifu2x-ncnn-vu

本アプリケーションは発行されているため、ランタイムのインストール不要で実行可能です。

※何らかの理由でポータブル版を使用する場合は、.NET ランタイムのインストールが必要です。
※何らかの理由でポータブル版を使用する場合は、.NET ランタイムのインストールが必要です。
**version 1.32以降**
[.NET Desktop Runtime 7](https://dotnet.microsoft.com/download/dotnet/7.0)
[.NET Desktop Runtime 7](https://dotnet.microsoft.com/download/dotnet/7.0)

**version 1.32以前**
[.NET Desktop Runtime 6](https://dotnet.microsoft.com/download/dotnet/6.0)
[.NET Desktop Runtime 6](https://dotnet.microsoft.com/download/dotnet/6.0)

**version 1.22以前**
[.NET Desktop Runtime 5](https://dotnet.microsoft.com/download/dotnet/5.0)
[.NET Desktop Runtime 5](https://dotnet.microsoft.com/download/dotnet/5.0)

まだインストールを行っていない場合、上記からランタイムをダウンロードし、PCにインストールしてください。

Expand Down
2 changes: 1 addition & 1 deletion VERSIONINFO
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version:1.33.2220.1218
version:1.33.2220.1225
102 changes: 102 additions & 0 deletions src/Common.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using ImageMagick;
using Microsoft.Win32;
using NVGE.Localization;
using OpenCvSharp;
using System;
Expand Down Expand Up @@ -111,13 +112,26 @@ class Common
public static Stopwatch stopwatch = null;
public static TimeSpan timeSpan;

/// <summary>
/// ポータブル版か否か
/// </summary>
public static bool ApplicationPortable = false;
/// <summary>
/// GitHubのバージョン
/// </summary>
public static string GitHubLatestVersion;

/// <summary>
/// ログ
/// </summary>
public static StreamReader Log = null;

/// <summary>
/// GPU
/// </summary>
public static List<string> GPUList = new();
public static List<long> GPURAMList = new();

#endregion

public static string CheckVideoAudioCodec(string VideoPath)
Expand Down Expand Up @@ -1243,6 +1257,94 @@ public static List<string> GetGraphicsCardsInformation()
}
}

public class VRAMInfo
{
public string[] Name { get; set; }
public long[] VRAM { get; set; }

public VRAMInfo(string[] Name, long[] VRAM)
{
this.Name = Name;
this.VRAM = VRAM;
}
}

class VRAM
{
public VRAMInfo GetdGPUInfo()
{
string[] nm = new string[GetCount()];
long[] rm = new long[GetCount()];
RegistryKey rKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}");
int count = 0;
foreach (string kn in rKey.GetSubKeyNames())
{
if (kn.Contains("0"))
{
RegistryKey vk = Registry.LocalMachine.OpenSubKey(@"SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\" + kn);
foreach (string skn in vk.GetValueNames())
{
if (skn.Contains("DriverDesc"))
{
nm[count] = (string)vk.GetValue("DriverDesc") + " - " + (string)vk.GetValue("DriverVersion");
}
else if (skn.Contains("HardwareInformation.qwMemorySize"))
{
rm[count] = (long)vk.GetValue("HardwareInformation.qwMemorySize") / 1048576;

}
else if (skn.Contains("HardwareInformation.MemorySize"))
{
if (rm[count] == 0)
{
try
{
rm[count] = (long)vk.GetValue("HardwareInformation.MemorySize");
}
catch (Exception ex)
{
rm[count] = 0;
}
}
}
else
{
}
}
vk.Close();
count++;
continue;
}
else
{
continue;
}
}
rKey.Close();
VRAMInfo vi = new(nm, rm);
return vi;
}

public int GetCount()
{
int count = 0;
RegistryKey rKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}");
foreach (string kn in rKey.GetSubKeyNames())
{
if (kn.Contains("0"))
{
count++;
continue;
}
else
{
continue;
}
}
return count;
}
}

class Config
{
/// <summary>
Expand Down
69 changes: 54 additions & 15 deletions src/Forms/FormImageUpscaleSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,80 @@ private void FormImageUpscaleSettings_Load(object sender, EventArgs e)
{
if (GPU.Contains("Intel"))
{
if (GPU.Contains("HD Graphics"))
if (GPU.Contains("HD"))
{
comboBox_GPU.Items.Add("iGPU [ " + GPU + " ]");
comboBox_GPU.Items.Add("iGPU [(Intel) " + GPU + " ]");
}
if (GPU.Contains("Iris"))
else if (GPU.Contains("Iris"))
{
comboBox_GPU.Items.Add("iGPU [ " + GPU + " ]");
comboBox_GPU.Items.Add("iGPU [(Intel) " + GPU + " ]");
}
if (GPU.Contains("Xe Graphics"))
else if (GPU.Contains("Xe"))
{
comboBox_GPU.Items.Add("iGPU [ " + GPU + " ]");
comboBox_GPU.Items.Add("iGPU [(Intel) " + GPU + " ]");
}
else if (GPU.Contains("Mobile"))
{
comboBox_GPU.Items.Add("iGPU [(Intel) " + GPU + " ]");
}
else if (GPU.Contains("Arc"))
{
comboBox_GPU.Items.Add("dGPU [(Intel) " + GPU + " ]");
}
else
{
comboBox_GPU.Items.Add("dGPU [(Intel) " + GPU + " ]");
}
}
else if (GPU.Contains("Radeon"))
{
if (GPU.Contains("Vega 11"))
if (GPU.Contains("with"))
{
comboBox_GPU.Items.Add("iGPU [(AMD) " + GPU + " ]");
}
else if (GPU.Contains("Vega 11"))
{
comboBox_GPU.Items.Add("iGPU [ " + GPU + " ]");
comboBox_GPU.Items.Add("iGPU [(AMD) " + GPU + " ]");
}
if (GPU.Contains("Vega 8"))
else if (GPU.Contains("Vega 8"))
{
comboBox_GPU.Items.Add("iGPU [ " + GPU + " ]");
comboBox_GPU.Items.Add("iGPU [(AMD) " + GPU + " ]");
}
if (GPU.Contains("Vega 7"))
else if (GPU.Contains("Vega 7"))
{
comboBox_GPU.Items.Add("iGPU [ " + GPU + " ]");
comboBox_GPU.Items.Add("iGPU [(AMD) " + GPU + " ]");
}
if (GPU.Contains("Vega 6"))
else if (GPU.Contains("Vega 6"))
{
comboBox_GPU.Items.Add("iGPU [(AMD) " + GPU + " ]");
}
else if (GPU.Contains("Vega 3"))
{
comboBox_GPU.Items.Add("iGPU [(AMD) " + GPU + " ]");
}
else if (GPU.Contains("Mobile"))
{
comboBox_GPU.Items.Add("iGPU [(AMD) " + GPU + " ]");
}
else
{
comboBox_GPU.Items.Add("dGPU [(AMD) " + GPU + " ]");
}
}
else if (GPU.Contains("NVIDIA"))
{
if (GPU.Contains("Max-Q"))
{
comboBox_GPU.Items.Add("dGPU [(NVIDIA) " + GPU + " (Laptop) ]");
}
else
{
comboBox_GPU.Items.Add("iGPU [ " + GPU + " ]");
comboBox_GPU.Items.Add("dGPU [(NVIDIA) " + GPU + " ]");
}
}
else
{
comboBox_GPU.Items.Add("dGPU [ " + GPU + " ]");
comboBox_GPU.Items.Add("Unknown GPU [ " + GPU + " ]");
}
}
comboBox_GPU.Items.Add(Strings.SelectGPUAutoCaption);
Expand Down
72 changes: 14 additions & 58 deletions src/Forms/FormImageUpscaleSettings.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -57,86 +57,42 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="label8.ToolTip" xml:space="preserve">
<value />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label8.Location" type="System.Drawing.Point, System.Drawing">
<value>145, 102</value>
</data>
<data name="textBox_Blocksize.Location" type="System.Drawing.Point, System.Drawing">
<value>99, 99</value>
</data>
<data name="textBox_Blocksize.ToolTip" xml:space="preserve">
<value>Specifies the block size to be allocated to the GPU.
If '0' is specified, the block size is automatically allocated.
The larger the value, the faster the conversion will be, but the more memory the GPU will use.
This item depends on the GPU performance. If the value is too large, the conversion will fail.</value>
</data>
<data name="label4.ToolTip" xml:space="preserve">
<value />
</data>
<data name="label3.ToolTip" xml:space="preserve">
<value />
</data>
<data name="label2.ToolTip" xml:space="preserve">
<value />
<data name="comboBox_GPU.Size" type="System.Drawing.Size, System.Drawing">
<value>427, 23</value>
</data>
<data name="label1.ToolTip" xml:space="preserve">
<value />
</data>
<data name="label11.ToolTip" xml:space="preserve">
<value />
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 102</value>
</data>
<data name="textBox_height.ToolTip" xml:space="preserve">
<value />
</data>
<data name="label10.ToolTip" xml:space="preserve">
<value />
</data>
<data name="textBox_width.ToolTip" xml:space="preserve">
<value />
</data>
<data name="checkBox_pixel.ToolTip" xml:space="preserve">
<value />
</data>
<data name="label9.ToolTip" xml:space="preserve">
<value />
</data>
<data name="checkBox_TTA.ToolTip" xml:space="preserve">
<value>Enables the TTA mode.
Enabling this will improve the image index, but will take a huge amount of time for image conversion.</value>
</data>
<data name="label7.ToolTip" xml:space="preserve">
<value />
</data>
<data name="label6.ToolTip" xml:space="preserve">
<value />
</data>
<data name="label5.ToolTip" xml:space="preserve">
<value />
</data>
<data name="label12.ToolTip" xml:space="preserve">
<value />
</data>
<data name="button_OK.ToolTip" xml:space="preserve">
<value />
</data>
<data name="button_Cancel.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabControl1.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabPage1.ToolTip" xml:space="preserve">
<value />
<data name="comboBox_syncgap.Location" type="System.Drawing.Point, System.Drawing">
<value>106, 129</value>
</data>
<data name="comboBox_syncgap.ToolTip" xml:space="preserve">
<value />
</data>
<data name="label14.ToolTip" xml:space="preserve">
<value />
</data>
<data name="label13.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabPage2.ToolTip" xml:space="preserve">
<value />
</data>
<data name="$this.ToolTip" xml:space="preserve">
<value />
<data name="label14.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 132</value>
</data>
</root>
3 changes: 3 additions & 0 deletions src/Forms/FormImageUpscaleSettings.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@
<data name="comboBox_GPU.Location" type="System.Drawing.Point, System.Drawing">
<value>117, 67</value>
</data>
<data name="comboBox_GPU.Size" type="System.Drawing.Size, System.Drawing">
<value>377, 23</value>
</data>
<data name="comboBox_GPU.ToolTip" xml:space="preserve">
<value>変換時に使用するGPUを指定します。
'自動'を指定すると、変換時に自動的に使用するGPUを決定します。
Expand Down
Loading

0 comments on commit 34ea85c

Please sign in to comment.