Browse Source

gfoidl fixes

pull/1761/head
Dmitry Pentin 5 years ago
parent
commit
d934bad69e
  1. 6
      src/ImageSharp/Formats/Jpeg/Components/Block8x8.cs

6
src/ImageSharp/Formats/Jpeg/Components/Block8x8.cs

@ -225,10 +225,10 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public void LoadFrom(Span<short> source) public void LoadFrom(Span<short> source)
{ {
ref byte s = ref Unsafe.As<short, byte>(ref MemoryMarshal.GetReference(source)); ref byte sourceRef = ref Unsafe.As<short, byte>(ref MemoryMarshal.GetReference(source));
ref byte d = ref Unsafe.As<Block8x8, byte>(ref this); ref byte destRef = ref Unsafe.As<Block8x8, byte>(ref this);
Unsafe.CopyBlock(ref d, ref s, Size * sizeof(short)); Unsafe.CopyBlockUnaligned(ref destRef, ref sourceRef, Size * sizeof(short));
} }
/// <summary> /// <summary>

Loading…
Cancel
Save