mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
std/webp: implement VP8 Lossless
This commit is contained in:
1 parent
09f4500e19
commit
00e6e71672
8 files changed
+5778
-83
No files matched your search
@@ -30,7 +30,6 @@ OK. d9f8441c test/3pdata/blinksuite/blue-10.png
|
||||
OK. 267741e0 test/3pdata/blinksuite/blue-100.png
|
||||
OK. 89449c01 test/3pdata/blinksuite/blue-wheel-srgb-color-profile.jpg
|
||||
OK. 8fce70a9 test/3pdata/blinksuite/blue-wheel-srgb-color-profile.png
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/blue-wheel-srgb-color-profile.webp
|
||||
OK. 2d7bad9f test/3pdata/blinksuite/border-image-srgb-color-profile.png
|
||||
OK. 9ca73f21 test/3pdata/blinksuite/border-image.png
|
||||
OK. 277600f9 test/3pdata/blinksuite/boston.gif
|
||||
@@ -43,8 +42,6 @@ OK. 5ec78d7c test/3pdata/blinksuite/color-checker-adobe-color-profile.png
|
||||
OK. b3389858 test/3pdata/blinksuite/color-checker-srgb-color-profile.png
|
||||
OK. 10721531 test/3pdata/blinksuite/count-down-color-test.gif
|
||||
OK. 1abc4dc6 test/3pdata/blinksuite/count-down-color-test.png
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/count-down-color-test.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/crbug.364830.webp
|
||||
OK. 24ab1efd test/3pdata/blinksuite/crbug779261.gif
|
||||
OK. ae034abe test/3pdata/blinksuite/crbug807324.png
|
||||
OK. 4f50fdb0 test/3pdata/blinksuite/crbug827754.png
|
||||
@@ -69,7 +66,6 @@ OK. d97ce4e8 test/3pdata/blinksuite/cs-uma-ycbcr-other.jpg
|
||||
OK. a2a940bc test/3pdata/blinksuite/cs-uma-ycck.jpg
|
||||
OK. b6000be6 test/3pdata/blinksuite/dice.png
|
||||
BAD 1023c20a test/3pdata/blinksuite/empty-frame.png
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/flip.webp
|
||||
OK. eff36075 test/3pdata/blinksuite/flowchart.jpg
|
||||
OK. 20ff1df8 test/3pdata/blinksuite/full2loop.gif
|
||||
OK. dc814e29 test/3pdata/blinksuite/gif-loop-count.gif
|
||||
@@ -93,14 +89,8 @@ OK. 95641cb9 test/3pdata/blinksuite/icc-v2-gbr-420-height-not-whole-mcu.jpg
|
||||
OK. 93f21c2a test/3pdata/blinksuite/icc-v2-gbr-420-width-not-whole-mcu.jpg
|
||||
OK. f37cea44 test/3pdata/blinksuite/icc-v2-gbr-422-whole-mcus.jpg
|
||||
OK. 1de5a906 test/3pdata/blinksuite/icc-v2-gbr.jpg
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/invalid-animated-webp.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/invalid-animated-webp2.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/invalid-animated-webp3.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/invalid-animated-webp4.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/invalid_vp8_vp8x.webp
|
||||
OK. 0da5f37e test/3pdata/blinksuite/jpeg-height-exif-orientation.jpg
|
||||
OK. 4409dca6 test/3pdata/blinksuite/large-gif-checkerboard.gif
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/large.webp
|
||||
BAD 2f310e57 test/3pdata/blinksuite/missing-eoi.jpg
|
||||
OK. 72bbe2b6 test/3pdata/blinksuite/motion-jpeg-single-frame.jpg
|
||||
OK. 0268284a test/3pdata/blinksuite/mu.png
|
||||
@@ -171,7 +161,7 @@ OK. bfebcca4 test/3pdata/blinksuite/rgb-jpeg-red.jpg
|
||||
OK. 6ed3c2e7 test/3pdata/blinksuite/rgb-jpeg-with-adobe-marker-only.jpg
|
||||
OK. cfb6f39d test/3pdata/blinksuite/rgb-png-with-cmyk-color-profile.png
|
||||
OK. a3454fb7 test/3pdata/blinksuite/short-app-extension-string.gif
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/size-failure.b186640109.webp
|
||||
OK. 7c80a001 test/3pdata/blinksuite/size-failure.b186640109.webp
|
||||
BAD 2398258b test/3pdata/blinksuite/size-failure.gif
|
||||
OK. 5c4b1a8b test/3pdata/blinksuite/small-square-with-colorspin-profile.jpg
|
||||
OK. 44dc95b9 test/3pdata/blinksuite/sprite_all_fragments_same.png
|
||||
@@ -179,25 +169,7 @@ OK. 9a7e5ec7 test/3pdata/blinksuite/sprite_alternate_fragments_same.png
|
||||
OK. 1b1f5f96 test/3pdata/blinksuite/stripes-large.png
|
||||
OK. 6b85cdb9 test/3pdata/blinksuite/stripes-small.png
|
||||
OK. 16c2c0fe test/3pdata/blinksuite/test-load.jpg
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/test.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/test2.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/test3.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/truncated.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/truncated2.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-animated-icc-xmp.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-animated-large.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-animated-no-blend.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-animated-opaque.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-animated-semitransparent1.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-animated-semitransparent2.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-animated-semitransparent3.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-animated-semitransparent4.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-animated.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-color-no-profile-lossy.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-color-profile-crash.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-color-profile-lossless.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-color-profile-lossy-alpha.webp
|
||||
OK. 2ef5fd5d test/3pdata/blinksuite/webp-color-profile-lossy.webp
|
||||
OK. 19d3a207 test/3pdata/blinksuite/test3.webp
|
||||
BAD ed67a9a5 test/3pdata/blinksuite/wrong-block-length.gif
|
||||
OK. 577c5c4c test/3pdata/blinksuite/ycbcr-420-fast-int-progressive.jpg
|
||||
OK. bf4cd8e2 test/3pdata/blinksuite/ycbcr-420-float-progressive.jpg
|
||||
|
||||
+9
-7
@@ -64,6 +64,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the
|
||||
// No mimic library.
|
||||
#endif
|
||||
|
||||
static wuffs_webp__decoder g_webp_decoder;
|
||||
|
||||
// ---------------- WebP Tests
|
||||
|
||||
const char* //
|
||||
@@ -74,12 +76,12 @@ wuffs_webp_decode(uint64_t* n_bytes_out,
|
||||
uint32_t* quirks_ptr,
|
||||
size_t quirks_len,
|
||||
wuffs_base__io_buffer* src) {
|
||||
wuffs_webp__decoder dec;
|
||||
wuffs_webp__decoder* dec = &g_webp_decoder;
|
||||
CHECK_STATUS("initialize",
|
||||
wuffs_webp__decoder__initialize(&dec, sizeof dec, WUFFS_VERSION,
|
||||
wuffs_webp__decoder__initialize(dec, sizeof *dec, WUFFS_VERSION,
|
||||
wuffs_initialize_flags));
|
||||
return do_run__wuffs_base__image_decoder(
|
||||
wuffs_webp__decoder__upcast_as__wuffs_base__image_decoder(&dec),
|
||||
wuffs_webp__decoder__upcast_as__wuffs_base__image_decoder(dec),
|
||||
n_bytes_out, dst, pixfmt, quirks_ptr, quirks_len, src);
|
||||
}
|
||||
|
||||
@@ -88,15 +90,15 @@ wuffs_webp_decode(uint64_t* n_bytes_out,
|
||||
const char* //
|
||||
test_wuffs_webp_decode_interface() {
|
||||
CHECK_FOCUS(__func__);
|
||||
wuffs_webp__decoder dec;
|
||||
wuffs_webp__decoder* dec = &g_webp_decoder;
|
||||
CHECK_STATUS("initialize",
|
||||
wuffs_webp__decoder__initialize(
|
||||
&dec, sizeof dec, WUFFS_VERSION,
|
||||
dec, sizeof *dec, WUFFS_VERSION,
|
||||
WUFFS_INITIALIZE__LEAVE_INTERNAL_BUFFERS_UNINITIALIZED));
|
||||
return do_test__wuffs_base__image_decoder(
|
||||
wuffs_webp__decoder__upcast_as__wuffs_base__image_decoder(&dec),
|
||||
wuffs_webp__decoder__upcast_as__wuffs_base__image_decoder(dec),
|
||||
"test/data/bricks-color.lossless.webp", 0, SIZE_MAX, 160, 120,
|
||||
0x00000000);
|
||||
0xFF022460);
|
||||
}
|
||||
|
||||
// ---------------- Mimic Tests
|
||||
|
||||
@@ -26,26 +26,24 @@ OK. e08a7cc8 test/data/artificial-png/exif.png
|
||||
OK. e08a7cc8 test/data/artificial-png/key-value-pairs.png
|
||||
OK. 076cb375 test/data/bricks-color.bmp
|
||||
OK. 72a1f9cc test/data/bricks-color.jpeg
|
||||
OK. 2ef5fd5d test/data/bricks-color.lossless.webp
|
||||
OK. 2ef5fd5d test/data/bricks-color.lossy.webp
|
||||
OK. 076cb375 test/data/bricks-color.lossless.webp
|
||||
OK. 076cb375 test/data/bricks-color.png
|
||||
OK. 076cb375 test/data/bricks-color.tga
|
||||
OK. f36c2e80 test/data/bricks-dither.bmp
|
||||
OK. f36c2e80 test/data/bricks-dither.gif
|
||||
OK. 2ef5fd5d test/data/bricks-dither.lossless.webp
|
||||
OK. f36c2e80 test/data/bricks-dither.lossless.webp
|
||||
OK. f36c2e80 test/data/bricks-dither.no-ancillary.png
|
||||
OK. f36c2e80 test/data/bricks-dither.png
|
||||
OK. c2bce675 test/data/bricks-gray.bmp
|
||||
OK. c2bce675 test/data/bricks-gray.gif
|
||||
OK. 3a2478ad test/data/bricks-gray.jpeg
|
||||
OK. 2ef5fd5d test/data/bricks-gray.lossless.webp
|
||||
OK. 2ef5fd5d test/data/bricks-gray.lossy.webp
|
||||
OK. c2bce675 test/data/bricks-gray.lossless.webp
|
||||
OK. c2bce675 test/data/bricks-gray.no-ancillary.png
|
||||
OK. c2bce675 test/data/bricks-gray.png
|
||||
OK. c2bce675 test/data/bricks-gray.tga
|
||||
OK. 7aebfe6c test/data/bricks-nodither.bmp
|
||||
OK. 7aebfe6c test/data/bricks-nodither.gif
|
||||
OK. 2ef5fd5d test/data/bricks-nodither.lossless.webp
|
||||
OK. 7aebfe6c test/data/bricks-nodither.lossless.webp
|
||||
OK. 7aebfe6c test/data/bricks-nodither.png
|
||||
OK. 7aebfe6c test/data/bricks-nodither.tga
|
||||
OK. ae2e547d test/data/bricks-nodither.wbmp
|
||||
@@ -56,27 +54,23 @@ OK. 3014b4c0 test/data/gifplayer-muybridge.gif
|
||||
OK. 030f5a48 test/data/harvesters.bmp
|
||||
OK. c18b3d5a test/data/harvesters.gif
|
||||
OK. f217df74 test/data/harvesters.jpeg
|
||||
OK. 2ef5fd5d test/data/harvesters.lossless.webp
|
||||
OK. 2ef5fd5d test/data/harvesters.lossy.webp
|
||||
OK. 030f5a48 test/data/harvesters.lossless.webp
|
||||
OK. 030f5a48 test/data/harvesters.png
|
||||
OK. e776c90f test/data/hat.bmp
|
||||
OK. 6dcba6a4 test/data/hat.gif
|
||||
OK. 2298f3ca test/data/hat.jpeg
|
||||
OK. 2ef5fd5d test/data/hat.lossless.webp
|
||||
OK. 2ef5fd5d test/data/hat.lossy.webp
|
||||
OK. e776c90f test/data/hat.lossless.webp
|
||||
OK. e776c90f test/data/hat.png
|
||||
OK. d30bfe5d test/data/hat.wbmp
|
||||
OK. 33a44f22 test/data/hibiscus.primitive.bmp
|
||||
OK. 25e212b3 test/data/hibiscus.primitive.gif
|
||||
OK. 9624fa44 test/data/hibiscus.primitive.jpeg
|
||||
OK. 2ef5fd5d test/data/hibiscus.primitive.lossless.webp
|
||||
OK. 2ef5fd5d test/data/hibiscus.primitive.lossy.webp
|
||||
OK. 33a44f22 test/data/hibiscus.primitive.lossless.webp
|
||||
OK. 33a44f22 test/data/hibiscus.primitive.png
|
||||
OK. 60040742 test/data/hibiscus.regular.bmp
|
||||
OK. b727da8b test/data/hibiscus.regular.gif
|
||||
OK. 41e39405 test/data/hibiscus.regular.jpeg
|
||||
OK. 2ef5fd5d test/data/hibiscus.regular.lossless.webp
|
||||
OK. 2ef5fd5d test/data/hibiscus.regular.lossy.webp
|
||||
OK. 60040742 test/data/hibiscus.regular.lossless.webp
|
||||
OK. 60040742 test/data/hibiscus.regular.png
|
||||
OK. dcbb225a test/data/hippopotamus.bmp
|
||||
OK. ed4b78fc test/data/hippopotamus.interlaced.gif
|
||||
@@ -84,8 +78,7 @@ OK. dcbb225a test/data/hippopotamus.interlaced.png
|
||||
BAD c3c4bd65 test/data/hippopotamus.interlaced.truncated.gif
|
||||
BAD 7c6a771b test/data/hippopotamus.interlaced.truncated.png
|
||||
OK. 96bdbbb3 test/data/hippopotamus.jpeg
|
||||
OK. 2ef5fd5d test/data/hippopotamus.lossless.webp
|
||||
OK. 2ef5fd5d test/data/hippopotamus.lossy.webp
|
||||
OK. dcbb225a test/data/hippopotamus.lossless.webp
|
||||
OK. d3bbed27 test/data/hippopotamus.masked-with-muybridge.gif
|
||||
OK. 7e6acf01 test/data/hippopotamus.masked-with-muybridge.png
|
||||
OK. dcbb225a test/data/hippopotamus.nie
|
||||
@@ -130,8 +123,7 @@ OK. d42a13cd test/data/peacock.s2x2-420.jpeg
|
||||
OK. bf7e8c96 test/data/pjw-thumbnail.bmp
|
||||
OK. bf7e8c96 test/data/pjw-thumbnail.gif
|
||||
OK. 7c67a37f test/data/pjw-thumbnail.jpeg
|
||||
OK. 2ef5fd5d test/data/pjw-thumbnail.lossless.webp
|
||||
OK. 2ef5fd5d test/data/pjw-thumbnail.lossy.webp
|
||||
OK. bf7e8c96 test/data/pjw-thumbnail.lossless.webp
|
||||
OK. bf7e8c96 test/data/pjw-thumbnail.png
|
||||
OK. 38cb4cbf test/data/red-blue-gradient.dcip3d65-no-chrm-no-gama.png
|
||||
OK. 38cb4cbf test/data/red-blue-gradient.gamma1dot0.png
|
||||
|
||||
Reference in new issue
Block a user