mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-15 16:07:45 +01:00
Get modulo from pixel format instead of encoder
This commit is contained in:
@@ -8,7 +8,6 @@ namespace Flowframes.Data
|
||||
public Codec Codec { get; set; } = (Codec)(-1);
|
||||
public bool? Lossless { get; set; } = false; // True = Lossless Codec; False = Lossy codec with lossless option; null: Lossy with no lossless option
|
||||
public bool HwAccelerated { get; set; } = false;
|
||||
public int Modulo { get; set; } = 2;
|
||||
public int MaxFramerate { get; set; } = 1000;
|
||||
public List<PixelFormat> PixelFormats { get; set; } = new List<PixelFormat>();
|
||||
public PixelFormat PixelFormatDefault { get; set; } = (PixelFormat)(-1);
|
||||
|
||||
@@ -38,7 +38,9 @@ namespace Flowframes
|
||||
{
|
||||
if (mode == ModuloMode.ForEncoding)
|
||||
{
|
||||
return Interpolate.currentSettings.outSettings.Encoder.GetInfo().Modulo;
|
||||
string pixFmt = Interpolate.currentSettings.outSettings.PixelFormat.ToString().Lower();
|
||||
bool subsampled = pixFmt.Contains("420") || pixFmt.Contains("422") || pixFmt.Contains("p010") || pixFmt.Contains("p016");
|
||||
return subsampled ? 2 : 1;
|
||||
}
|
||||
else if (mode == ModuloMode.ForInterpolation)
|
||||
{
|
||||
|
||||
@@ -187,7 +187,6 @@ namespace Flowframes.MiscUtils
|
||||
QualityDefault = (int)Quality.GifColors.High128,
|
||||
OverideExtension = "gif",
|
||||
MaxFramerate = 50,
|
||||
Modulo = 1,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user