Skip to content

Commit

Permalink
v0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
saucecontrol committed Apr 11, 2021
1 parent c6f1828 commit 9bada99
Show file tree
Hide file tree
Showing 19 changed files with 137 additions and 126 deletions.
6 changes: 3 additions & 3 deletions doc/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
{
"src": "../",
"files": [
"out/bin/MagicScaler/Dist/netcoreapp3.0/PhotoSauce.MagicScaler.dll"
"out/bin/MagicScaler/Dist/netcoreapp3.1/PhotoSauce.MagicScaler.dll"
]
}
],
"dest": "../out/doc/api",
"properties": {
"TargetFramework": "netcoreapp3.0",
"TargetFramework": "netcoreapp3.1",
"Configuration": "Dist"
}
}
Expand All @@ -35,7 +35,7 @@
"markdownEngineName": "markdig",
"postProcessors": "ExtractSearchIndex",
"globalMetadata": {
"_appFooter": "<span>Copyright © 2020 Clinton Ingram<br>Generated with <strong>DocFX</strong></span>",
"_appFooter": "<span>Copyright © 2021 Clinton Ingram<br>Generated with <strong>DocFX</strong></span>",
"_appTitle": "PhotoSauce Documentation",
"_enableSearch": true,
"_enableNewTab": false,
Expand Down
Binary file modified doc/images/IMG_2301-ImageSharp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/IMG_2301-MagicScaler.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/IMG_2301-NetVips.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/IMG_2301-SkiaSharpCanvas.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/IMG_2445-ImageSharp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/IMG_2445-MagicScaler.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/IMG_2445-NetVips.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/IMG_2445-SkiaSharpCanvas.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/IMG_2525-ImageSharp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/IMG_2525-MagicScaler.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/IMG_2525-NetVips.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/IMG_2525-SkiaSharpCanvas.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/sample-ImageSharp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/sample-NetVips.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/sample-SkiaSharpCanvas.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
247 changes: 128 additions & 119 deletions readme.md

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions src/MagicScaler/Magic/OctreeQuantizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,10 @@ private static void initFreeList(Span<ushort> listBuff)
Unsafe.InitBlockUnaligned(ref listPtr, 0, reserveNodes * sizeof(ushort));
}

// TODO Check/log RyuJIT issue. All the static methods on the node structs should be instance methods or simply direct
// accesses to the fixed fields, but the JIT currently inserts extraneous null checks on pointer deref when inlining them.
// For the same reason, the fields are not used in the methods; we cast the node to the field type and offset manually.
// Related: https://github.com/dotnet/runtime/issues/37727
[StructLayout(LayoutKind.Explicit)]
private struct HistogramNode
{
Expand All @@ -1128,8 +1132,6 @@ private struct HistogramNode

public static ReadOnlySpan<byte> SumsMask => new byte[] { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f };

// TODO Check/log RyuJIT issue. All the following static methods should be instance methods
// but the JIT currently inserts extraneous null checks on pointer deref when inlining them.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void AddSample(HistogramNode* node, uint bgr)
{
Expand Down Expand Up @@ -1213,7 +1215,7 @@ private struct PaletteMapNode
[FieldOffset(0)]
public fixed byte PaletteIndices[8];
[FieldOffset(12)]
public int LeafValue;
public uint LeafValue;

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool HasChildren(PaletteMapNode* node)
Expand Down
2 changes: 1 addition & 1 deletion src/WebRSize/WebRSize.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>0.6.2</VersionPrefix>
<VersionPrefix>0.6.3</VersionPrefix>
<TargetFrameworks>net472</TargetFrameworks>
<TargetFrameworks Condition="'$(Configuration)'=='Dist' Or '$(Configuration)'=='Coverage'">$(TargetFrameworks);net461</TargetFrameworks>
</PropertyGroup>
Expand Down

0 comments on commit 9bada99

Please sign in to comment.