Decode std/gif to an image_buffer, not io_buffer

This is about correctness, not performance, as an image_buffer supports
decoding to a frame_rect whose top-left corner isn't (0, 0). For the
record, though:

name                             old speed      new speed      delta

wuffs_gif_decode_1k_bw/clang      318MB/s ± 1%   307MB/s ± 2%  -3.37%  (p=0.000 n=48+48)
wuffs_gif_decode_1k_color/clang   140MB/s ± 0%   137MB/s ± 1%  -2.18%  (p=0.000 n=46+46)
wuffs_gif_decode_10k/clang        128MB/s ± 0%   125MB/s ± 2%  -1.95%  (p=0.000 n=39+46)
wuffs_gif_decode_100k/clang       120MB/s ± 0%   119MB/s ± 1%  -1.36%  (p=0.000 n=45+47)
wuffs_gif_decode_1000k/clang      122MB/s ± 0%   121MB/s ± 1%  -1.35%  (p=0.000 n=44+49)

wuffs_gif_decode_1k_bw/gcc        329MB/s ± 2%   320MB/s ± 1%  -2.97%  (p=0.000 n=48+48)
wuffs_gif_decode_1k_color/gcc     160MB/s ± 1%   156MB/s ± 1%  -2.50%  (p=0.000 n=44+46)
wuffs_gif_decode_10k/gcc          144MB/s ± 1%   141MB/s ± 1%  -2.30%  (p=0.000 n=45+44)
wuffs_gif_decode_100k/gcc         128MB/s ± 1%   126MB/s ± 1%  -1.43%  (p=0.000 n=46+45)
wuffs_gif_decode_1000k/gcc        131MB/s ± 1%   129MB/s ± 1%  -1.44%  (p=0.000 n=48+46)
This commit is contained in:
Nigel Tao committed 2018-05-28 19:58:15 +10:00
1 parent 8e2afdb978
commit 3c3e6fc2fa
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -422,7 +422,7 @@ pri func decoder.decode_id_part1?(ib ptr base.image_buffer, dst base.io_writer,
// TODO: delete the write_to_ib_instead_of_w hack. It should always be
// true.
var write_to_ib_instead_of_w base.bool = false
var write_to_ib_instead_of_w base.bool = true
this.previous_lzw_decode_ended_abruptly = true
while true {