mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
std/jpeg: tweak UNZIG array
We'll hopefully claw back the performance in a follow-up commit. name old speed new speed delta wuffs_jpeg_decode_19k_8bpp/clang11 222MB/s ± 0% 224MB/s ± 0% +1.11% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_progressive/clang11 213MB/s ± 0% 210MB/s ± 0% -1.53% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_sequential/clang11 376MB/s ± 0% 378MB/s ± 0% +0.37% (p=0.008 n=5+5) wuffs_jpeg_decode_77k_24bpp/clang11 325MB/s ± 0% 328MB/s ± 0% +0.66% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_420/clang11 339MB/s ± 0% 340MB/s ± 0% +0.46% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_444/clang11 468MB/s ± 0% 469MB/s ± 0% +0.27% (p=0.008 n=5+5) wuffs_jpeg_decode_4002k_24bpp/clang11 344MB/s ± 0% 346MB/s ± 0% +0.37% (p=0.008 n=5+5) wuffs_jpeg_decode_19k_8bpp/gcc10 212MB/s ± 0% 213MB/s ± 0% +0.46% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_progressive/gcc10 246MB/s ± 0% 221MB/s ± 0% -9.98% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_sequential/gcc10 484MB/s ± 0% 484MB/s ± 0% ~ (p=0.056 n=5+5) wuffs_jpeg_decode_77k_24bpp/gcc10 390MB/s ± 0% 392MB/s ± 0% +0.47% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_420/gcc10 415MB/s ± 0% 414MB/s ± 0% -0.17% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_444/gcc10 463MB/s ± 0% 459MB/s ± 0% -0.78% (p=0.008 n=5+5) wuffs_jpeg_decode_4002k_24bpp/gcc10 420MB/s ± 0% 419MB/s ± 0% -0.19% (p=0.008 n=5+5)
This commit is contained in:
1 parent
19e5cccee3
commit
9b97c27ec6
6 files changed
+35
-33
No files matched your search
@@ -36,7 +36,7 @@ pri func decoder.decode_mcu_progressive_ac_high_bits!(workbuf: slice base.u8, mx
|
||||
var ac_rrrr : base.u32[..= 15]
|
||||
var ac_ssss : base.u32[..= 15]
|
||||
|
||||
var z : base.u32[..= 78] // 78 = 63 + 15.
|
||||
var z : base.u32[..= 79] // 79 = 63 + 15 + 1.
|
||||
|
||||
if this.eob_run > 0 {
|
||||
this.eob_run -= 1
|
||||
@@ -126,14 +126,14 @@ pri func decoder.decode_mcu_progressive_ac_high_bits!(workbuf: slice base.u8, mx
|
||||
(((this.util.sign_extend_rshift_u64(a: bits, n: 63) & 0xFFFF_FFFF) as base.u32) ^ 0xFFFF_FFFF)
|
||||
bits ~mod<<= ac_ssss
|
||||
n_bits ~mod-= ac_ssss
|
||||
z = this.mcu_zig_index + ac_rrrr
|
||||
z = this.mcu_zig_index + ac_rrrr + 1
|
||||
this.mcu_blocks[0][UNZIG[z]] =
|
||||
((ac_value ~mod<< this.scan_al) & 0xFFFF) as base.u16
|
||||
if (z + 1) > (this.scan_se as base.u32) {
|
||||
if z > (this.scan_se as base.u32) {
|
||||
break.ac_components
|
||||
}
|
||||
assert (z + 1) <= 63 via "a <= b: a <= c; c <= b"(c: (this.scan_se as base.u32))
|
||||
this.mcu_zig_index = z + 1
|
||||
assert z <= 63 via "a <= b: a <= c; c <= b"(c: (this.scan_se as base.u32))
|
||||
this.mcu_zig_index = z
|
||||
} else if ac_rrrr < 15 {
|
||||
this.eob_run = (((1 as base.u16) << ac_rrrr) - 1) as base.u16
|
||||
if ac_rrrr > 0 {
|
||||
|
||||
Reference in new issue
Block a user