Nigel Tao
3b3331bbb3
wuffs gen -version=0.3.0-beta.12
2021-11-19 14:03:31 +11:00
Nigel Tao
e44920d382
Let gif "ignore too much" quirk skip lzw errors
...
The modified test/data/*/*.gif files differ by only one byte:
00000000 47 49 46 38 39 61 02 00 02 00 81 00 00 00 00 ff |GIF89a..........|
00000010 11 00 ff 22 00 ff 33 00 ff 2c 00 00 00 00 02 00 |..."..3..,......|
-00000020 02 00 00 02 02 84 f1 00 3b |........;|
+00000020 02 00 00 02 02 84 5d 00 3b |......].;|
The etc-good-lzw.gif bits have changed, even though the
etc-good-lzw.etc.txt file only had comments added, due to a Go standard
library change: "compress/lzw: output a Clear code first, per GIF spec"
https://github.com/golang/go/commit/9c1dbdf60edbffeff10f58af21fa055eb0fdd29f
Updates PR #57
Updates https://crbug.com/1270631
2021-11-19 13:30:23 +11:00
Nigel Tao
3b882be500
Rename test/.../pixel-data-too-much.gif*
2021-11-19 11:54:39 +11:00
Nigel Tao
6a8ee57ac0
Loosen test_wuffs_png_decode_metadata_kvp bound
2021-11-19 09:48:47 +11:00
Nigel Tao
66cfd3e02f
wuffs gen -version=0.3.0-beta.11
2021-11-18 19:19:02 +11:00
Nigel Tao
161e4730d8
Tweak default WUFFS_VERSION_PRE_RELEASE_LABEL
2021-11-18 19:18:34 +11:00
Nigel Tao
d5066c1aae
Add wuffs_aux::private_impl::ErrorMessages type
2021-11-18 17:30:11 +11:00
Nigel Tao
8562375fd9
Update test/nia-checksums-of-data.txt
2021-11-18 08:11:06 +11:00
Nigel Tao
bb028ae764
Update tests for artificial/* filename rename
2021-11-18 08:10:12 +11:00
Nigel Tao
29560a336b
Convert std/png text from Latin-1 to UTF-8
...
Fixes #55
2021-11-17 23:04:49 +11:00
Nigel Tao
e0cdaeb54f
Fix std/png tell_me_more minfo with suspensions
2021-11-17 13:04:04 +11:00
Nigel Tao
e7ed1dd43e
Add std/png tell_me_more while.loop name
2021-11-17 13:01:05 +11:00
Nigel Tao
bfce0e0a16
Let wuffs_aux::DecodeImage re-use raw metadata buf
2021-11-17 12:44:21 +11:00
Nigel Tao
417b03a0ad
Add std/png "#unsupported PNG compression method"
2021-11-17 12:07:44 +11:00
Nigel Tao
7dd0dd264b
Delete superfluous "// --------" comment
2021-11-17 12:03:43 +11:00
Nigel Tao
0d37acd6f6
Factor out std/png/common_consts.wuffs
2021-11-17 12:01:37 +11:00
Nigel Tao
6737565c20
Let std/png decode iTXt, tEXt and zTXt chunks
...
Updates #55
2021-11-17 11:56:49 +11:00
Nigel Tao
3642d73714
Factor test/data/artificial into many directories
2021-11-16 15:37:57 +11:00
Nigel Tao
37ac4def8e
Move some test/data/artificial files up one dir
2021-11-16 15:12:29 +11:00
Nigel Tao
07c053af6f
Have reset! LEAVE_INTERNAL_BUFFERS_UNINITIALIZED
2021-11-16 13:16:43 +11:00
Nigel Tao
f0c2a40d66
Resize std/png chunk_length field from u64 to u32
2021-11-16 13:06:30 +11:00
Nigel Tao
ce9ab13ecd
Let std/png decode first fcTL after the last IDAT
2021-11-16 12:55:43 +11:00
Nigel Tao
6c2a591e84
Let script/make-artificial.go generate PNG files
2021-11-16 11:08:04 +11:00
Nigel Tao
d40bf000a9
Rename wuffs_base__table_u8__row as etc__row_u32
2021-11-15 17:26:51 +11:00
Nigel Tao
0045ce49f3
Rename table.row as table.row_u32
2021-11-15 10:49:42 +11:00
Nigel Tao
fa56d92410
Clip std/png frame_dirty_rect to frame rect
2021-11-15 10:46:28 +11:00
Nigel Tao
8f1adea523
Hoist subslice out of std/png filter_and_swizzle
...
On an Intel NUC (Comet Lake, BXNUC10i5FNKPA):
name old speed new speed delta
wuffs_png_decode_image_19k_8bpp/clang9 274MB/s ± 0% 273MB/s ± 0% -0.25% (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/clang9 309MB/s ± 0% 308MB/s ± 0% -0.22% (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/clang9 985MB/s ± 0% 982MB/s ± 0% -0.29% (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9 846MB/s ± 0% 841MB/s ± 0% -0.56% (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9 812MB/s ± 0% 808MB/s ± 0% -0.55% (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/clang9 320MB/s ± 0% 320MB/s ± 0% -0.15% (p=0.008 n=5+5)
wuffs_png_decode_image_19k_8bpp/gcc10 263MB/s ± 0% 276MB/s ± 0% +5.00% (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/gcc10 328MB/s ± 0% 333MB/s ± 0% +1.49% (p=0.016 n=5+4)
wuffs_png_decode_image_77k_8bpp/gcc10 950MB/s ± 0% 976MB/s ± 0% +2.78% (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10 865MB/s ± 0% 912MB/s ± 0% +5.45% (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10 825MB/s ± 0% 868MB/s ± 0% +5.19% (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/gcc10 336MB/s ± 0% 341MB/s ± 0% +1.37% (p=0.008 n=5+5)
2021-11-15 10:43:55 +11:00
Nigel Tao
962a515dd2
Add wuffs_base__table_u8__subtable_ij
2021-11-15 09:58:02 +11:00
Nigel Tao
8025bf1bd7
Fix std/png filter benches
2021-11-14 21:20:05 +11:00
Nigel Tao
4d64aff554
Rename std/png/decode_swizzle_fallback.wuffs
2021-11-14 19:58:23 +11:00
Nigel Tao
54bdcc1b57
Update wuffs_aux::DecodeImageArgFlags comment
2021-11-14 19:57:18 +11:00
Nigel Tao
a4fa6a2554
Let std/png decode (animated) APNG
...
The test/nia-checksums-of-data.txt checksums for the *.apng files now
match the (multiple frame) *.gif files. Previously, they matched the
(single frame) *.000000.nie files.
Fixes #41
2021-11-14 18:20:15 +11:00
Nigel Tao
22eed1fd8d
Let example/convert-to-nia decode NIE
2021-11-13 11:21:35 +11:00
Nigel Tao
c19e3b1cab
Add script/extract-nia-frames.go
2021-11-11 11:47:08 +11:00
Nigel Tao
9af2666aec
Move std/png first_frame_io_position earlier
2021-11-10 16:52:59 +11:00
Nigel Tao
9c3d27fb43
Fix std/png decode_other_chunk skipping chunks
2021-11-09 22:10:00 +11:00
Nigel Tao
2373340f83
Add base.ANIMATION_DISPOSAL__ETC constants
2021-11-09 09:53:29 +11:00
Nigel Tao
e847766b02
Tweak std/png decode_other_chunk if-else chain
2021-11-09 09:05:11 +11:00
Nigel Tao
74c1dfce96
Rename std/gif num_loops field
2021-11-09 08:55:15 +11:00
Nigel Tao
f4c2d4652e
Fix test/data/animated-red-blue.apng loop count
...
The diff of the "hd" hex dump shows that the acTL chunk's nominal loop
count changed from 2 to 3. The 4-byte CRC-32 checksum was also updated.
00000000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 |.PNG........IHDR|
00000010 00 00 00 40 00 00 00 30 08 02 00 00 00 2e 29 eb |...@...0......).|
00000020 48 00 00 00 08 61 63 54 4c 00 00 00 04 00 00 00 |H....acTL.......|
-00000030 02 92 c3 07 fc 00 00 00 06 74 52 4e 53 00 00 00 |.........tRNS...|
+00000030 03 e5 c4 37 6a 00 00 00 06 74 52 4e 53 00 00 00 |...7j....tRNS...|
00000040 00 00 10 73 11 17 f5 00 00 00 1a 66 63 54 4c 00 |...s.......fcTL.|
00000050 00 00 00 00 00 00 40 00 00 00 30 00 00 00 00 00 |......@...0.....|
00000060 00 00 00 00 0a 00 64 00 00 80 50 f1 a2 00 00 03 |......d...P.....|
2021-11-07 10:43:32 +11:00
Nigel Tao
ca76a01ac2
Have std/png support remapped transparency
2021-11-07 09:51:04 +11:00
Nigel Tao
00b329872a
Tighten png.INTERLACING type refinement
2021-11-06 09:54:56 +11:00
Nigel Tao
0a7168fd64
Add test/data/*.apng
2021-11-05 22:28:08 +11:00
Nigel Tao
f854646586
Fix -Wshadow warnings
2021-11-05 17:51:22 +11:00
Nigel Tao
f148f5c5b3
Make "// - etc" bullet point comments consistent
2021-11-05 16:50:38 +11:00
Nigel Tao
750df217dd
Rename deprecated ETC__FLAVOR__METADATA
2021-11-05 16:48:58 +11:00
Nigel Tao
744fbdd732
Have std/png decode iCCP chunks
...
Updates #39
2021-11-05 16:29:11 +11:00
Nigel Tao
0854344580
Add wuffs_aux::sync_io::DynIOBuffer
2021-11-04 22:58:45 +11:00
Nigel Tao
d5075c7e94
Push "int i" into "for (int i = etc; etc; etc)"
2021-11-02 14:07:58 +11:00
Nigel Tao
16b51dd2a4
Fix -Wshadow warnings
2021-10-31 16:27:47 +11:00
Nigel Tao
badce3ffa4
Tweak magic_number_guess_fourcc negative codes
2021-10-31 16:27:17 +11:00
Nigel Tao
f40ef01244
Have make-red-blue-gradient use iCCP profile name
2021-10-31 15:35:14 +11:00
Nigel Tao
8f9a4f40c2
Rename METADATA_RAW as METADATA_RAW_PASSTHROUGH
2021-10-31 15:17:46 +11:00
Nigel Tao
c754f81634
Have wuffs_aux::DecodeImage report ICCP, XMP
2021-10-31 15:09:55 +11:00
Nigel Tao
a9a6332be2
Have etc__magic_number_guess_fourcc find ICO
2021-10-22 15:51:44 +11:00
Nigel Tao
d557bc3836
Embiggen test/data/red-blue-gradient.*.png
2021-10-22 09:23:49 +11:00
Nigel Tao
01a5b8842b
Update test/nia-checksums-of-data.txt
2021-10-20 19:38:43 +11:00
Nigel Tao
35cb4df973
Rename test/data/red-blue-gradient.dcip3d65.png
2021-10-20 19:38:24 +11:00
Nigel Tao
15b6285d1c
Add example/imageviewer -screen_gamma=N.N flag
2021-10-20 15:42:26 +11:00
Nigel Tao
6ea3144379
Add test/data/checkerboard.*.png
2021-10-20 09:58:42 +11:00
Nigel Tao
b003f9fe65
Let wuffs_aux::DecodeImage handle metadata
...
Updates #39
2021-10-19 22:09:21 +11:00
Nigel Tao
d259f7a579
Fix json_fuzzer for wuffs_aux::FooArgBar types
2021-10-18 00:46:50 +11:00
Nigel Tao
2b7b6e12ea
Add wuffs_aux::DecodeImageArgQuirks
2021-10-18 00:40:11 +11:00
Nigel Tao
ca33506c01
Add wuffs_aux::FooArgBar types for optional args
...
Prior to this commit, with a "wuffs_aux::Foo(x, y, 0, 0, 4, 5)" call,
with arguments after "y" optional, it was not a compile-time error to
give the wrong number of "0"s or to transpose "4" and "5".
2021-10-18 00:25:13 +11:00
Nigel Tao
0460bfcd7a
Add FourCC comment
2021-10-17 23:18:58 +11:00
Nigel Tao
9437d1a265
Tighten magic number guessing for WBMP
2021-10-17 22:57:42 +11:00
Nigel Tao
2e821791a9
Update test/nia-checksums-of-data.txt
2021-10-17 13:08:24 +11:00
Nigel Tao
e317f04bfd
Add defined(__clang__) to defined(__GNUC__) checks
2021-10-17 12:14:54 +11:00
Nigel Tao
db5a407bab
Have std/png decode sRGB chunks
...
Updates #39
2021-10-16 09:27:30 +11:00
Nigel Tao
9323549eeb
Update doc/changelog.md
2021-10-15 16:34:04 +11:00
Nigel Tao
911049e9f9
Have std/png decode cHRM and gAMA chunks
...
Updates #39
2021-10-15 15:08:47 +11:00
Nigel Tao
ae9ca94501
Fix etc__more_information__metadata_parsed__chrm
2021-10-15 14:15:39 +11:00
Nigel Tao
d8ad363ef5
Tweak png.decoder.decode_image_config indentation
2021-10-15 13:35:15 +11:00
Nigel Tao
e6733aec19
Add test/data/red-blue-gradient.dcip3d65.png
2021-10-15 11:29:26 +11:00
Nigel Tao
ad1d983698
Add ETC__MORE_INFORMATION__FLAVOR__METADATA_PARSED
2021-10-14 17:17:11 +11:00
Nigel Tao
dbc209dd7e
Add test/data/red-blue-gradient.*.png
2021-10-14 15:58:03 +11:00
Nigel Tao
1a94a6f1b3
Choose fuzzer's static-ness on program vs library
...
Some sanitizers don't work well with static functions.
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39767
2021-10-10 10:46:05 +11:00
Nigel Tao
34e2786dd2
wuffs gen -version=0.3.0-beta.10
2021-10-07 17:03:51 +11:00
Nigel Tao
5a4dd303f0
Remove hippopotamus.interlaced.png "wuffs test"
...
Coverage now comes from build-all.sh's nia-checksums-of-data.txt test.
2021-10-07 16:52:17 +11:00
Nigel Tao
62125d8967
Add test/nia-checksums-of-data.txt
2021-10-07 16:49:38 +11:00
Nigel Tao
eb6703425a
Tweak build-*.sh "Wuffs root directory" check
2021-10-07 14:59:13 +11:00
Nigel Tao
6fb7697b4a
Have scripts use WUFFS_CONFIG__STATIC_FUNCTIONS
2021-10-07 14:36:35 +11:00
Nigel Tao
55784030e4
Have fuzzers use WUFFS_CONFIG__STATIC_FUNCTIONS
...
Compile time:
$ time ./build-fuzz.sh
Before: user 0m36.656s
After: user 0m18.534s
2021-10-07 14:26:08 +11:00
Nigel Tao
feb050b418
Add CFLAGS, CXXFLAGS, LDFLAGS to build-fuzz.sh
2021-10-07 14:12:16 +11:00
Nigel Tao
f9c029c788
Fix std/png history_position for interlacing
2021-10-07 13:52:40 +11:00
Nigel Tao
90d3232eae
Let example/imageviewer minify (negative zoom)
2021-10-07 12:59:38 +11:00
Nigel Tao
2945ef2b29
Have example/imageviewer avoid big xcb_image_put's
2021-10-07 12:35:12 +11:00
Nigel Tao
ea4c85bfa2
Add comment re previous commit (strip examples)
2021-10-04 23:37:37 +11:00
Nigel Tao
41fce8a8de
Strip examples of unused data and functions
...
Compile time:
$ time ./build-example.sh
Before: user 0m40.885s
After: user 0m41.011s
Binary size (for example-toy-genlib):
$ ls -l gen/bin/example-toy-genlib) | awk '{print $5}'
Before: 830168
After: 809896
Note that the majority of this is a statically linked libc.
Binary size (excluding the statically linked example-toy-genlib):
$ ls -l gen/bin/example-* | awk '{print $5 " " $9}'
Before:
85280 gen/bin/example-cbor-to-json
242216 gen/bin/example-convert-to-nia
37112 gen/bin/example-crc32
53328 gen/bin/example-gifplayer
282840 gen/bin/example-imageviewer
95152 gen/bin/example-json-to-cbor
122720 gen/bin/example-jsonfindptrs
60448 gen/bin/example-jsonptr
267672 gen/bin/example-sdl-imageviewer
64792 gen/bin/example-zcat
After:
73104 gen/bin/example-cbor-to-json
231560 gen/bin/example-convert-to-nia
34640 gen/bin/example-crc32
47632 gen/bin/example-gifplayer
269632 gen/bin/example-imageviewer
83032 gen/bin/example-json-to-cbor
118664 gen/bin/example-jsonfindptrs
58040 gen/bin/example-jsonptr
253424 gen/bin/example-sdl-imageviewer
58200 gen/bin/example-zcat
Before total: 1311560
After total: 1227928
2021-10-04 13:28:42 +11:00
Nigel Tao
9699c49f55
Have example/crc32 use WUFFS_CONFIG__MODULES
...
Compile time:
$ time ./build-example.sh example/crc32
Before: user 10.637s
After: user 1.314s
Binary size:
$ ls -l gen/bin/example-crc32 | awk '{print $5}'
Before: 344744
After: 37112
2021-10-04 13:03:27 +11:00
Nigel Tao
7f9f37ce5a
Have examples use WUFFS_CONFIG__STATIC_FUNCTIONS
...
Compile time:
$ time ./build-example.sh
Before: user 1m15.750s
After: user 0m50.343s
Binary size (excluding the statically linked example-toy-genlib):
$ ls -l gen/bin/example-* | awk '{print $5 " " $9}'
Before:
212624 gen/bin/example-cbor-to-json
284192 gen/bin/example-convert-to-nia
344744 gen/bin/example-crc32
184304 gen/bin/example-gifplayer
324952 gen/bin/example-imageviewer
209632 gen/bin/example-json-to-cbor
241432 gen/bin/example-jsonfindptrs
196320 gen/bin/example-jsonptr
309768 gen/bin/example-sdl-imageviewer
200704 gen/bin/example-zcat
After:
85280 gen/bin/example-cbor-to-json
242216 gen/bin/example-convert-to-nia
344744 gen/bin/example-crc32
53328 gen/bin/example-gifplayer
282840 gen/bin/example-imageviewer
95152 gen/bin/example-json-to-cbor
122720 gen/bin/example-jsonfindptrs
60448 gen/bin/example-jsonptr
267672 gen/bin/example-sdl-imageviewer
64792 gen/bin/example-zcat
Before total: 2508672
After total: 1619192
2021-10-04 12:35:32 +11:00
Nigel Tao
774340ae27
Add CFLAGS, CXXFLAGS, LDFLAGS to build-example.sh
2021-10-04 12:31:34 +11:00
Nigel Tao
7753368324
Add const to example/imageviewer zooms variable
2021-10-04 09:33:33 +11:00
Nigel Tao
8eaa222592
Add example/imageviewer zoom and filter
2021-10-03 16:42:58 +11:00
Nigel Tao
1cf0df9da4
Tweak example{,sdl-}imageviewer
2021-10-03 15:30:04 +11:00
Nigel Tao
68acf24515
Remove Makefiles
...
They don't work for me (on Debian bullseye). For example, from the
example/sdl-imageviewer directory:
$ make
g++ -lSDL2 -lSDL2_image sdl-imageviewer.cc -o sdl-imageviewer
/usr/bin/ld: /tmp/cciX1mj2.o: in function `draw(SDL_Window*)':
sdl-imageviewer.cc:(.text+0x36e44): undefined reference to `SDL_GetWindowSurface'
/usr/bin/ld: sdl-imageviewer.cc:(.text+0x36e69): undefined reference to `SDL_CreateRenderer'
/usr/bin/ld: sdl-imageviewer.cc:(.text+0x36e79): undefined reference to `SDL_RenderClear'
etc
collect2: error: ld returned 1 exit status
make: *** [<builtin>: sdl-imageviewer] Error 1
Swapping the g++ args around to
g++ sdl-imageviewer.cc -lSDL2 -lSDL2_image -o sdl-imageviewer
works, but the recommended approach is to use the existing top-level
build-example.sh script instead.
2021-10-03 14:06:16 +11:00
Nigel Tao
2453a8d52a
Run "clang-format-9 -style=Chromium"
...
Also replace /*...*/ comments with //... comments. The former don't nest
when using /*...*/ to comment out blocks of code.
2021-10-03 13:53:27 +11:00
Nigel Tao
bb7b75ff86
Add Přemysl Eric Janouch to A+C
2021-10-03 13:34:48 +11:00
Nigel Tao
66bcef6fff
Merge pull request #54 from pjanx/main
...
Fix both imageviewers on X.org with DefaultDepth 30
2021-10-03 13:33:29 +11:00
Nigel Tao
de45ab1d2b
Add archive.password-is-asdf.zip
...
$ zip --password asdf archive.password-is-asdf.zip etc etc
2021-09-21 11:54:02 +10:00