mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 08:32:11 +01:00
std/jpeg: implement triangle-filter upsampling
"script/confirm-matches-djpeg.sh test/data/*.jpeg" is now all matches.
This commit is contained in:
1 parent
94df43c530
commit
a41149e73c
4 files changed
+507
-27
No files matched your search
+11
-5
@@ -523,14 +523,20 @@ test_wuffs_upsample_inv_h2v1() {
|
||||
};
|
||||
|
||||
const uint8_t want_array[32] = {
|
||||
0x41, 0x41, 0x20, 0x20, 0x6C, 0x6C, 0x6F, 0x6F, //
|
||||
0x76, 0x76, 0x65, 0x65, 0x6C, 0x6C, 0x79, 0x79, //
|
||||
0x20, 0x20, 0x65, 0x65, 0x78, 0x78, 0x61, 0x61, //
|
||||
0x6D, 0x6D, 0x70, 0x70, 0x6C, 0x6C, 0x65, 0x65, //
|
||||
// A box filter (nearest neighbor) would look like this:
|
||||
// 0x41, 0x41, 0x20, 0x20, 0x6C, 0x6C, 0x6F, 0x6F,
|
||||
// 0x76, 0x76, 0x65, 0x65, 0x6C, 0x6C, 0x79, 0x79,
|
||||
// 0x20, 0x20, 0x65, 0x65, 0x78, 0x78, 0x61, 0x61,
|
||||
// 0x6D, 0x6D, 0x70, 0x70, 0x6C, 0x6C, 0x65, 0x65,
|
||||
// We use a triangle filter instead, matching libjpeg-turbo.
|
||||
0x41, 0x39, 0x28, 0x33, 0x59, 0x6D, 0x6E, 0x71, //
|
||||
0x74, 0x72, 0x69, 0x67, 0x6A, 0x6F, 0x76, 0x63, //
|
||||
0x36, 0x31, 0x54, 0x6A, 0x73, 0x72, 0x67, 0x64, //
|
||||
0x6A, 0x6E, 0x6F, 0x6F, 0x6D, 0x6A, 0x67, 0x65, //
|
||||
};
|
||||
|
||||
const uint8_t* have_ptr =
|
||||
wuffs_base__pixel_swizzler__swizzle_ycc__upsample_inv_h2vn_box(
|
||||
wuffs_base__pixel_swizzler__swizzle_ycc__upsample_inv_h2v1_triangle(
|
||||
g_have_array_u8, src_array0, src_array0, 16, 0, true, true);
|
||||
|
||||
const bool closed = true;
|
||||
|
||||
@@ -25,7 +25,7 @@ f33b9bc1 test/data/artificial-gif/zero-width-frame.gif
|
||||
e08a7cc8 test/data/artificial-png/exif.png
|
||||
e08a7cc8 test/data/artificial-png/key-value-pairs.png
|
||||
076cb375 test/data/bricks-color.bmp
|
||||
96a13918 test/data/bricks-color.jpeg
|
||||
72a1f9cc test/data/bricks-color.jpeg
|
||||
076cb375 test/data/bricks-color.png
|
||||
076cb375 test/data/bricks-color.tga
|
||||
f36c2e80 test/data/bricks-dither.bmp
|
||||
@@ -49,11 +49,11 @@ aa3e6c7c test/data/crude-flag.nie
|
||||
3014b4c0 test/data/gifplayer-muybridge.gif
|
||||
030f5a48 test/data/harvesters.bmp
|
||||
c18b3d5a test/data/harvesters.gif
|
||||
3f0a404d test/data/harvesters.jpeg
|
||||
f217df74 test/data/harvesters.jpeg
|
||||
030f5a48 test/data/harvesters.png
|
||||
e776c90f test/data/hat.bmp
|
||||
6dcba6a4 test/data/hat.gif
|
||||
75f4f686 test/data/hat.jpeg
|
||||
2298f3ca test/data/hat.jpeg
|
||||
e776c90f test/data/hat.png
|
||||
d30bfe5d test/data/hat.wbmp
|
||||
33a44f22 test/data/hibiscus.primitive.bmp
|
||||
@@ -62,7 +62,7 @@ d30bfe5d test/data/hat.wbmp
|
||||
33a44f22 test/data/hibiscus.primitive.png
|
||||
60040742 test/data/hibiscus.regular.bmp
|
||||
b727da8b test/data/hibiscus.regular.gif
|
||||
886ee1a1 test/data/hibiscus.regular.jpeg
|
||||
41e39405 test/data/hibiscus.regular.jpeg
|
||||
60040742 test/data/hibiscus.regular.png
|
||||
dcbb225a test/data/hippopotamus.bmp
|
||||
ed4b78fc test/data/hippopotamus.interlaced.gif
|
||||
|
||||
Reference in new issue
Block a user