mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
std/lzw: add "#truncated input" error
name old speed new speed delta wuffs_gif_decode_1k_bw/clang11 659MB/s ± 0% 748MB/s ± 0% +13.43% (p=0.008 n=5+5) wuffs_gif_decode_1k_color_full_init/clang11 182MB/s ± 0% 178MB/s ± 0% -2.17% (p=0.008 n=5+5) wuffs_gif_decode_1k_color_part_init/clang11 223MB/s ± 0% 219MB/s ± 0% -2.00% (p=0.008 n=5+5) wuffs_gif_decode_10k_bgra/clang11 799MB/s ± 0% 795MB/s ± 0% -0.52% (p=0.008 n=5+5) wuffs_gif_decode_10k_indexed/clang11 211MB/s ± 0% 210MB/s ± 0% -0.47% (p=0.008 n=5+5) wuffs_gif_decode_20k/clang11 250MB/s ± 1% 254MB/s ± 0% +1.75% (p=0.008 n=5+5) wuffs_gif_decode_100k_artificial/clang11 581MB/s ± 0% 568MB/s ± 0% -2.09% (p=0.008 n=5+5) wuffs_gif_decode_100k_realistic/clang11 221MB/s ± 0% 221MB/s ± 0% ~ (p=0.690 n=5+5) wuffs_gif_decode_1000k_full_init/clang11 222MB/s ± 0% 224MB/s ± 0% +0.65% (p=0.008 n=5+5) wuffs_gif_decode_1000k_part_init/clang11 223MB/s ± 0% 224MB/s ± 0% +0.58% (p=0.008 n=5+5) wuffs_gif_decode_anim_screencap/clang11 1.28GB/s ± 0% 1.30GB/s ± 0% +1.45% (p=0.008 n=5+5) wuffs_gif_decode_1k_bw/gcc10 595MB/s ± 0% 642MB/s ± 0% +7.91% (p=0.008 n=5+5) wuffs_gif_decode_1k_color_full_init/gcc10 168MB/s ± 0% 169MB/s ± 0% +0.36% (p=0.008 n=5+5) wuffs_gif_decode_1k_color_part_init/gcc10 202MB/s ± 0% 203MB/s ± 0% +0.46% (p=0.008 n=5+5) wuffs_gif_decode_10k_bgra/gcc10 790MB/s ± 0% 798MB/s ± 0% +1.04% (p=0.008 n=5+5) wuffs_gif_decode_10k_indexed/gcc10 208MB/s ± 0% 210MB/s ± 0% +1.00% (p=0.008 n=5+5) wuffs_gif_decode_20k/gcc10 258MB/s ± 0% 266MB/s ± 0% +3.08% (p=0.008 n=5+5) wuffs_gif_decode_100k_artificial/gcc10 566MB/s ± 0% 577MB/s ± 0% +1.83% (p=0.008 n=5+5) wuffs_gif_decode_100k_realistic/gcc10 220MB/s ± 0% 227MB/s ± 0% +3.03% (p=0.008 n=5+5) wuffs_gif_decode_1000k_full_init/gcc10 223MB/s ± 0% 231MB/s ± 0% +3.23% (p=0.008 n=5+5) wuffs_gif_decode_1000k_part_init/gcc10 224MB/s ± 0% 231MB/s ± 0% +3.14% (p=0.008 n=5+5) wuffs_gif_decode_anim_screencap/gcc10 1.30GB/s ± 0% 1.32GB/s ± 0% +1.70% (p=0.008 n=5+5) wuffs_lzw_decode_20k/clang11 294MB/s ± 0% 321MB/s ± 0% +9.11% (p=0.008 n=5+5) wuffs_lzw_decode_100k/clang11 533MB/s ± 0% 560MB/s ± 0% +5.13% (p=0.008 n=5+5) wuffs_lzw_decode_20k/gcc10 271MB/s ± 0% 272MB/s ± 0% +0.55% (p=0.008 n=5+5) wuffs_lzw_decode_100k/gcc10 527MB/s ± 0% 521MB/s ± 0% -1.31% (p=0.008 n=5+5) Updates #96
This commit is contained in:
1 parent
5640296546
commit
48e69da5af
4 files changed
+71
-10
No files matched your search
@@ -79,6 +79,35 @@ test_wuffs_lzw_decode_interface() {
|
||||
"test/data/bricks-nodither.indexes.giflzw", 1, SIZE_MAX, 19200, 0x4F);
|
||||
}
|
||||
|
||||
const char* //
|
||||
test_wuffs_lzw_decode_truncated_input() {
|
||||
CHECK_FOCUS(__func__);
|
||||
|
||||
wuffs_base__io_buffer have = wuffs_base__ptr_u8__writer(g_have_array_u8, 1);
|
||||
wuffs_base__io_buffer src =
|
||||
wuffs_base__ptr_u8__reader(g_src_array_u8, 0, false);
|
||||
wuffs_lzw__decoder dec;
|
||||
CHECK_STATUS("initialize",
|
||||
wuffs_lzw__decoder__initialize(
|
||||
&dec, sizeof dec, WUFFS_VERSION,
|
||||
WUFFS_INITIALIZE__LEAVE_INTERNAL_BUFFERS_UNINITIALIZED));
|
||||
|
||||
wuffs_base__status status =
|
||||
wuffs_lzw__decoder__transform_io(&dec, &have, &src, g_work_slice_u8);
|
||||
if (status.repr != wuffs_base__suspension__short_read) {
|
||||
RETURN_FAIL("closed=false: have \"%s\", want \"%s\"", status.repr,
|
||||
wuffs_base__suspension__short_read);
|
||||
}
|
||||
|
||||
src.meta.closed = true;
|
||||
status = wuffs_lzw__decoder__transform_io(&dec, &have, &src, g_work_slice_u8);
|
||||
if (status.repr != wuffs_lzw__error__truncated_input) {
|
||||
RETURN_FAIL("closed=true: have \"%s\", want \"%s\"", status.repr,
|
||||
wuffs_lzw__error__truncated_input);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* //
|
||||
do_test_wuffs_lzw_decode(const char* src_filename,
|
||||
uint64_t src_size,
|
||||
@@ -444,6 +473,7 @@ proc g_tests[] = {
|
||||
test_wuffs_lzw_decode_output_bad,
|
||||
test_wuffs_lzw_decode_output_empty,
|
||||
test_wuffs_lzw_decode_pi,
|
||||
test_wuffs_lzw_decode_truncated_input,
|
||||
test_wuffs_lzw_decode_width_0,
|
||||
test_wuffs_lzw_decode_width_1,
|
||||
|
||||
|
||||
Reference in new issue
Block a user