mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 08:47:28 +01:00
Update GIF frame_dirty_rect more frequently
It's not an optimization per se, but for the record: name old speed new speed delta wuffs_gif_decode_1k_bw/clang 260MB/s ± 1% 261MB/s ± 0% +0.51% (p=0.032 n=5+5) wuffs_gif_decode_1k_color/clang 122MB/s ± 0% 123MB/s ± 1% ~ (p=0.222 n=5+5) wuffs_gif_decode_10k/clang 148MB/s ± 1% 148MB/s ± 0% ~ (p=0.421 n=5+5) wuffs_gif_decode_100k_artificial/clang 439MB/s ± 0% 443MB/s ± 1% +0.99% (p=0.008 n=5+5) wuffs_gif_decode_100k_realistic/clang 174MB/s ± 1% 173MB/s ± 1% ~ (p=0.151 n=5+5) wuffs_gif_decode_1000k/clang 175MB/s ± 0% 175MB/s ± 0% -0.30% (p=0.016 n=4+5) wuffs_gif_decode_anim_screencap/clang 941MB/s ± 1% 948MB/s ± 0% +0.74% (p=0.016 n=5+5) wuffs_gif_decode_1k_bw/gcc 266MB/s ± 0% 273MB/s ± 0% +2.60% (p=0.008 n=5+5) wuffs_gif_decode_1k_color/gcc 137MB/s ± 0% 139MB/s ± 0% +1.54% (p=0.008 n=5+5) wuffs_gif_decode_10k/gcc 163MB/s ± 0% 162MB/s ± 0% ~ (p=0.151 n=5+5) wuffs_gif_decode_100k_artificial/gcc 457MB/s ± 0% 456MB/s ± 0% ~ (p=0.095 n=5+5) wuffs_gif_decode_100k_realistic/gcc 184MB/s ± 0% 182MB/s ± 0% -1.02% (p=0.008 n=5+5) wuffs_gif_decode_1000k/gcc 186MB/s ± 0% 184MB/s ± 0% -1.04% (p=0.016 n=5+4) wuffs_gif_decode_anim_screencap/gcc 985MB/s ± 1% 980MB/s ± 0% ~ (p=0.095 n=5+5)
This commit is contained in:
1 parent
e84a716313
commit
8ab2a33aae
3 files changed
+46
-28
No files matched your search
@@ -9137,8 +9137,18 @@ wuffs_gif__decoder__decode_id_part1(wuffs_gif__decoder* self,
|
||||
((uint32_t)(v_lw)));
|
||||
self->private_impl.f_previous_lzw_decode_ended_abruptly = true;
|
||||
while (true) {
|
||||
if (((uint64_t)(io1_a_src - iop_a_src)) == 0) {
|
||||
if (self->private_impl.f_uncompressed_ri !=
|
||||
self->private_impl.f_uncompressed_wi) {
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(5);
|
||||
status = wuffs_gif__decoder__copy_to_image_buffer(self, a_dst);
|
||||
if (status) {
|
||||
goto suspend;
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(5);
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(6);
|
||||
if (WUFFS_BASE__UNLIKELY(iop_a_src == io1_a_src)) {
|
||||
status = wuffs_base__suspension__short_read;
|
||||
goto suspend;
|
||||
@@ -9199,32 +9209,34 @@ wuffs_gif__decoder__decode_id_part1(wuffs_gif__decoder* self,
|
||||
io1_v_w = o_0_io1_v_w;
|
||||
a_src = o_0_a_src;
|
||||
}
|
||||
if (wuffs_base__status__is_ok(v_z) ||
|
||||
(v_z == wuffs_base__suspension__short_write)) {
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(6);
|
||||
status = wuffs_gif__decoder__copy_to_image_buffer(self, a_dst);
|
||||
if (status) {
|
||||
goto suspend;
|
||||
}
|
||||
if (v_z == wuffs_base__suspension__short_write) {
|
||||
goto label_1_continue;
|
||||
}
|
||||
self->private_impl.f_previous_lzw_decode_ended_abruptly = false;
|
||||
goto label_1_break;
|
||||
}
|
||||
if ((v_block_size == 0) &&
|
||||
(v_z == wuffs_base__suspension__short_read)) {
|
||||
goto label_1_break;
|
||||
}
|
||||
if (self->private_impl.f_uncompressed_ri !=
|
||||
self->private_impl.f_uncompressed_wi) {
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(7);
|
||||
status = wuffs_gif__decoder__copy_to_image_buffer(self, a_dst);
|
||||
if (status) {
|
||||
goto suspend;
|
||||
}
|
||||
}
|
||||
if (wuffs_base__status__is_ok(v_z)) {
|
||||
self->private_impl.f_previous_lzw_decode_ended_abruptly = false;
|
||||
goto label_1_break;
|
||||
}
|
||||
if (v_z == wuffs_base__suspension__short_write) {
|
||||
goto label_1_continue;
|
||||
}
|
||||
status = v_z;
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(7);
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(8);
|
||||
}
|
||||
label_1_break:;
|
||||
}
|
||||
label_0_break:;
|
||||
if (self->private_impl.f_uncompressed_ri !=
|
||||
self->private_impl.f_uncompressed_wi) {
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(8);
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(9);
|
||||
status = wuffs_gif__decoder__copy_to_image_buffer(self, a_dst);
|
||||
if (status) {
|
||||
goto suspend;
|
||||
|
||||
Reference in new issue
Block a user