mirror of
https://github.com/DarthAffe/HPPH.git
synced 2026-11-09 18:36:34 +00:00
Fixed some more code issues
This commit is contained in:
1 parent
491e9d3f1c
commit
9f37a41f55
3 files changed
+6
-6
No files matched your search
@@ -56,7 +56,7 @@ public static partial class PixelHelper
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static Generic3ByteData Average(ReadOnlySpan<Generic3ByteData> data)
|
private static Generic3ByteData Average(ReadOnlySpan<Generic3ByteData> data)
|
||||||
{
|
{
|
||||||
if (data == null) throw new ArgumentNullException(nameof(data));
|
if (data == null) throw new ArgumentNullException(nameof(data));
|
||||||
if (data.Length == 0) return default;
|
if (data.Length == 0) return default;
|
||||||
@@ -70,7 +70,7 @@ public static partial class PixelHelper
|
|||||||
(byte)(sum.L3 / count));
|
(byte)(sum.L3 / count));
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static Generic4ByteData Average(ReadOnlySpan<Generic4ByteData> data)
|
private static Generic4ByteData Average(ReadOnlySpan<Generic4ByteData> data)
|
||||||
{
|
{
|
||||||
if (data == null) throw new ArgumentNullException(nameof(data));
|
if (data == null) throw new ArgumentNullException(nameof(data));
|
||||||
if (data.Length == 0) return default;
|
if (data.Length == 0) return default;
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public static unsafe partial class PixelHelper
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static Generic3ByteMinMax MinMax(ReadOnlySpan<Generic3ByteData> data)
|
private static Generic3ByteMinMax MinMax(ReadOnlySpan<Generic3ByteData> data)
|
||||||
{
|
{
|
||||||
byte minB1 = byte.MaxValue, minB2 = byte.MaxValue, minB3 = byte.MaxValue;
|
byte minB1 = byte.MaxValue, minB2 = byte.MaxValue, minB3 = byte.MaxValue;
|
||||||
byte maxB1 = byte.MinValue, maxB2 = byte.MinValue, maxB3 = byte.MinValue;
|
byte maxB1 = byte.MinValue, maxB2 = byte.MinValue, maxB3 = byte.MinValue;
|
||||||
@@ -132,7 +132,7 @@ public static unsafe partial class PixelHelper
|
|||||||
return new Generic3ByteMinMax(minB1, maxB1, minB2, maxB2, minB3, maxB3);
|
return new Generic3ByteMinMax(minB1, maxB1, minB2, maxB2, minB3, maxB3);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static Generic4ByteMinMax MinMax(ReadOnlySpan<Generic4ByteData> data)
|
private static Generic4ByteMinMax MinMax(ReadOnlySpan<Generic4ByteData> data)
|
||||||
{
|
{
|
||||||
byte minB1 = byte.MaxValue, minB2 = byte.MaxValue, minB3 = byte.MaxValue, minB4 = byte.MaxValue;
|
byte minB1 = byte.MaxValue, minB2 = byte.MaxValue, minB3 = byte.MaxValue, minB4 = byte.MaxValue;
|
||||||
byte maxB1 = byte.MinValue, maxB2 = byte.MinValue, maxB3 = byte.MinValue, maxB4 = byte.MinValue;
|
byte maxB1 = byte.MinValue, maxB2 = byte.MinValue, maxB3 = byte.MinValue, maxB4 = byte.MinValue;
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public static unsafe partial class PixelHelper
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static Generic4LongData Sum(ReadOnlySpan<Generic3ByteData> data)
|
private static Generic4LongData Sum(ReadOnlySpan<Generic3ByteData> data)
|
||||||
{
|
{
|
||||||
long b1Sum = 0, b2Sum = 0, b3Sum = 0;
|
long b1Sum = 0, b2Sum = 0, b3Sum = 0;
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ public static unsafe partial class PixelHelper
|
|||||||
return new Generic4LongData(b1Sum, b2Sum, b3Sum, data.Length * 255);
|
return new Generic4LongData(b1Sum, b2Sum, b3Sum, data.Length * 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static Generic4LongData Sum(ReadOnlySpan<Generic4ByteData> data)
|
private static Generic4LongData Sum(ReadOnlySpan<Generic4ByteData> data)
|
||||||
{
|
{
|
||||||
long b1Sum, b2Sum, b3Sum, b4Sum;
|
long b1Sum, b2Sum, b3Sum, b4Sum;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|||||||
Reference in new issue
Block a user