Switched to ThumbHasher over BlurHasher

This commit is contained in:
2023-05-21 23:56:10 -07:00
parent 514637b9c6
commit a0c880c7ba
26 changed files with 803 additions and 121 deletions

View File

@ -0,0 +1,31 @@
using System.Runtime.CompilerServices;
namespace View_by_Distance.ThumbHash.Models;
public static partial class ThumbHash
{
private readonly ref struct Channel
{
public float DC { init; get; }
public SpanOwner<float> AC { init; get; }
public float Scale { init; get; }
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public Channel(float dc, SpanOwner<float> ac, float scale)
{
DC = dc;
AC = ac;
Scale = scale;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Deconstruct(out float dc, out SpanOwner<float> ac, out float scale)
{
dc = DC;
ac = AC;
scale = Scale;
}
}
}