Skip to content

Commit f4dc0fc

Browse files
Disable Sse2 for now.
1 parent 10cd3d5 commit f4dc0fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ImageSharp/Formats/AnimationUtilities.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ public static (bool Difference, Rectangle Bounds) DeDuplicatePixels<TPixel>(
128128
}
129129
}
130130

131-
if (Sse2.IsSupported && remaining >= 4)
131+
// TODO: There's a bug here. See WebpEncoderTests.Encode_AnimatedLossless
132+
if (Sse2.IsSupported && remaining >= 4 && false)
132133
{
133134
Vector128<uint> r128 = previousFrame != null ? Vector128.Create(bg.PackedValue) : Vector128<uint>.Zero;
134135
Vector128<uint> vmb128 = Vector128<uint>.Zero;
@@ -151,7 +152,7 @@ public static (bool Difference, Rectangle Bounds) DeDuplicatePixels<TPixel>(
151152
eq = Sse2.AndNot(Sse2.CompareGreaterThan(Sse2.ShiftRightLogical(c, 24).AsInt32(), n).AsUInt32(), eq);
152153
}
153154

154-
Unsafe.Add(ref Unsafe.As<Vector256<byte>, Vector128<byte>>(ref resultBase), x) = r.AsByte();
155+
Unsafe.Add(ref Unsafe.As<Vector256<byte>, Vector128<uint>>(ref resultBase), x) = r;
155156

156157
ushort msk = (ushort)(uint)Sse2.MoveMask(eq.AsByte());
157158
msk = (ushort)~msk;

0 commit comments

Comments
 (0)