Skip to content

Commit 07c8f7a

Browse files
Merge branch 'main' into sn/promote-pixeltype
2 parents d1c231b + 1baba9e commit 07c8f7a

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/ImageSharp/Formats/Png/Filters/PaethFilter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public static void Decode(Span<byte> scanline, Span<byte> previousScanline, int
3535
// row: a d
3636
// The Paeth function predicts d to be whichever of a, b, or c is nearest to
3737
// p = a + b - c.
38-
if (Sse2.IsSupported && bytesPerPixel is 4)
38+
if (Ssse3.IsSupported && bytesPerPixel is 4)
3939
{
40-
DecodeSse3(scanline, previousScanline);
40+
DecodeSsse3(scanline, previousScanline);
4141
}
4242
else if (AdvSimd.Arm64.IsSupported && bytesPerPixel is 4)
4343
{
@@ -50,7 +50,7 @@ public static void Decode(Span<byte> scanline, Span<byte> previousScanline, int
5050
}
5151

5252
[MethodImpl(MethodImplOptions.AggressiveInlining)]
53-
private static void DecodeSse3(Span<byte> scanline, Span<byte> previousScanline)
53+
private static void DecodeSsse3(Span<byte> scanline, Span<byte> previousScanline)
5454
{
5555
ref byte scanBaseRef = ref MemoryMarshal.GetReference(scanline);
5656
ref byte prevBaseRef = ref MemoryMarshal.GetReference(previousScanline);

src/ImageSharp/Formats/Webp/WebpFormat.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ private WebpFormat()
1818
public static WebpFormat Instance { get; } = new WebpFormat();
1919

2020
/// <inheritdoc/>
21-
public string Name => "Webp";
21+
public string Name => "WEBP";
2222

2323
/// <inheritdoc/>
2424
public string DefaultMimeType => "image/webp";

tests/ImageSharp.Tests/Formats/Png/PngDecoderFilterTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ private static void RunPaethFilterTest()
170170
[Fact]
171171
public void PaethFilter_WithHardwareIntrinsics_Works() => FeatureTestRunner.RunWithHwIntrinsicsFeature(RunPaethFilterTest, HwIntrinsics.AllowAll);
172172

173+
[Fact]
174+
public void PaethFilter_WithoutSsse3_Works() => FeatureTestRunner.RunWithHwIntrinsicsFeature(RunPaethFilterTest, HwIntrinsics.DisableSSSE3);
175+
173176
[Fact]
174177
public void PaethFilter_WithoutHardwareIntrinsics_Works() => FeatureTestRunner.RunWithHwIntrinsicsFeature(RunPaethFilterTest, HwIntrinsics.DisableHWIntrinsic);
175178
}

0 commit comments

Comments
 (0)