Browse Source

Merge pull request #1777 from SixLabors/js/v2-builds

Update Infrastructure Files and Base Build Number for V2
pull/1779/head
James Jackson-South 5 years ago
committed by GitHub
parent
commit
424d4f9435
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .gitignore
  2. 2
      shared-infrastructure
  3. 1
      src/ImageSharp/Advanced/ParallelExecutionSettings.cs
  4. 1
      src/ImageSharp/Color/Color.Conversions.cs
  5. 1
      src/ImageSharp/Color/Color.cs
  6. 2
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.HunterLab.cs
  7. 2
      src/ImageSharp/Common/Helpers/SimdUtils.Pack.cs
  8. 170
      src/ImageSharp/Compression/Zlib/Adler32.cs
  9. 180
      src/ImageSharp/Compression/Zlib/Crc32.cs
  10. 1
      src/ImageSharp/Formats/Gif/GifDecoderCore.cs
  11. 1
      src/ImageSharp/Formats/Gif/LzwEncoder.cs
  12. 1
      src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegComponent.cs
  13. 1
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/DeflateTiffCompression.cs
  14. 1
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/ModifiedHuffmanTiffCompression.cs
  15. 1
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/NoneTiffCompression.cs
  16. 1
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/PackBitsTiffCompression.cs
  17. 1
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/T4TiffCompression.cs
  18. 1
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/T6BitReader.cs
  19. 1
      src/ImageSharp/Formats/Tiff/Compression/TiffBaseDecompressor.cs
  20. 1
      src/ImageSharp/Formats/Tiff/Ifd/EntryReader.cs
  21. 1
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero1TiffColor{TPixel}.cs
  22. 1
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero4TiffColor{TPixel}.cs
  23. 1
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/Rgb444TiffColor{TPixel}.cs
  24. 1
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero1TiffColor{TPixel}.cs
  25. 1
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero4TiffColor{TPixel}.cs
  26. 1
      src/ImageSharp/Formats/Tiff/TiffEncoder.cs
  27. 1
      src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs
  28. 1
      src/ImageSharp/Formats/Tiff/TiffFormat.cs
  29. 1
      src/ImageSharp/Formats/Tiff/Writers/TiffBiColorWriter{TPixel}.cs
  30. 1
      src/ImageSharp/Formats/Tiff/Writers/TiffPaletteWriter{TPixel}.cs
  31. 2
      src/ImageSharp/Image.Decode.cs
  32. 8
      src/ImageSharp/Image.FromStream.cs
  33. 1
      src/ImageSharp/Image.WrapMemory.cs
  34. 1
      src/ImageSharp/ImageFrameCollection{TPixel}.cs
  35. 5
      src/ImageSharp/ImageSharp.csproj
  36. 4
      src/ImageSharp/Memory/TransformItemsDelegate{TSource, TTarget}.cs
  37. 1
      src/ImageSharp/Metadata/Profiles/Exif/ExifProfile.cs
  38. 1
      src/ImageSharp/PixelFormats/PixelConversionModifiers.cs
  39. 1
      src/ImageSharp/PixelFormats/Utils/Vector4Converters.cs
  40. 1
      src/ImageSharp/Processing/Extensions/ProcessingExtensions.cs
  41. 1
      src/ImageSharp/Processing/Extensions/Transforms/TransformExtensions.cs
  42. 1
      src/ImageSharp/Processing/Processors/Binarization/AdaptiveThresholdProcessor{TPixel}.cs
  43. 24
      src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationProcessor{TPixel}.cs
  44. 1
      src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationSlidingWindowProcessor{TPixel}.cs
  45. 1
      src/ImageSharp/Processing/Processors/Normalization/HistogramEqualizationProcessor{TPixel}.cs
  46. 1
      src/ImageSharp/Processing/Processors/Transforms/Linear/AutoOrientProcessor{TPixel}.cs
  47. 14
      src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeHelper.cs
  48. 2
      tests/ImageSharp.Benchmarks/Codecs/DecodeTiff.cs
  49. 1
      tests/ImageSharp.Benchmarks/Codecs/EncodeTiff.cs
  50. 43
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_CopyTo1x1.cs
  51. 1
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_CopyTo2x2.cs
  52. 1
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_DivideRound.cs
  53. 1
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_LoadFromInt16.cs
  54. 2
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_Round.cs
  55. 2
      tests/ImageSharp.Benchmarks/Color/Bulk/FromVector4.cs
  56. 1
      tests/ImageSharp.Benchmarks/Color/Bulk/ToVector4_Rgba32.cs
  57. 1
      tests/ImageSharp.Benchmarks/Color/RgbToYCbCr.cs
  58. 1
      tests/ImageSharp.Benchmarks/General/Array2D.cs
  59. 1
      tests/ImageSharp.Benchmarks/General/ArrayReverse.cs
  60. 1
      tests/ImageSharp.Benchmarks/General/BasicMath/Abs.cs
  61. 1
      tests/ImageSharp.Benchmarks/General/BasicMath/ClampFloat.cs
  62. 1
      tests/ImageSharp.Benchmarks/General/BasicMath/ClampInt32IntoByte.cs
  63. 1
      tests/ImageSharp.Benchmarks/General/BasicMath/ClampVector4.cs
  64. 1
      tests/ImageSharp.Benchmarks/General/BasicMath/Pow.cs
  65. 1
      tests/ImageSharp.Benchmarks/General/CopyBuffers.cs
  66. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/ITestPixel.cs
  67. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertFromRgba32.cs
  68. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertFromVector4.cs
  69. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToRgba32.cs
  70. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToRgba32_AsPartOfCompositeOperation.cs
  71. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToVector4.cs
  72. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToVector4_AsPartOfCompositeOperation.cs
  73. 22
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_PackFromRgbPlanes.cs
  74. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_Rgba32_To_Argb32.cs
  75. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_Rgba32_To_Bgra32.cs
  76. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/TestArgb.cs
  77. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/TestRgba.cs
  78. 1
      tests/ImageSharp.Benchmarks/General/Vector4Constants.cs
  79. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/BitwiseOrUint32.cs
  80. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/DivFloat.cs
  81. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/DivUInt32.cs
  82. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/Divide.cs
  83. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/MulFloat.cs
  84. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/MulUInt32.cs
  85. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/ReinterpretUInt32AsFloat.cs
  86. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/SIMDBenchmarkBase.cs
  87. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/UInt32ToSingle.cs
  88. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/WidenBytesToUInt32.cs
  89. 28
      tests/ImageSharp.Benchmarks/LoadResizeSave/LoadResizeSaveStressRunner.cs
  90. 4
      tests/ImageSharp.Tests.ProfilingSandbox/LoadResizeSaveParallelMemoryStress.cs
  91. 3
      tests/ImageSharp.Tests.ProfilingSandbox/Program.cs
  92. 1
      tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs
  93. 2
      tests/ImageSharp.Tests/Formats/Bmp/BmpEncoderTests.cs
  94. 2
      tests/ImageSharp.Tests/Formats/Bmp/BmpMetadataTests.cs
  95. 1
      tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs
  96. 1
      tests/ImageSharp.Tests/Formats/Gif/GifMetadataTests.cs
  97. 1
      tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs
  98. 1
      tests/ImageSharp.Tests/Formats/Jpg/GenericBlock8x8Tests.cs
  99. 1
      tests/ImageSharp.Tests/Formats/Jpg/JpegColorConverterTests.cs
  100. 1
      tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Metadata.cs

4
.gitignore

@ -223,3 +223,7 @@ artifacts/
**/Images/ReferenceOutput **/Images/ReferenceOutput
**/Images/Input/MemoryStress **/Images/Input/MemoryStress
.DS_Store .DS_Store
#lfs
hooks/**
lfs/**

2
shared-infrastructure

@ -1 +1 @@
Subproject commit f48ab829167c42c69242ed0d303683232fbfccd1 Subproject commit a042aba176cdb840d800c6ed4cfe41a54fb7b1e3

1
src/ImageSharp/Advanced/ParallelExecutionSettings.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Advanced namespace SixLabors.ImageSharp.Advanced

1
src/ImageSharp/Color/Color.Conversions.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp namespace SixLabors.ImageSharp

1
src/ImageSharp/Color/Color.cs

@ -5,7 +5,6 @@ using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp namespace SixLabors.ImageSharp

2
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.HunterLab.cs

@ -1,4 +1,4 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;

2
src/ImageSharp/Common/Helpers/SimdUtils.Pack.cs

@ -5,9 +5,7 @@ using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
#if SUPPORTS_RUNTIME_INTRINSICS #if SUPPORTS_RUNTIME_INTRINSICS
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.X86;
#endif #endif

170
src/ImageSharp/Compression/Zlib/Adler32.cs

@ -91,115 +91,117 @@ namespace SixLabors.ImageSharp.Compression.Zlib
int index = 0; int index = 0;
fixed (byte* bufferPtr = buffer) fixed (byte* bufferPtr = buffer)
fixed (byte* tapPtr = Tap1Tap2)
{ {
index += (int)blocks * BLOCK_SIZE; fixed (byte* tapPtr = Tap1Tap2)
var localBufferPtr = bufferPtr;
// _mm_setr_epi8 on x86
Vector128<sbyte> tap1 = Sse2.LoadVector128((sbyte*)tapPtr);
Vector128<sbyte> tap2 = Sse2.LoadVector128((sbyte*)(tapPtr + 0x10));
Vector128<byte> zero = Vector128<byte>.Zero;
var ones = Vector128.Create((short)1);
while (blocks > 0)
{ {
uint n = NMAX / BLOCK_SIZE; /* The NMAX constraint. */ index += (int)blocks * BLOCK_SIZE;
if (n > blocks) var localBufferPtr = bufferPtr;
{
n = blocks;
}
blocks -= n; // _mm_setr_epi8 on x86
Vector128<sbyte> tap1 = Sse2.LoadVector128((sbyte*)tapPtr);
Vector128<sbyte> tap2 = Sse2.LoadVector128((sbyte*)(tapPtr + 0x10));
Vector128<byte> zero = Vector128<byte>.Zero;
var ones = Vector128.Create((short)1);
// Process n blocks of data. At most NMAX data bytes can be while (blocks > 0)
// processed before s2 must be reduced modulo BASE.
Vector128<uint> v_ps = Vector128.CreateScalar(s1 * n);
Vector128<uint> v_s2 = Vector128.CreateScalar(s2);
Vector128<uint> v_s1 = Vector128<uint>.Zero;
do
{ {
// Load 32 input bytes. uint n = NMAX / BLOCK_SIZE; /* The NMAX constraint. */
Vector128<byte> bytes1 = Sse3.LoadDquVector128(localBufferPtr); if (n > blocks)
Vector128<byte> bytes2 = Sse3.LoadDquVector128(localBufferPtr + 0x10); {
n = blocks;
}
// Add previous block byte sum to v_ps. blocks -= n;
v_ps = Sse2.Add(v_ps, v_s1);
// Horizontally add the bytes for s1, multiply-adds the // Process n blocks of data. At most NMAX data bytes can be
// bytes by [ 32, 31, 30, ... ] for s2. // processed before s2 must be reduced modulo BASE.
v_s1 = Sse2.Add(v_s1, Sse2.SumAbsoluteDifferences(bytes1, zero).AsUInt32()); Vector128<uint> v_ps = Vector128.CreateScalar(s1 * n);
Vector128<short> mad1 = Ssse3.MultiplyAddAdjacent(bytes1, tap1); Vector128<uint> v_s2 = Vector128.CreateScalar(s2);
v_s2 = Sse2.Add(v_s2, Sse2.MultiplyAddAdjacent(mad1, ones).AsUInt32()); Vector128<uint> v_s1 = Vector128<uint>.Zero;
v_s1 = Sse2.Add(v_s1, Sse2.SumAbsoluteDifferences(bytes2, zero).AsUInt32()); do
Vector128<short> mad2 = Ssse3.MultiplyAddAdjacent(bytes2, tap2); {
v_s2 = Sse2.Add(v_s2, Sse2.MultiplyAddAdjacent(mad2, ones).AsUInt32()); // Load 32 input bytes.
Vector128<byte> bytes1 = Sse3.LoadDquVector128(localBufferPtr);
Vector128<byte> bytes2 = Sse3.LoadDquVector128(localBufferPtr + 0x10);
localBufferPtr += BLOCK_SIZE; // Add previous block byte sum to v_ps.
} v_ps = Sse2.Add(v_ps, v_s1);
while (--n > 0);
v_s2 = Sse2.Add(v_s2, Sse2.ShiftLeftLogical(v_ps, 5)); // Horizontally add the bytes for s1, multiply-adds the
// bytes by [ 32, 31, 30, ... ] for s2.
v_s1 = Sse2.Add(v_s1, Sse2.SumAbsoluteDifferences(bytes1, zero).AsUInt32());
Vector128<short> mad1 = Ssse3.MultiplyAddAdjacent(bytes1, tap1);
v_s2 = Sse2.Add(v_s2, Sse2.MultiplyAddAdjacent(mad1, ones).AsUInt32());
// Sum epi32 ints v_s1(s2) and accumulate in s1(s2). v_s1 = Sse2.Add(v_s1, Sse2.SumAbsoluteDifferences(bytes2, zero).AsUInt32());
const byte S2301 = 0b1011_0001; // A B C D -> B A D C Vector128<short> mad2 = Ssse3.MultiplyAddAdjacent(bytes2, tap2);
const byte S1032 = 0b0100_1110; // A B C D -> C D A B v_s2 = Sse2.Add(v_s2, Sse2.MultiplyAddAdjacent(mad2, ones).AsUInt32());
v_s1 = Sse2.Add(v_s1, Sse2.Shuffle(v_s1, S1032)); localBufferPtr += BLOCK_SIZE;
}
while (--n > 0);
s1 += v_s1.ToScalar(); v_s2 = Sse2.Add(v_s2, Sse2.ShiftLeftLogical(v_ps, 5));
v_s2 = Sse2.Add(v_s2, Sse2.Shuffle(v_s2, S2301)); // Sum epi32 ints v_s1(s2) and accumulate in s1(s2).
v_s2 = Sse2.Add(v_s2, Sse2.Shuffle(v_s2, S1032)); const byte S2301 = 0b1011_0001; // A B C D -> B A D C
const byte S1032 = 0b0100_1110; // A B C D -> C D A B
s2 = v_s2.ToScalar(); v_s1 = Sse2.Add(v_s1, Sse2.Shuffle(v_s1, S1032));
// Reduce. s1 += v_s1.ToScalar();
s1 %= BASE;
s2 %= BASE;
}
if (length > 0) v_s2 = Sse2.Add(v_s2, Sse2.Shuffle(v_s2, S2301));
{ v_s2 = Sse2.Add(v_s2, Sse2.Shuffle(v_s2, S1032));
if (length >= 16)
{
s2 += s1 += localBufferPtr[0];
s2 += s1 += localBufferPtr[1];
s2 += s1 += localBufferPtr[2];
s2 += s1 += localBufferPtr[3];
s2 += s1 += localBufferPtr[4];
s2 += s1 += localBufferPtr[5];
s2 += s1 += localBufferPtr[6];
s2 += s1 += localBufferPtr[7];
s2 += s1 += localBufferPtr[8];
s2 += s1 += localBufferPtr[9];
s2 += s1 += localBufferPtr[10];
s2 += s1 += localBufferPtr[11];
s2 += s1 += localBufferPtr[12];
s2 += s1 += localBufferPtr[13];
s2 += s1 += localBufferPtr[14];
s2 += s1 += localBufferPtr[15];
localBufferPtr += 16; s2 = v_s2.ToScalar();
length -= 16;
}
while (length-- > 0) // Reduce.
{ s1 %= BASE;
s2 += s1 += *localBufferPtr++; s2 %= BASE;
} }
if (s1 >= BASE) if (length > 0)
{ {
s1 -= BASE; if (length >= 16)
{
s2 += s1 += localBufferPtr[0];
s2 += s1 += localBufferPtr[1];
s2 += s1 += localBufferPtr[2];
s2 += s1 += localBufferPtr[3];
s2 += s1 += localBufferPtr[4];
s2 += s1 += localBufferPtr[5];
s2 += s1 += localBufferPtr[6];
s2 += s1 += localBufferPtr[7];
s2 += s1 += localBufferPtr[8];
s2 += s1 += localBufferPtr[9];
s2 += s1 += localBufferPtr[10];
s2 += s1 += localBufferPtr[11];
s2 += s1 += localBufferPtr[12];
s2 += s1 += localBufferPtr[13];
s2 += s1 += localBufferPtr[14];
s2 += s1 += localBufferPtr[15];
localBufferPtr += 16;
length -= 16;
}
while (length-- > 0)
{
s2 += s1 += *localBufferPtr++;
}
if (s1 >= BASE)
{
s1 -= BASE;
}
s2 %= BASE;
} }
s2 %= BASE; return s1 | (s2 << 16);
} }
return s1 | (s2 << 16);
} }
} }
#endif #endif

180
src/ImageSharp/Compression/Zlib/Crc32.cs

@ -83,117 +83,119 @@ namespace SixLabors.ImageSharp.Compression.Zlib
int length = chunksize; int length = chunksize;
fixed (byte* bufferPtr = buffer) fixed (byte* bufferPtr = buffer)
fixed (ulong* k05PolyPtr = K05Poly)
{ {
byte* localBufferPtr = bufferPtr; fixed (ulong* k05PolyPtr = K05Poly)
ulong* localK05PolyPtr = k05PolyPtr;
// There's at least one block of 64.
Vector128<ulong> x1 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x00));
Vector128<ulong> x2 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x10));
Vector128<ulong> x3 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x20));
Vector128<ulong> x4 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x30));
Vector128<ulong> x5;
x1 = Sse2.Xor(x1, Sse2.ConvertScalarToVector128UInt32(crc).AsUInt64());
// k1, k2
Vector128<ulong> x0 = Sse2.LoadVector128(localK05PolyPtr + 0x0);
localBufferPtr += 64;
length -= 64;
// Parallel fold blocks of 64, if any.
while (length >= 64)
{ {
x5 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x00); byte* localBufferPtr = bufferPtr;
Vector128<ulong> x6 = Pclmulqdq.CarrylessMultiply(x2, x0, 0x00); ulong* localK05PolyPtr = k05PolyPtr;
Vector128<ulong> x7 = Pclmulqdq.CarrylessMultiply(x3, x0, 0x00);
Vector128<ulong> x8 = Pclmulqdq.CarrylessMultiply(x4, x0, 0x00);
x1 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x11);
x2 = Pclmulqdq.CarrylessMultiply(x2, x0, 0x11);
x3 = Pclmulqdq.CarrylessMultiply(x3, x0, 0x11);
x4 = Pclmulqdq.CarrylessMultiply(x4, x0, 0x11);
Vector128<ulong> y5 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x00)); // There's at least one block of 64.
Vector128<ulong> y6 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x10)); Vector128<ulong> x1 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x00));
Vector128<ulong> y7 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x20)); Vector128<ulong> x2 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x10));
Vector128<ulong> y8 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x30)); Vector128<ulong> x3 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x20));
Vector128<ulong> x4 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x30));
Vector128<ulong> x5;
x1 = Sse2.Xor(x1, x5); x1 = Sse2.Xor(x1, Sse2.ConvertScalarToVector128UInt32(crc).AsUInt64());
x2 = Sse2.Xor(x2, x6);
x3 = Sse2.Xor(x3, x7);
x4 = Sse2.Xor(x4, x8);
x1 = Sse2.Xor(x1, y5); // k1, k2
x2 = Sse2.Xor(x2, y6); Vector128<ulong> x0 = Sse2.LoadVector128(localK05PolyPtr + 0x0);
x3 = Sse2.Xor(x3, y7);
x4 = Sse2.Xor(x4, y8);
localBufferPtr += 64; localBufferPtr += 64;
length -= 64; length -= 64;
}
// Fold into 128-bits.
// k3, k4
x0 = Sse2.LoadVector128(k05PolyPtr + 0x2);
x5 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x00); // Parallel fold blocks of 64, if any.
x1 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x11); while (length >= 64)
x1 = Sse2.Xor(x1, x2); {
x1 = Sse2.Xor(x1, x5); x5 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x00);
Vector128<ulong> x6 = Pclmulqdq.CarrylessMultiply(x2, x0, 0x00);
Vector128<ulong> x7 = Pclmulqdq.CarrylessMultiply(x3, x0, 0x00);
Vector128<ulong> x8 = Pclmulqdq.CarrylessMultiply(x4, x0, 0x00);
x1 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x11);
x2 = Pclmulqdq.CarrylessMultiply(x2, x0, 0x11);
x3 = Pclmulqdq.CarrylessMultiply(x3, x0, 0x11);
x4 = Pclmulqdq.CarrylessMultiply(x4, x0, 0x11);
Vector128<ulong> y5 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x00));
Vector128<ulong> y6 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x10));
Vector128<ulong> y7 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x20));
Vector128<ulong> y8 = Sse2.LoadVector128((ulong*)(localBufferPtr + 0x30));
x1 = Sse2.Xor(x1, x5);
x2 = Sse2.Xor(x2, x6);
x3 = Sse2.Xor(x3, x7);
x4 = Sse2.Xor(x4, x8);
x1 = Sse2.Xor(x1, y5);
x2 = Sse2.Xor(x2, y6);
x3 = Sse2.Xor(x3, y7);
x4 = Sse2.Xor(x4, y8);
localBufferPtr += 64;
length -= 64;
}
// Fold into 128-bits.
// k3, k4
x0 = Sse2.LoadVector128(k05PolyPtr + 0x2);
x5 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x00); x5 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x00);
x1 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x11); x1 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x11);
x1 = Sse2.Xor(x1, x3); x1 = Sse2.Xor(x1, x2);
x1 = Sse2.Xor(x1, x5); x1 = Sse2.Xor(x1, x5);
x5 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x00);
x1 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x11);
x1 = Sse2.Xor(x1, x4);
x1 = Sse2.Xor(x1, x5);
// Single fold blocks of 16, if any. x5 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x00);
while (length >= 16) x1 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x11);
{ x1 = Sse2.Xor(x1, x3);
x2 = Sse2.LoadVector128((ulong*)localBufferPtr); x1 = Sse2.Xor(x1, x5);
x5 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x00); x5 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x00);
x1 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x11); x1 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x11);
x1 = Sse2.Xor(x1, x2); x1 = Sse2.Xor(x1, x4);
x1 = Sse2.Xor(x1, x5); x1 = Sse2.Xor(x1, x5);
localBufferPtr += 16; // Single fold blocks of 16, if any.
length -= 16; while (length >= 16)
} {
x2 = Sse2.LoadVector128((ulong*)localBufferPtr);
x5 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x00);
x1 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x11);
x1 = Sse2.Xor(x1, x2);
x1 = Sse2.Xor(x1, x5);
// Fold 128 - bits to 64 - bits. localBufferPtr += 16;
x2 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x10); length -= 16;
x3 = Vector128.Create(~0, 0, ~0, 0).AsUInt64(); // _mm_setr_epi32 on x86 }
x1 = Sse2.ShiftRightLogical128BitLane(x1, 8);
x1 = Sse2.Xor(x1, x2);
// k5, k0 // Fold 128 - bits to 64 - bits.
x0 = Sse2.LoadScalarVector128(localK05PolyPtr + 0x4); x2 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x10);
x3 = Vector128.Create(~0, 0, ~0, 0).AsUInt64(); // _mm_setr_epi32 on x86
x1 = Sse2.ShiftRightLogical128BitLane(x1, 8);
x1 = Sse2.Xor(x1, x2);
x2 = Sse2.ShiftRightLogical128BitLane(x1, 4); // k5, k0
x1 = Sse2.And(x1, x3); x0 = Sse2.LoadScalarVector128(localK05PolyPtr + 0x4);
x1 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x00);
x1 = Sse2.Xor(x1, x2);
// Barret reduce to 32-bits. x2 = Sse2.ShiftRightLogical128BitLane(x1, 4);
// polynomial x1 = Sse2.And(x1, x3);
x0 = Sse2.LoadVector128(localK05PolyPtr + 0x6); x1 = Pclmulqdq.CarrylessMultiply(x1, x0, 0x00);
x1 = Sse2.Xor(x1, x2);
x2 = Sse2.And(x1, x3); // Barret reduce to 32-bits.
x2 = Pclmulqdq.CarrylessMultiply(x2, x0, 0x10); // polynomial
x2 = Sse2.And(x2, x3); x0 = Sse2.LoadVector128(localK05PolyPtr + 0x6);
x2 = Pclmulqdq.CarrylessMultiply(x2, x0, 0x00);
x1 = Sse2.Xor(x1, x2);
crc = (uint)Sse41.Extract(x1.AsInt32(), 1); x2 = Sse2.And(x1, x3);
return buffer.Length - chunksize == 0 ? crc : CalculateScalar(crc, buffer.Slice(chunksize)); x2 = Pclmulqdq.CarrylessMultiply(x2, x0, 0x10);
x2 = Sse2.And(x2, x3);
x2 = Pclmulqdq.CarrylessMultiply(x2, x0, 0x00);
x1 = Sse2.Xor(x1, x2);
crc = (uint)Sse41.Extract(x1.AsInt32(), 1);
return buffer.Length - chunksize == 0 ? crc : CalculateScalar(crc, buffer.Slice(chunksize));
}
} }
} }
#endif #endif

1
src/ImageSharp/Formats/Gif/GifDecoderCore.cs

@ -8,7 +8,6 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.Metadata; using SixLabors.ImageSharp.Metadata;

1
src/ImageSharp/Formats/Gif/LzwEncoder.cs

@ -6,7 +6,6 @@ using System.Buffers;
using System.IO; using System.IO;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Formats.Gif namespace SixLabors.ImageSharp.Formats.Gif

1
src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegComponent.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder

1
src/ImageSharp/Formats/Tiff/Compression/Decompressors/DeflateTiffCompression.cs

@ -3,7 +3,6 @@
using System; using System;
using System.IO.Compression; using System.IO.Compression;
using SixLabors.ImageSharp.Compression.Zlib; using SixLabors.ImageSharp.Compression.Zlib;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation; using SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation;

1
src/ImageSharp/Formats/Tiff/Compression/Decompressors/ModifiedHuffmanTiffCompression.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Compression/Decompressors/NoneTiffCompression.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Compression/Decompressors/PackBitsTiffCompression.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Buffers; using System.Buffers;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Compression/Decompressors/T4TiffCompression.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Compression/Decompressors/T6BitReader.cs

@ -3,7 +3,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Compression/TiffBaseDecompressor.cs

@ -3,7 +3,6 @@
using System; using System;
using System.IO; using System.IO;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Ifd/EntryReader.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.Metadata.Profiles.Exif; using SixLabors.ImageSharp.Metadata.Profiles.Exif;

1
src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero1TiffColor{TPixel}.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero4TiffColor{TPixel}.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/Formats/Tiff/PhotometricInterpretation/Rgb444TiffColor{TPixel}.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero1TiffColor{TPixel}.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero4TiffColor{TPixel}.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/Formats/Tiff/TiffEncoder.cs

@ -4,7 +4,6 @@
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Compression.Zlib; using SixLabors.ImageSharp.Compression.Zlib;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;

1
src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs

@ -5,7 +5,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Compression.Zlib; using SixLabors.ImageSharp.Compression.Zlib;
using SixLabors.ImageSharp.Formats.Tiff.Compression; using SixLabors.ImageSharp.Formats.Tiff.Compression;

1
src/ImageSharp/Formats/Tiff/TiffFormat.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Collections.Generic; using System.Collections.Generic;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
namespace SixLabors.ImageSharp.Formats.Tiff namespace SixLabors.ImageSharp.Formats.Tiff

1
src/ImageSharp/Formats/Tiff/Writers/TiffBiColorWriter{TPixel}.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Buffers; using System.Buffers;
using SixLabors.ImageSharp.Formats.Tiff.Compression; using SixLabors.ImageSharp.Formats.Tiff.Compression;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Writers/TiffPaletteWriter{TPixel}.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Buffers; using System.Buffers;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Formats.Tiff.Compression; using SixLabors.ImageSharp.Formats.Tiff.Compression;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.Metadata.Profiles.Exif; using SixLabors.ImageSharp.Metadata.Profiles.Exif;

2
src/ImageSharp/Image.Decode.cs

@ -121,7 +121,7 @@ namespace SixLabors.ImageSharp
/// <param name="stream">The image stream to read the header from.</param> /// <param name="stream">The image stream to read the header from.</param>
/// <param name="config">The configuration.</param> /// <param name="config">The configuration.</param>
/// <returns>The decoder and the image format or null if none found.</returns> /// <returns>The decoder and the image format or null if none found.</returns>
private static async Task<(IImageDecoder decoder, IImageFormat format)> DiscoverDecoderAsync(Stream stream, Configuration config) private static async Task<(IImageDecoder Decoder, IImageFormat Format)> DiscoverDecoderAsync(Stream stream, Configuration config)
{ {
IImageFormat format = await InternalDetectFormatAsync(stream, config).ConfigureAwait(false); IImageFormat format = await InternalDetectFormatAsync(stream, config).ConfigureAwait(false);

8
src/ImageSharp/Image.FromStream.cs

@ -679,13 +679,13 @@ namespace SixLabors.ImageSharp
/// <returns>A new <see cref="Image{TPixel}"/>.</returns> /// <returns>A new <see cref="Image{TPixel}"/>.</returns>
public static Image Load(Configuration configuration, Stream stream, out IImageFormat format) public static Image Load(Configuration configuration, Stream stream, out IImageFormat format)
{ {
(Image img, IImageFormat format) data = WithSeekableStream(configuration, stream, s => Decode(s, configuration)); (Image Img, IImageFormat Format) data = WithSeekableStream(configuration, stream, s => Decode(s, configuration));
format = data.format; format = data.Format;
if (data.img != null) if (data.Img != null)
{ {
return data.img; return data.Img;
} }
var sb = new StringBuilder(); var sb = new StringBuilder();

1
src/ImageSharp/Image.WrapMemory.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Buffers; using System.Buffers;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.Metadata; using SixLabors.ImageSharp.Metadata;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/ImageFrameCollection{TPixel}.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

5
src/ImageSharp/ImageSharp.csproj

@ -15,6 +15,11 @@
<Configurations>Debug;Release;Debug-InnerLoop;Release-InnerLoop</Configurations> <Configurations>Debug;Release;Debug-InnerLoop;Release-InnerLoop</Configurations>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<!--Bump to V2 prior to tagged release.-->
<MinVerMinimumMajorMinor>2.0</MinVerMinimumMajorMinor>
</PropertyGroup>
<Choose> <Choose>
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true"> <When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
<PropertyGroup> <PropertyGroup>

4
src/ImageSharp/Memory/TransformItemsDelegate{T}.cs → src/ImageSharp/Memory/TransformItemsDelegate{TSource, TTarget}.cs

@ -1,9 +1,11 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
namespace SixLabors.ImageSharp.Memory namespace SixLabors.ImageSharp.Memory
{ {
#pragma warning disable SA1649 // File name should match first type name
internal delegate void TransformItemsDelegate<TSource, TTarget>(ReadOnlySpan<TSource> source, Span<TTarget> target); internal delegate void TransformItemsDelegate<TSource, TTarget>(ReadOnlySpan<TSource> source, Span<TTarget> target);
#pragma warning restore SA1649 // File name should match first type name
} }

1
src/ImageSharp/Metadata/Profiles/Exif/ExifProfile.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Metadata.Profiles.Exif namespace SixLabors.ImageSharp.Metadata.Profiles.Exif

1
src/ImageSharp/PixelFormats/PixelConversionModifiers.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.ColorSpaces.Companding; using SixLabors.ImageSharp.ColorSpaces.Companding;
namespace SixLabors.ImageSharp.PixelFormats namespace SixLabors.ImageSharp.PixelFormats

1
src/ImageSharp/PixelFormats/Utils/Vector4Converters.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces.Companding; using SixLabors.ImageSharp.ColorSpaces.Companding;
namespace SixLabors.ImageSharp.PixelFormats.Utils namespace SixLabors.ImageSharp.PixelFormats.Utils

1
src/ImageSharp/Processing/Extensions/ProcessingExtensions.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing.Processors; using SixLabors.ImageSharp.Processing.Processors;

1
src/ImageSharp/Processing/Extensions/Transforms/TransformExtensions.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using SixLabors.ImageSharp.Processing.Processors.Transforms; using SixLabors.ImageSharp.Processing.Processors.Transforms;
namespace SixLabors.ImageSharp.Processing namespace SixLabors.ImageSharp.Processing

1
src/ImageSharp/Processing/Processors/Binarization/AdaptiveThresholdProcessor{TPixel}.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

24
src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationProcessor{TPixel}.cs

@ -70,7 +70,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
{ {
cdfData.CalculateLookupTables(source, this); cdfData.CalculateLookupTables(source, this);
var tileYStartPositions = new List<(int y, int cdfY)>(); var tileYStartPositions = new List<(int Y, int CdfY)>();
int cdfY = 0; int cdfY = 0;
int yStart = halfTileHeight; int yStart = halfTileHeight;
for (int tile = 0; tile < tileCount - 1; tile++) for (int tile = 0; tile < tileCount - 1; tile++)
@ -367,7 +367,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
private readonly struct RowIntervalOperation : IRowIntervalOperation private readonly struct RowIntervalOperation : IRowIntervalOperation
{ {
private readonly CdfTileData cdfData; private readonly CdfTileData cdfData;
private readonly List<(int y, int cdfY)> tileYStartPositions; private readonly List<(int Y, int CdfY)> tileYStartPositions;
private readonly int tileWidth; private readonly int tileWidth;
private readonly int tileHeight; private readonly int tileHeight;
private readonly int tileCount; private readonly int tileCount;
@ -380,7 +380,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public RowIntervalOperation( public RowIntervalOperation(
CdfTileData cdfData, CdfTileData cdfData,
List<(int y, int cdfY)> tileYStartPositions, List<(int Y, int CdfY)> tileYStartPositions,
int tileWidth, int tileWidth,
int tileHeight, int tileHeight,
int tileCount, int tileCount,
@ -406,9 +406,9 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
{ {
for (int index = rows.Min; index < rows.Max; index++) for (int index = rows.Min; index < rows.Max; index++)
{ {
(int y, int cdfY) tileYStartPosition = this.tileYStartPositions[index]; (int Y, int CdfY) tileYStartPosition = this.tileYStartPositions[index];
int y = tileYStartPosition.y; int y = tileYStartPosition.Y;
int cdfYY = tileYStartPosition.cdfY; int cdfYY = tileYStartPosition.CdfY;
int cdfX = 0; int cdfX = 0;
int x = this.halfTileWidth; int x = this.halfTileWidth;
@ -473,7 +473,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
private readonly int tileWidth; private readonly int tileWidth;
private readonly int tileHeight; private readonly int tileHeight;
private readonly int luminanceLevels; private readonly int luminanceLevels;
private readonly List<(int y, int cdfY)> tileYStartPositions; private readonly List<(int Y, int CdfY)> tileYStartPositions;
public CdfTileData( public CdfTileData(
Configuration configuration, Configuration configuration,
@ -496,7 +496,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
this.pixelsInTile = tileWidth * tileHeight; this.pixelsInTile = tileWidth * tileHeight;
// Calculate the start positions and rent buffers. // Calculate the start positions and rent buffers.
this.tileYStartPositions = new List<(int y, int cdfY)>(); this.tileYStartPositions = new List<(int Y, int CdfY)>();
int cdfY = 0; int cdfY = 0;
for (int y = 0; y < sourceHeight; y += tileHeight) for (int y = 0; y < sourceHeight; y += tileHeight)
{ {
@ -556,7 +556,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
private readonly MemoryAllocator allocator; private readonly MemoryAllocator allocator;
private readonly Buffer2D<int> cdfMinBuffer2D; private readonly Buffer2D<int> cdfMinBuffer2D;
private readonly Buffer2D<int> cdfLutBuffer2D; private readonly Buffer2D<int> cdfLutBuffer2D;
private readonly List<(int y, int cdfY)> tileYStartPositions; private readonly List<(int Y, int CdfY)> tileYStartPositions;
private readonly int tileWidth; private readonly int tileWidth;
private readonly int tileHeight; private readonly int tileHeight;
private readonly int luminanceLevels; private readonly int luminanceLevels;
@ -570,7 +570,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
MemoryAllocator allocator, MemoryAllocator allocator,
Buffer2D<int> cdfMinBuffer2D, Buffer2D<int> cdfMinBuffer2D,
Buffer2D<int> cdfLutBuffer2D, Buffer2D<int> cdfLutBuffer2D,
List<(int y, int cdfY)> tileYStartPositions, List<(int Y, int CdfY)> tileYStartPositions,
int tileWidth, int tileWidth,
int tileHeight, int tileHeight,
int luminanceLevels, int luminanceLevels,
@ -596,8 +596,8 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
for (int index = rows.Min; index < rows.Max; index++) for (int index = rows.Min; index < rows.Max; index++)
{ {
int cdfX = 0; int cdfX = 0;
int cdfY = this.tileYStartPositions[index].cdfY; int cdfY = this.tileYStartPositions[index].CdfY;
int y = this.tileYStartPositions[index].y; int y = this.tileYStartPositions[index].Y;
int endY = Math.Min(y + this.tileHeight, this.sourceHeight); int endY = Math.Min(y + this.tileHeight, this.sourceHeight);
Span<int> cdfMinSpan = this.cdfMinBuffer2D.GetRowSpan(cdfY); Span<int> cdfMinSpan = this.cdfMinBuffer2D.GetRowSpan(cdfY);
cdfMinSpan.Clear(); cdfMinSpan.Clear();

1
src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationSlidingWindowProcessor{TPixel}.cs

@ -7,7 +7,6 @@ using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading.Tasks; using System.Threading.Tasks;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/Processing/Processors/Normalization/HistogramEqualizationProcessor{TPixel}.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Processing.Processors.Normalization namespace SixLabors.ImageSharp.Processing.Processors.Normalization

1
src/ImageSharp/Processing/Processors/Transforms/Linear/AutoOrientProcessor{TPixel}.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Metadata.Profiles.Exif; using SixLabors.ImageSharp.Metadata.Profiles.Exif;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

14
src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeHelper.cs

@ -30,7 +30,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
/// <returns> /// <returns>
/// The tuple representing the location and the bounds /// The tuple representing the location and the bounds
/// </returns> /// </returns>
public static (Size, Rectangle) CalculateTargetLocationAndBounds(Size sourceSize, ResizeOptions options) public static (Size Size, Rectangle Rectangle) CalculateTargetLocationAndBounds(Size sourceSize, ResizeOptions options)
{ {
int width = options.Size.Width; int width = options.Size.Width;
int height = options.Size.Height; int height = options.Size.Height;
@ -76,7 +76,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
} }
} }
private static (Size, Rectangle) CalculateBoxPadRectangle( private static (Size Size, Rectangle Rectangle) CalculateBoxPadRectangle(
Size source, Size source,
ResizeOptions options, ResizeOptions options,
int width, int width,
@ -150,7 +150,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
return CalculatePadRectangle(source, options, width, height); return CalculatePadRectangle(source, options, width, height);
} }
private static (Size, Rectangle) CalculateCropRectangle( private static (Size Size, Rectangle Rectangle) CalculateCropRectangle(
Size source, Size source,
ResizeOptions options, ResizeOptions options,
int width, int width,
@ -256,7 +256,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
return (new Size(Sanitize(width), Sanitize(height)), new Rectangle(targetX, targetY, Sanitize(targetWidth), Sanitize(targetHeight))); return (new Size(Sanitize(width), Sanitize(height)), new Rectangle(targetX, targetY, Sanitize(targetWidth), Sanitize(targetHeight)));
} }
private static (Size, Rectangle) CalculateMaxRectangle( private static (Size Size, Rectangle Rectangle) CalculateMaxRectangle(
Size source, Size source,
int width, int width,
int height) int height)
@ -285,7 +285,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
return (new Size(Sanitize(targetWidth), Sanitize(targetHeight)), new Rectangle(0, 0, Sanitize(targetWidth), Sanitize(targetHeight))); return (new Size(Sanitize(targetWidth), Sanitize(targetHeight)), new Rectangle(0, 0, Sanitize(targetWidth), Sanitize(targetHeight)));
} }
private static (Size, Rectangle) CalculateMinRectangle( private static (Size Size, Rectangle Rectangle) CalculateMinRectangle(
Size source, Size source,
int width, int width,
int height) int height)
@ -333,7 +333,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
return (new Size(Sanitize(targetWidth), Sanitize(targetHeight)), new Rectangle(0, 0, Sanitize(targetWidth), Sanitize(targetHeight))); return (new Size(Sanitize(targetWidth), Sanitize(targetHeight)), new Rectangle(0, 0, Sanitize(targetWidth), Sanitize(targetHeight)));
} }
private static (Size, Rectangle) CalculatePadRectangle( private static (Size Size, Rectangle Rectangle) CalculatePadRectangle(
Size sourceSize, Size sourceSize,
ResizeOptions options, ResizeOptions options,
int width, int width,
@ -401,7 +401,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
return (new Size(Sanitize(width), Sanitize(height)), new Rectangle(targetX, targetY, Sanitize(targetWidth), Sanitize(targetHeight))); return (new Size(Sanitize(width), Sanitize(height)), new Rectangle(targetX, targetY, Sanitize(targetWidth), Sanitize(targetHeight)));
} }
private static (Size, Rectangle) CalculateManualRectangle( private static (Size Size, Rectangle Rectangle) CalculateManualRectangle(
ResizeOptions options, ResizeOptions options,
int width, int width,
int height) int height)

2
tests/ImageSharp.Benchmarks/Codecs/DecodeTiff.cs

@ -6,12 +6,10 @@
//// #define BIG_TESTS //// #define BIG_TESTS
using System.IO; using System.IO;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Tests; using SixLabors.ImageSharp.Tests;
using SDImage = System.Drawing.Image; using SDImage = System.Drawing.Image;
using SDSize = System.Drawing.Size; using SDSize = System.Drawing.Size;

1
tests/ImageSharp.Benchmarks/Codecs/EncodeTiff.cs

@ -3,7 +3,6 @@
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.IO; using System.IO;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.Formats.Tiff;

43
tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_CopyTo1x1.cs

@ -5,14 +5,11 @@ using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#if SUPPORTS_RUNTIME_INTRINSICS #if SUPPORTS_RUNTIME_INTRINSICS
using System.Runtime.Intrinsics; using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.X86;
#endif #endif
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming
@ -319,26 +316,28 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs.Jpeg.BlockOperations
{ {
int stride = Width; int stride = Width;
fixed (float* d = this.unpinnedBuffer) fixed (float* d = this.unpinnedBuffer)
fixed (Block8x8F* ss = &this.block)
{ {
var s = (float*)ss; fixed (Block8x8F* ss = &this.block)
Vector256<float> v0 = Avx.LoadVector256(s); {
Vector256<float> v1 = Avx.LoadVector256(s + 8); var s = (float*)ss;
Vector256<float> v2 = Avx.LoadVector256(s + (8 * 2)); Vector256<float> v0 = Avx.LoadVector256(s);
Vector256<float> v3 = Avx.LoadVector256(s + (8 * 3)); Vector256<float> v1 = Avx.LoadVector256(s + 8);
Avx.Store(d, v0); Vector256<float> v2 = Avx.LoadVector256(s + (8 * 2));
Avx.Store(d + stride, v1); Vector256<float> v3 = Avx.LoadVector256(s + (8 * 3));
Avx.Store(d + (stride * 2), v2); Avx.Store(d, v0);
Avx.Store(d + (stride * 3), v3); Avx.Store(d + stride, v1);
Avx.Store(d + (stride * 2), v2);
v0 = Avx.LoadVector256(s + (8 * 4)); Avx.Store(d + (stride * 3), v3);
v1 = Avx.LoadVector256(s + (8 * 5));
v2 = Avx.LoadVector256(s + (8 * 6)); v0 = Avx.LoadVector256(s + (8 * 4));
v3 = Avx.LoadVector256(s + (8 * 7)); v1 = Avx.LoadVector256(s + (8 * 5));
Avx.Store(d + (stride * 4), v0); v2 = Avx.LoadVector256(s + (8 * 6));
Avx.Store(d + (stride * 5), v1); v3 = Avx.LoadVector256(s + (8 * 7));
Avx.Store(d + (stride * 6), v2); Avx.Store(d + (stride * 4), v0);
Avx.Store(d + (stride * 7), v3); Avx.Store(d + (stride * 5), v1);
Avx.Store(d + (stride * 6), v2);
Avx.Store(d + (stride * 7), v3);
}
} }
} }

1
tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_CopyTo2x2.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;

1
tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_DivideRound.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;

1
tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_LoadFromInt16.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;

2
tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_Round.cs

@ -5,12 +5,10 @@ using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#if SUPPORTS_RUNTIME_INTRINSICS #if SUPPORTS_RUNTIME_INTRINSICS
using System.Runtime.Intrinsics; using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.X86;
#endif #endif
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;

2
tests/ImageSharp.Benchmarks/Color/Bulk/FromVector4.cs

@ -6,12 +6,10 @@ using System.Buffers;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#if SUPPORTS_RUNTIME_INTRINSICS #if SUPPORTS_RUNTIME_INTRINSICS
using System.Runtime.Intrinsics; using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.X86;
#endif #endif
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/Color/Bulk/ToVector4_Rgba32.cs

@ -5,7 +5,6 @@ using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
tests/ImageSharp.Benchmarks/Color/RgbToYCbCr.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;

1
tests/ImageSharp.Benchmarks/General/Array2D.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp; using SixLabors.ImageSharp;

1
tests/ImageSharp.Benchmarks/General/ArrayReverse.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General namespace SixLabors.ImageSharp.Benchmarks.General

1
tests/ImageSharp.Benchmarks/General/BasicMath/Abs.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath

1
tests/ImageSharp.Benchmarks/General/BasicMath/ClampFloat.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath

1
tests/ImageSharp.Benchmarks/General/BasicMath/ClampInt32IntoByte.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath

1
tests/ImageSharp.Benchmarks/General/BasicMath/ClampVector4.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath

1
tests/ImageSharp.Benchmarks/General/BasicMath/Pow.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath

1
tests/ImageSharp.Benchmarks/General/CopyBuffers.cs

@ -5,7 +5,6 @@ using System;
using System.Buffers; using System.Buffers;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General namespace SixLabors.ImageSharp.Benchmarks.General

1
tests/ImageSharp.Benchmarks/General/PixelConversion/ITestPixel.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertFromRgba32.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertFromVector4.cs

@ -4,7 +4,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToRgba32.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToRgba32_AsPartOfCompositeOperation.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToVector4.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToVector4_AsPartOfCompositeOperation.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion

22
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_PackFromRgbPlanes.cs

@ -50,16 +50,22 @@ namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion
public void Rgb24_Scalar_PerElement_Pinned() public void Rgb24_Scalar_PerElement_Pinned()
{ {
fixed (byte* r = &this.rBuf[0]) fixed (byte* r = &this.rBuf[0])
fixed (byte* g = &this.gBuf[0])
fixed (byte* b = &this.bBuf[0])
fixed (Rgb24* rgb = &this.rgbBuf[0])
{ {
for (int i = 0; i < this.Count; i++) fixed (byte* g = &this.gBuf[0])
{ {
Rgb24* d = rgb + i; fixed (byte* b = &this.bBuf[0])
d->R = r[i]; {
d->G = g[i]; fixed (Rgb24* rgb = &this.rgbBuf[0])
d->B = b[i]; {
for (int i = 0; i < this.Count; i++)
{
Rgb24* d = rgb + i;
d->R = r[i];
d->G = g[i];
d->B = b[i];
}
}
}
} }
} }
} }

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_Rgba32_To_Argb32.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_Rgba32_To_Bgra32.cs

@ -5,7 +5,6 @@ using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/General/PixelConversion/TestArgb.cs

@ -4,7 +4,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion

1
tests/ImageSharp.Benchmarks/General/PixelConversion/TestRgba.cs

@ -4,7 +4,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion

1
tests/ImageSharp.Benchmarks/General/Vector4Constants.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General namespace SixLabors.ImageSharp.Benchmarks.General

1
tests/ImageSharp.Benchmarks/General/Vectorization/BitwiseOrUint32.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/DivFloat.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/DivUInt32.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/Divide.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace ImageSharp.Benchmarks.General.Vectorization namespace ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/MulFloat.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/MulUInt32.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/ReinterpretUInt32AsFloat.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/SIMDBenchmarkBase.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace ImageSharp.Benchmarks.General.Vectorization namespace ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/UInt32ToSingle.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/WidenBytesToUInt32.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Tuples; using SixLabors.ImageSharp.Tuples;

28
tests/ImageSharp.Benchmarks/LoadResizeSave/LoadResizeSaveStressRunner.cs

@ -41,7 +41,7 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
private const string SkiaSharpBitmap = nameof(SkiaSharpBitmap); private const string SkiaSharpBitmap = nameof(SkiaSharpBitmap);
// Set the quality for ImagSharp // Set the quality for ImagSharp
private readonly JpegEncoder imageSharpJpegEncoder = new () { Quality = Quality }; private readonly JpegEncoder imageSharpJpegEncoder = new() { Quality = Quality };
private readonly ImageCodecInfo systemDrawingJpegCodec = private readonly ImageCodecInfo systemDrawingJpegCodec =
ImageCodecInfo.GetImageEncoders().First(codec => codec.FormatID == ImageFormat.Jpeg.Guid); ImageCodecInfo.GetImageEncoders().First(codec => codec.FormatID == ImageFormat.Jpeg.Guid);
@ -138,7 +138,7 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
this.outputDirectory, this.outputDirectory,
Path.GetFileNameWithoutExtension(inputPath) + "-" + postfix + Path.GetExtension(inputPath)); Path.GetFileNameWithoutExtension(inputPath) + "-" + postfix + Path.GetExtension(inputPath));
private (int width, int height) ScaledSize(int inWidth, int inHeight, int outSize) private (int Width, int Height) ScaledSize(int inWidth, int inHeight, int outSize)
{ {
int width, height; int width, height;
if (inWidth > inHeight) if (inWidth > inHeight)
@ -160,8 +160,8 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
using var image = SystemDrawingImage.FromFile(input, true); using var image = SystemDrawingImage.FromFile(input, true);
this.IncreaseTotalMegapixels(image.Width, image.Height); this.IncreaseTotalMegapixels(image.Width, image.Height);
(int width, int height) scaled = this.ScaledSize(image.Width, image.Height, ThumbnailSize); (int Width, int Height) scaled = this.ScaledSize(image.Width, image.Height, this.ThumbnailSize);
var resized = new Bitmap(scaled.width, scaled.height); var resized = new Bitmap(scaled.Width, scaled.Height);
using var graphics = Graphics.FromImage(resized); using var graphics = Graphics.FromImage(resized);
using var attributes = new ImageAttributes(); using var attributes = new ImageAttributes();
attributes.SetWrapMode(WrapMode.TileFlipXY); attributes.SetWrapMode(WrapMode.TileFlipXY);
@ -188,7 +188,7 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
image.Mutate(i => i.Resize(new ResizeOptions image.Mutate(i => i.Resize(new ResizeOptions
{ {
Size = new ImageSharpSize(ThumbnailSize, ThumbnailSize), Size = new ImageSharpSize(this.ThumbnailSize, this.ThumbnailSize),
Mode = ResizeMode.Max Mode = ResizeMode.Max
})); }));
@ -205,7 +205,7 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
this.IncreaseTotalMegapixels(image.Width, image.Height); this.IncreaseTotalMegapixels(image.Width, image.Height);
// Resize it to fit a 150x150 square // Resize it to fit a 150x150 square
image.Resize(ThumbnailSize, ThumbnailSize); image.Resize(this.ThumbnailSize, this.ThumbnailSize);
// Reduce the size of the file // Reduce the size of the file
image.Strip(); image.Strip();
@ -221,8 +221,8 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
{ {
var settings = new ProcessImageSettings() var settings = new ProcessImageSettings()
{ {
Width = ThumbnailSize, Width = this.ThumbnailSize,
Height = ThumbnailSize, Height = this.ThumbnailSize,
ResizeMode = CropScaleMode.Max, ResizeMode = CropScaleMode.Max,
SaveFormat = FileFormat.Jpeg, SaveFormat = FileFormat.Jpeg,
JpegQuality = Quality, JpegQuality = Quality,
@ -238,11 +238,11 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
{ {
using var original = SKBitmap.Decode(input); using var original = SKBitmap.Decode(input);
this.IncreaseTotalMegapixels(original.Width, original.Height); this.IncreaseTotalMegapixels(original.Width, original.Height);
(int width, int height) scaled = this.ScaledSize(original.Width, original.Height, ThumbnailSize); (int Width, int Height) scaled = this.ScaledSize(original.Width, original.Height, this.ThumbnailSize);
using var surface = SKSurface.Create(new SKImageInfo(scaled.width, scaled.height, original.ColorType, original.AlphaType)); using var surface = SKSurface.Create(new SKImageInfo(scaled.Width, scaled.Height, original.ColorType, original.AlphaType));
using var paint = new SKPaint() { FilterQuality = SKFilterQuality.High }; using var paint = new SKPaint() { FilterQuality = SKFilterQuality.High };
SKCanvas canvas = surface.Canvas; SKCanvas canvas = surface.Canvas;
canvas.Scale((float)scaled.width / original.Width); canvas.Scale((float)scaled.Width / original.Width);
canvas.DrawBitmap(original, 0, 0, paint); canvas.DrawBitmap(original, 0, 0, paint);
canvas.Flush(); canvas.Flush();
@ -256,8 +256,8 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
{ {
using var original = SKBitmap.Decode(input); using var original = SKBitmap.Decode(input);
this.IncreaseTotalMegapixels(original.Width, original.Height); this.IncreaseTotalMegapixels(original.Width, original.Height);
(int width, int height) scaled = this.ScaledSize(original.Width, original.Height, ThumbnailSize); (int Width, int Height) scaled = this.ScaledSize(original.Width, original.Height, this.ThumbnailSize);
using var resized = original.Resize(new SKImageInfo(scaled.width, scaled.height), SKFilterQuality.High); using var resized = original.Resize(new SKImageInfo(scaled.Width, scaled.Height), SKFilterQuality.High);
if (resized == null) if (resized == null)
{ {
return; return;
@ -272,7 +272,7 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
public void NetVipsResize(string input) public void NetVipsResize(string input)
{ {
// Thumbnail to fit a 150x150 square // Thumbnail to fit a 150x150 square
using var thumb = NetVipsImage.Thumbnail(input, ThumbnailSize, ThumbnailSize); using var thumb = NetVipsImage.Thumbnail(input, this.ThumbnailSize, this.ThumbnailSize);
// Save the results // Save the results
thumb.Jpegsave(this.OutputPath(input, NetVips), q: Quality, strip: true); thumb.Jpegsave(this.OutputPath(input, NetVips), q: Quality, strip: true);

4
tests/ImageSharp.Tests.ProfilingSandbox/LoadResizeSaveParallelMemoryStress.cs

@ -1,4 +1,4 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
@ -121,7 +121,7 @@ namespace SixLabors.ImageSharp.Tests.ProfilingSandbox
return bld.ToString(); return bld.ToString();
static string L(string header) => new ('-', header.Length); static string L(string header) => new('-', header.Length);
static string F(string column) => $"{{0,{column.Length}:f3}}"; static string F(string column) => $"{{0,{column.Length}:f3}}";
} }
} }

3
tests/ImageSharp.Tests.ProfilingSandbox/Program.cs

@ -1,3 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Tests.Formats.Jpg; using SixLabors.ImageSharp.Tests.Formats.Jpg;
using SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations; using SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations;

1
tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs

@ -14,7 +14,6 @@ using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs; using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs;
using Xunit; using Xunit;
using static SixLabors.ImageSharp.Tests.TestImages.Bmp; using static SixLabors.ImageSharp.Tests.TestImages.Bmp;
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming

2
tests/ImageSharp.Tests/Formats/Bmp/BmpEncoderTests.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.IO; using System.IO;
using SixLabors.ImageSharp.Formats; using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Formats.Bmp; using SixLabors.ImageSharp.Formats.Bmp;
using SixLabors.ImageSharp.Metadata; using SixLabors.ImageSharp.Metadata;
@ -13,7 +12,6 @@ using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs; using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs;
using Xunit; using Xunit;
using static SixLabors.ImageSharp.Tests.TestImages.Bmp; using static SixLabors.ImageSharp.Tests.TestImages.Bmp;
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming

2
tests/ImageSharp.Tests/Formats/Bmp/BmpMetadataTests.cs

@ -2,11 +2,9 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.IO; using System.IO;
using SixLabors.ImageSharp.Formats.Bmp; using SixLabors.ImageSharp.Formats.Bmp;
using Xunit; using Xunit;
using static SixLabors.ImageSharp.Tests.TestImages.Bmp; using static SixLabors.ImageSharp.Tests.TestImages.Bmp;
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming

1
tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.IO; using System.IO;
using SixLabors.ImageSharp.Formats.Gif; using SixLabors.ImageSharp.Formats.Gif;
using SixLabors.ImageSharp.Metadata; using SixLabors.ImageSharp.Metadata;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Tests/Formats/Gif/GifMetadataTests.cs

@ -4,7 +4,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using SixLabors.ImageSharp.Formats.Gif; using SixLabors.ImageSharp.Formats.Gif;
using SixLabors.ImageSharp.Metadata; using SixLabors.ImageSharp.Metadata;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs

@ -7,7 +7,6 @@ using System;
#if SUPPORTS_RUNTIME_INTRINSICS #if SUPPORTS_RUNTIME_INTRINSICS
using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.X86;
#endif #endif
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;
using SixLabors.ImageSharp.Tests.Formats.Jpg.Utils; using SixLabors.ImageSharp.Tests.Formats.Jpg.Utils;
using SixLabors.ImageSharp.Tests.TestUtilities; using SixLabors.ImageSharp.Tests.TestUtilities;

1
tests/ImageSharp.Tests/Formats/Jpg/GenericBlock8x8Tests.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Tests/Formats/Jpg/JpegColorConverterTests.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Numerics; using System.Numerics;
using SixLabors.ImageSharp.ColorSpaces; using SixLabors.ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces.Conversion; using SixLabors.ImageSharp.ColorSpaces.Conversion;
using SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder; using SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder;

1
tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Metadata.cs

@ -4,7 +4,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Formats; using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Formats.Jpeg; using SixLabors.ImageSharp.Formats.Jpeg;
using SixLabors.ImageSharp.Metadata; using SixLabors.ImageSharp.Metadata;

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save