Browse Source

fixed PackToXyzBytes

pull/125/head
Anton Firszov 9 years ago
parent
commit
5ae01f1fa8
  1. 1
      src/ImageSharp/Colors/PackedPixel/BulkPixelOperations.cs
  2. 3
      tests/ImageSharp.Sandbox46/ImageSharp.Sandbox46.csproj
  3. 3
      tests/ImageSharp.Sandbox46/Program.cs
  4. 8
      tests/ImageSharp.Tests/Formats/Jpg/JpegProfilingBenchmarks.cs

1
src/ImageSharp/Colors/PackedPixel/BulkPixelOperations.cs

@ -78,6 +78,7 @@
{
TColor c = Unsafe.Read<TColor>(sp);
c.ToXyzBytes(dest, i);
sp += ColorSize;
}
}

3
tests/ImageSharp.Sandbox46/ImageSharp.Sandbox46.csproj

@ -209,6 +209,9 @@
<Compile Include="..\ImageSharp.Benchmarks\Color\Bulk\PixelAccessorVirtualCopy.cs">
<Link>Benchmarks\PixelAccessorVirtualCopy.cs</Link>
</Compile>
<Compile Include="..\ImageSharp.Tests\Colors\BulkPixelOperationsTests.cs">
<Link>Tests\Colors\BulkPixelOperationsTests.cs</Link>
</Compile>
<Compile Include="..\ImageSharp.Tests\Drawing\PolygonTests.cs">
<Link>Tests\Drawing\PolygonTests.cs</Link>
</Compile>

3
tests/ImageSharp.Sandbox46/Program.cs

@ -49,9 +49,6 @@ namespace ImageSharp.Sandbox46
benchmark.Setup();
benchmark.CopyRawUnsafeInlined();
benchmark.CopyArrayPointerUnsafe();
benchmark.CopyArrayPointerVirtualUnsafe();
benchmark.CopyArrayPointerVirtualMarshal();
benchmark.Cleanup();
}

8
tests/ImageSharp.Tests/Formats/Jpg/JpegProfilingBenchmarks.cs

@ -38,10 +38,10 @@ namespace ImageSharp.Tests
{
const int ExecutionCount = 30;
//if (!Vector.IsHardwareAccelerated)
//{
// throw new Exception("Vector.IsHardwareAccelerated == false! ('prefer32 bit' enabled?)");
//}
if (!Vector.IsHardwareAccelerated)
{
throw new Exception("Vector.IsHardwareAccelerated == false! ('prefer32 bit' enabled?)");
}
string path = TestFile.GetPath(fileName);
byte[] bytes = File.ReadAllBytes(path);

Loading…
Cancel
Save