mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Remove ToStringDot, no longer needed with forced CultureInfo
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Flowframes.IO
|
|||||||
|
|
||||||
public static string GetFrameOrderFilename(float factor)
|
public static string GetFrameOrderFilename(float factor)
|
||||||
{
|
{
|
||||||
return $"{frameOrderPrefix}-{factor.ToStringDot()}x.ini";
|
return $"{frameOrderPrefix}-{factor.ToString()}x.ini";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetFrameOrderFilenameChunk (int from, int to)
|
public static string GetFrameOrderFilenameChunk (int from, int to)
|
||||||
|
|||||||
@@ -239,14 +239,6 @@ namespace Flowframes
|
|||||||
return filename + suffix + ext;
|
return filename + suffix + ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string ToStringDot(this float f, string format = "")
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(format))
|
|
||||||
return f.ToString().Replace(",", ".");
|
|
||||||
else
|
|
||||||
return f.ToString(format).Replace(",", ".");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string[] Split(this string str, string trimStr)
|
public static string[] Split(this string str, string trimStr)
|
||||||
{
|
{
|
||||||
return str?.Split(new string[] { trimStr }, StringSplitOptions.None);
|
return str?.Split(new string[] { trimStr }, StringSplitOptions.None);
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ namespace Flowframes.IO
|
|||||||
|
|
||||||
public static float GetFloat(Key key, float defaultVal)
|
public static float GetFloat(Key key, float defaultVal)
|
||||||
{
|
{
|
||||||
WriteIfDoesntExist(key.ToString(), defaultVal.ToStringDot());
|
WriteIfDoesntExist(key.ToString(), defaultVal.ToString());
|
||||||
return Get(key, Type.Float).GetFloat();
|
return Get(key, Type.Float).GetFloat();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ namespace Flowframes.IO
|
|||||||
|
|
||||||
public static float GetFloat(string key, float defaultVal)
|
public static float GetFloat(string key, float defaultVal)
|
||||||
{
|
{
|
||||||
WriteIfDoesntExist(key, defaultVal.ToStringDot());
|
WriteIfDoesntExist(key, defaultVal.ToString());
|
||||||
return Get(key, Type.Float).GetFloat();
|
return Get(key, Type.Float).GetFloat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -610,10 +610,10 @@ namespace Flowframes.IO
|
|||||||
|
|
||||||
filename = filename.Replace("[NAME]", inName);
|
filename = filename.Replace("[NAME]", inName);
|
||||||
filename = filename.Replace("[FULLNAME]", Path.GetFileName(curr.inPath));
|
filename = filename.Replace("[FULLNAME]", Path.GetFileName(curr.inPath));
|
||||||
filename = filename.Replace("[FACTOR]", curr.interpFactor.ToStringDot());
|
filename = filename.Replace("[FACTOR]", curr.interpFactor.ToString());
|
||||||
filename = filename.Replace("[AI]", curr.ai.NameShort.Upper());
|
filename = filename.Replace("[AI]", curr.ai.NameShort.Upper());
|
||||||
filename = filename.Replace("[MODEL]", curr.model.Name.Remove(" "));
|
filename = filename.Replace("[MODEL]", curr.model.Name.Remove(" "));
|
||||||
filename = filename.Replace("[FPS]", fps.ToStringDot("0.###"));
|
filename = filename.Replace("[FPS]", fps.ToString("0.###"));
|
||||||
filename = filename.Replace("[ROUNDFPS]", fps.RoundToInt().ToString());
|
filename = filename.Replace("[ROUNDFPS]", fps.RoundToInt().ToString());
|
||||||
filename = filename.Replace("[RES]", $"{outRes.Width}x{outRes.Height}");
|
filename = filename.Replace("[RES]", $"{outRes.Width}x{outRes.Height}");
|
||||||
filename = filename.Replace("[H]", $"{outRes.Height}p");
|
filename = filename.Replace("[H]", $"{outRes.Height}p");
|
||||||
|
|||||||
@@ -526,11 +526,11 @@ namespace Flowframes.Media
|
|||||||
return "";
|
return "";
|
||||||
|
|
||||||
if (itsScale > 4)
|
if (itsScale > 4)
|
||||||
return $"-af atempo=0.5,atempo=0.5,atempo={((1f / itsScale) * 4).ToStringDot()}";
|
return $"-af atempo=0.5,atempo=0.5,atempo={((1f / itsScale) * 4).ToString()}";
|
||||||
else if (itsScale > 2)
|
else if (itsScale > 2)
|
||||||
return $"-af atempo=0.5,atempo={((1f / itsScale) * 2).ToStringDot()}";
|
return $"-af atempo=0.5,atempo={((1f / itsScale) * 2).ToString()}";
|
||||||
else
|
else
|
||||||
return $"-af atempo={(1f / itsScale).ToStringDot()}";
|
return $"-af atempo={(1f / itsScale).ToString()}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetSubCodecForContainer(string containerExt)
|
public static string GetSubCodecForContainer(string containerExt)
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ namespace Flowframes.Os
|
|||||||
string uhdStr = InterpolateUtils.UseUhd() ? "--UHD" : "";
|
string uhdStr = InterpolateUtils.UseUhd() ? "--UHD" : "";
|
||||||
string wthreads = $"--wthreads {2 * (int)interpFactor}";
|
string wthreads = $"--wthreads {2 * (int)interpFactor}";
|
||||||
string rbuffer = $"--rbuffer {Config.GetInt(Config.Key.rifeCudaBufferSize, 200)}";
|
string rbuffer = $"--rbuffer {Config.GetInt(Config.Key.rifeCudaBufferSize, 200)}";
|
||||||
//string scale = $"--scale {Config.GetFloat("rifeCudaScale", 1.0f).ToStringDot()}";
|
//string scale = $"--scale {Config.GetFloat("rifeCudaScale", 1.0f).ToString()}";
|
||||||
string prec = Config.GetBool(Config.Key.rifeCudaFp16) ? "--fp16" : "";
|
string prec = Config.GetBool(Config.Key.rifeCudaFp16) ? "--fp16" : "";
|
||||||
string args = $" --input {inPath.Wrap()} --output {outDir} --model {mdl} --multi {interpFactor} {uhdStr} {wthreads} {rbuffer} {prec}";
|
string args = $" --input {inPath.Wrap()} --output {outDir} --model {mdl} --multi {interpFactor} {uhdStr} {wthreads} {rbuffer} {prec}";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user