mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Fix output FPS not using fractional factor
This commit is contained in:
@@ -204,6 +204,14 @@ namespace Flowframes.Data
|
|||||||
return new Fraction(numerator, denomenator).GetReduced();
|
return new Fraction(numerator, denomenator).GetReduced();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Fraction operator *(Fraction fract, double multi)
|
||||||
|
{
|
||||||
|
long numerator = (long)Math.Round((double)(fract.Numerator * (double)multi));
|
||||||
|
long denomenator = fract.Denominator;
|
||||||
|
|
||||||
|
return new Fraction(numerator, denomenator).GetReduced();
|
||||||
|
}
|
||||||
|
|
||||||
public static Fraction operator *(Fraction fract, float multi)
|
public static Fraction operator *(Fraction fract, float multi)
|
||||||
{
|
{
|
||||||
long numerator = (fract.Numerator * multi).RoundToInt();
|
long numerator = (fract.Numerator * multi).RoundToInt();
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace Flowframes
|
|||||||
inFpsDetected = inFpsDetectedArg;
|
inFpsDetected = inFpsDetectedArg;
|
||||||
inFps = inFpsArg;
|
inFps = inFpsArg;
|
||||||
interpFactor = interpFactorArg;
|
interpFactor = interpFactorArg;
|
||||||
outFps = inFpsArg * (long)interpFactorArg;
|
outFps = inFpsArg * (double)interpFactorArg;
|
||||||
outItsScale = itsScale;
|
outItsScale = itsScale;
|
||||||
outMode = outModeArg;
|
outMode = outModeArg;
|
||||||
model = modelArg;
|
model = modelArg;
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ namespace Flowframes
|
|||||||
public static async Task Done ()
|
public static async Task Done ()
|
||||||
{
|
{
|
||||||
await Cleanup();
|
await Cleanup();
|
||||||
Logger.Log($"after cleanup in done", true);
|
|
||||||
Program.mainForm.SetWorking(false);
|
Program.mainForm.SetWorking(false);
|
||||||
Logger.Log("Total processing time: " + FormatUtils.Time(sw.Elapsed));
|
Logger.Log("Total processing time: " + FormatUtils.Time(sw.Elapsed));
|
||||||
sw.Stop();
|
sw.Stop();
|
||||||
|
|||||||
Reference in New Issue
Block a user