mirror of https://github.com/SixLabors/ImageSharp
committed by
GitHub
17 changed files with 105 additions and 230 deletions
@ -0,0 +1 @@ |
|||||
|
<ItemGroup> |
||||
@ -1,24 +0,0 @@ |
|||||
// Copyright (c) Six Labors and contributors.
|
|
||||
// Licensed under the Apache License, Version 2.0.
|
|
||||
|
|
||||
using System.Runtime.CompilerServices; |
|
||||
using System.Runtime.InteropServices; |
|
||||
|
|
||||
namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder |
|
||||
{ |
|
||||
[StructLayout(LayoutKind.Sequential)] |
|
||||
internal unsafe struct FixedByteBuffer256 |
|
||||
{ |
|
||||
public fixed byte Data[256]; |
|
||||
|
|
||||
public byte this[int idx] |
|
||||
{ |
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|
||||
get |
|
||||
{ |
|
||||
ref byte self = ref Unsafe.As<FixedByteBuffer256, byte>(ref this); |
|
||||
return Unsafe.Add(ref self, idx); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,24 +0,0 @@ |
|||||
// Copyright (c) Six Labors and contributors.
|
|
||||
// Licensed under the Apache License, Version 2.0.
|
|
||||
|
|
||||
using System.Runtime.CompilerServices; |
|
||||
using System.Runtime.InteropServices; |
|
||||
|
|
||||
namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder |
|
||||
{ |
|
||||
[StructLayout(LayoutKind.Sequential)] |
|
||||
internal unsafe struct FixedByteBuffer512 |
|
||||
{ |
|
||||
public fixed byte Data[1 << ScanDecoder.FastBits]; |
|
||||
|
|
||||
public byte this[int idx] |
|
||||
{ |
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|
||||
get |
|
||||
{ |
|
||||
ref byte self = ref Unsafe.As<FixedByteBuffer512, byte>(ref this); |
|
||||
return Unsafe.Add(ref self, idx); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,24 +0,0 @@ |
|||||
// Copyright (c) Six Labors and contributors.
|
|
||||
// Licensed under the Apache License, Version 2.0.
|
|
||||
|
|
||||
using System.Runtime.CompilerServices; |
|
||||
using System.Runtime.InteropServices; |
|
||||
|
|
||||
namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder |
|
||||
{ |
|
||||
[StructLayout(LayoutKind.Sequential)] |
|
||||
internal unsafe struct FixedInt16Buffer257 |
|
||||
{ |
|
||||
public fixed short Data[257]; |
|
||||
|
|
||||
public short this[int idx] |
|
||||
{ |
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|
||||
get |
|
||||
{ |
|
||||
ref short self = ref Unsafe.As<FixedInt16Buffer257, short>(ref this); |
|
||||
return Unsafe.Add(ref self, idx); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,24 +0,0 @@ |
|||||
// Copyright (c) Six Labors and contributors.
|
|
||||
// Licensed under the Apache License, Version 2.0.
|
|
||||
|
|
||||
using System.Runtime.CompilerServices; |
|
||||
using System.Runtime.InteropServices; |
|
||||
|
|
||||
namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder |
|
||||
{ |
|
||||
[StructLayout(LayoutKind.Sequential)] |
|
||||
internal unsafe struct FixedInt32Buffer18 |
|
||||
{ |
|
||||
public fixed int Data[18]; |
|
||||
|
|
||||
public int this[int idx] |
|
||||
{ |
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|
||||
get |
|
||||
{ |
|
||||
ref int self = ref Unsafe.As<FixedInt32Buffer18, int>(ref this); |
|
||||
return Unsafe.Add(ref self, idx); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,24 +0,0 @@ |
|||||
// Copyright (c) Six Labors and contributors.
|
|
||||
// Licensed under the Apache License, Version 2.0.
|
|
||||
|
|
||||
using System.Runtime.CompilerServices; |
|
||||
using System.Runtime.InteropServices; |
|
||||
|
|
||||
namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder |
|
||||
{ |
|
||||
[StructLayout(LayoutKind.Sequential)] |
|
||||
internal unsafe struct FixedUInt32Buffer18 |
|
||||
{ |
|
||||
public fixed uint Data[18]; |
|
||||
|
|
||||
public uint this[int idx] |
|
||||
{ |
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|
||||
get |
|
||||
{ |
|
||||
ref uint self = ref Unsafe.As<FixedUInt32Buffer18, uint>(ref this); |
|
||||
return Unsafe.Add(ref self, idx); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1 +1 @@ |
|||||
Subproject commit 5f3cbd839fbbffae615d294d1dabafdcabc64cf9 |
Subproject commit c0627f384c1d3d2f8d914c9578ae31354c35fd2c |
||||
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 46 KiB |
Loading…
Reference in new issue