Fixed NCNN progress bar bug, removed DAIN/CAIN code

This commit is contained in:
N00MKRAD
2021-01-13 22:50:34 +01:00
parent 561aca4eee
commit 8d2aa66cf7
5 changed files with 22 additions and 113 deletions

View File

@@ -92,5 +92,17 @@ namespace Flowframes
scaledResolution = InterpolateUtils.GetOutputResolution(inputResolution, false);
}
}
public int GetTargetFrameCount(string overrideInputDir = "", int overrideFactor = -1)
{
if (framesFolder == null || !Directory.Exists(framesFolder))
return 0;
string framesDir = (!string.IsNullOrWhiteSpace(overrideInputDir)) ? overrideInputDir : framesFolder;
int frames = IOUtils.GetAmountOfFiles(framesDir, false, "*.png");
int factor = (overrideFactor > 0) ? overrideFactor : interpFactor;
int targetFrameCount = (frames * factor) - (interpFactor - 1);
return targetFrameCount;
}
}
}