summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2023-05-30 10:21:58 -0400
committerAndreas Kling <kling@serenityos.org>2023-05-30 18:56:03 +0200
commitd1d9d7a4f34b08c04082e97dd6e8d41a5431b91a (patch)
tree3c93cea3776c2db93e1d59a2a1ff8a8907d71639
parent857ceb215c2f6ecbaa2528c9db3302d85f3fc339 (diff)
downloadserenity-d1d9d7a4f34b08c04082e97dd6e8d41a5431b91a.zip
WebP/Lossy: Use correct test image for coefficient skipping
I somehow added the wrong image here. 4.webp is the one described by the comment in the test. Now test actually uses the image it claims to use. No behavior change.
-rw-r--r--Tests/LibGfx/TestImageDecoder.cpp10
-rw-r--r--Tests/LibGfx/test-inputs/4.webpbin0 -> 176972 bytes
-rw-r--r--Tests/LibGfx/test-inputs/5.webpbin82698 -> 0 bytes
3 files changed, 5 insertions, 5 deletions
diff --git a/Tests/LibGfx/TestImageDecoder.cpp b/Tests/LibGfx/TestImageDecoder.cpp
index 6900920b34..8b5333c605 100644
--- a/Tests/LibGfx/TestImageDecoder.cpp
+++ b/Tests/LibGfx/TestImageDecoder.cpp
@@ -404,13 +404,13 @@ TEST_CASE(test_webp_extended_lossy_uncompressed_alpha)
EXPECT_EQ(frame.image->get_pixel(355, 106), Gfx::Color(0, 0, 0, 0));
}
-TEST_CASE(test_webp_lossy_5)
+TEST_CASE(test_webp_lossy_4)
{
// This is https://commons.wikimedia.org/wiki/File:Fr%C3%BChling_bl%C3%BChender_Kirschenbaum.jpg,
// under the Creative Commons Attribution-Share Alike 3.0 Unported license. The image was re-encoded
// as webp at https://developers.google.com/speed/webp/gallery1 and the webp version is from there.
// No other changes have been made.
- auto file = MUST(Core::MappedFile::map(TEST_INPUT("5.webp"sv)));
+ auto file = MUST(Core::MappedFile::map(TEST_INPUT("4.webp"sv)));
EXPECT(Gfx::WebPImageDecoderPlugin::sniff(file->bytes()));
auto plugin_decoder = MUST(Gfx::WebPImageDecoderPlugin::create(file->bytes()));
MUST(plugin_decoder->initialize());
@@ -419,13 +419,13 @@ TEST_CASE(test_webp_lossy_5)
EXPECT(!plugin_decoder->is_animated());
EXPECT(!plugin_decoder->loop_count());
- EXPECT_EQ(plugin_decoder->size(), Gfx::IntSize(1024, 752));
+ EXPECT_EQ(plugin_decoder->size(), Gfx::IntSize(1024, 772));
auto frame = MUST(plugin_decoder->frame(0));
- EXPECT_EQ(frame.image->size(), Gfx::IntSize(1024, 752));
+ EXPECT_EQ(frame.image->size(), Gfx::IntSize(1024, 772));
// This image tests macroblocks that have `skip_coefficients` set to true, and it test a boolean entropy decoder edge case.
- EXPECT_EQ(frame.image->get_pixel(923, 576), Gfx::Color(0xab, 0x40, 0x14, 255));
+ EXPECT_EQ(frame.image->get_pixel(780, 570), Gfx::Color(0x72, 0xc8, 0xf6, 255));
}
TEST_CASE(test_webp_extended_lossless)
diff --git a/Tests/LibGfx/test-inputs/4.webp b/Tests/LibGfx/test-inputs/4.webp
new file mode 100644
index 0000000000..a608fc85c2
--- /dev/null
+++ b/Tests/LibGfx/test-inputs/4.webp
Binary files differ
diff --git a/Tests/LibGfx/test-inputs/5.webp b/Tests/LibGfx/test-inputs/5.webp
deleted file mode 100644
index 89e6075fde..0000000000
--- a/Tests/LibGfx/test-inputs/5.webp
+++ /dev/null
Binary files differ