mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 16:52:18 +01:00
Roll back 3 recent lzw.decoder.suffixes commits
Specifically:49627b4Flatten the lzw.decoder.suffixes arrayf877fb2Use the workbuf instead of lzw.decoder.suffixes85be5b9Delete the obsolete lzw.decoder.suffixes array name old speed new speed delta wuffs_lzw_decode_20k/clang5 247MB/s ± 0% 265MB/s ± 0% +7.31% (p=0.008 n=5+5) wuffs_lzw_decode_100k/clang5 407MB/s ± 0% 452MB/s ± 1% +11.21% (p=0.008 n=5+5) wuffs_lzw_decode_20k/gcc7 238MB/s ± 1% 263MB/s ± 1% +10.81% (p=0.008 n=5+5) wuffs_lzw_decode_100k/gcc7 384MB/s ± 0% 482MB/s ± 2% +25.54% (p=0.008 n=5+5) wuffs_gif_decode_1k_bw/clang5 318MB/s ± 0% 241MB/s ± 1% -24.15% (p=0.008 n=5+5) wuffs_gif_decode_1k_color/clang5 154MB/s ± 0% 141MB/s ± 1% -8.58% (p=0.008 n=5+5) wuffs_gif_decode_10k_bgra/clang5 697MB/s ± 1% 721MB/s ± 0% +3.53% (p=0.008 n=5+5) wuffs_gif_decode_10k_indexed/clang5 186MB/s ± 0% 194MB/s ± 1% +4.20% (p=0.008 n=5+5) wuffs_gif_decode_20k/clang5 226MB/s ± 1% 246MB/s ± 1% +8.85% (p=0.008 n=5+5) wuffs_gif_decode_100k_artificial/clang5 508MB/s ± 1% 551MB/s ± 0% +8.33% (p=0.008 n=5+5) wuffs_gif_decode_100k_realistic/clang5 203MB/s ± 0% 227MB/s ± 0% +11.88% (p=0.008 n=5+5) wuffs_gif_decode_1000k/clang5 206MB/s ± 0% 231MB/s ± 0% +12.46% (p=0.008 n=5+5) wuffs_gif_decode_anim_screencap/clang5 1.03GB/s ± 0% 1.10GB/s ± 0% +5.85% (p=0.008 n=5+5) wuffs_gif_decode_1k_bw/gcc7 398MB/s ± 0% 265MB/s ± 1% -33.35% (p=0.008 n=5+5) wuffs_gif_decode_1k_color/gcc7 161MB/s ± 0% 145MB/s ± 1% -9.74% (p=0.008 n=5+5) wuffs_gif_decode_10k_bgra/gcc7 604MB/s ± 1% 622MB/s ± 1% +2.94% (p=0.008 n=5+5) wuffs_gif_decode_10k_indexed/gcc7 187MB/s ± 1% 194MB/s ± 0% +3.83% (p=0.008 n=5+5) wuffs_gif_decode_20k/gcc7 227MB/s ± 0% 234MB/s ± 1% +3.09% (p=0.008 n=5+5) wuffs_gif_decode_100k_artificial/gcc7 492MB/s ± 0% 506MB/s ± 1% +2.91% (p=0.008 n=5+5) wuffs_gif_decode_100k_realistic/gcc7 201MB/s ± 0% 210MB/s ± 1% +4.42% (p=0.008 n=5+5) wuffs_gif_decode_1000k/gcc7 203MB/s ± 0% 213MB/s ± 0% +4.97% (p=0.008 n=5+5) wuffs_gif_decode_anim_screencap/gcc7 1.04GB/s ± 0% 1.06GB/s ± 0% +2.61% (p=0.008 n=5+5)
This commit is contained in:
1 parent
85be5b9f8a
commit
3056a84393
4 files changed
+56
-87
No files matched your search
@@ -25,7 +25,7 @@ pub status "?too much pixel data"
|
||||
pri status "?internal error: inconsistent ri/wi"
|
||||
|
||||
// TODO: reference lzw.decoder_workbuf_len_max_incl.
|
||||
pub const decoder_workbuf_len_max_incl base.u64 = 32768 + 0xFFFF
|
||||
pub const decoder_workbuf_len_max_incl base.u64 = 0xFFFF
|
||||
|
||||
// See the spec appendix E "Interlaced Images" on page 29. The first element
|
||||
// represents either that the frame was non-interlaced, or that all interlace
|
||||
@@ -184,8 +184,8 @@ pub func decoder.frame_dirty_rect() base.rect_ie_u32 {
|
||||
|
||||
pub func decoder.workbuf_len() base.range_ii_u64 {
|
||||
return this.util.make_range_ii_u64(
|
||||
min_incl:32768 + (this.width as base.u64),
|
||||
max_incl:32768 + (this.width as base.u64))
|
||||
min_incl:this.width as base.u64,
|
||||
max_incl:this.width as base.u64)
|
||||
}
|
||||
|
||||
pub func decoder.restart_frame!(index base.u64, io_position base.u64) base.status {
|
||||
@@ -707,9 +707,9 @@ pri func decoder.decode_id_part2?(dst ptr base.pixel_buffer, src base.io_reader,
|
||||
args.src.skip_fast!(actual:1, worst_case:1)
|
||||
}
|
||||
|
||||
if (32768 + (this.width as base.u64)) < args.workbuf.length() {
|
||||
args.workbuf = args.workbuf[:32768 + (this.width as base.u64)]
|
||||
} else if (32768 + (this.width as base.u64)) > args.workbuf.length() {
|
||||
if (this.width as base.u64) < args.workbuf.length() {
|
||||
args.workbuf = args.workbuf[:this.width as base.u64]
|
||||
} else if (this.width as base.u64) > args.workbuf.length() {
|
||||
return base."?bad workbuf length"
|
||||
}
|
||||
|
||||
@@ -719,7 +719,7 @@ pri func decoder.decode_id_part2?(dst ptr base.pixel_buffer, src base.io_reader,
|
||||
}
|
||||
io_bind (io:r, data:this.compressed[this.compressed_ri:this.compressed_wi]) {
|
||||
lzw_status =? this.lzw.decode_io_writer?(
|
||||
dst:this.util.null_io_writer(), src:r, workbuf:args.workbuf)
|
||||
dst:this.util.null_io_writer(), src:r, workbuf:this.util.null_slice_u8())
|
||||
this.compressed_ri ~sat+= r.since_mark().length()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user