mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
std/jpeg: tweak decode_mcu z variable assignment
name old speed new speed delta wuffs_jpeg_decode_19k_8bpp/clang11 227MB/s ± 0% 229MB/s ± 0% +0.93% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_progressive/clang11 213MB/s ± 0% 212MB/s ± 0% -0.50% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_sequential/clang11 380MB/s ± 0% 380MB/s ± 0% ~ (p=1.000 n=5+5) wuffs_jpeg_decode_77k_24bpp/clang11 329MB/s ± 0% 331MB/s ± 0% +0.73% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_420/clang11 342MB/s ± 0% 344MB/s ± 0% +0.72% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_444/clang11 469MB/s ± 0% 476MB/s ± 0% +1.46% (p=0.008 n=5+5) wuffs_jpeg_decode_4002k_24bpp/clang11 348MB/s ± 0% 350MB/s ± 0% +0.51% (p=0.008 n=5+5) wuffs_jpeg_decode_19k_8bpp/gcc10 213MB/s ± 0% 215MB/s ± 0% +0.70% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_progressive/gcc10 246MB/s ± 0% 246MB/s ± 0% ~ (p=0.095 n=5+5) wuffs_jpeg_decode_30k_24bpp_sequential/gcc10 482MB/s ± 0% 485MB/s ± 0% +0.61% (p=0.008 n=5+5) wuffs_jpeg_decode_77k_24bpp/gcc10 392MB/s ± 0% 394MB/s ± 0% +0.53% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_420/gcc10 412MB/s ± 0% 414MB/s ± 0% +0.45% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_444/gcc10 460MB/s ± 0% 462MB/s ± 0% +0.43% (p=0.016 n=5+4) wuffs_jpeg_decode_4002k_24bpp/gcc10 419MB/s ± 0% 420MB/s ± 0% +0.32% (p=0.008 n=5+5)
This commit is contained in:
1 parent
48fa7182f4
commit
6eb92544bd
3 files changed
+4
-12
No files matched your search
@@ -204,6 +204,7 @@ pri func decoder.decode_mcu!(workbuf: slice base.u8, mx: base.u32[..= 0x1FFF], m
|
||||
// Split the 8-bit ac_symbol into two 4-bit halves, per section
|
||||
// F.2.2.2 "Decoding procedure for AC coefficients".
|
||||
ac_rrrr = ac_symbol >> 4
|
||||
z += ac_rrrr + 1
|
||||
ac_ssss = ac_symbol & 15
|
||||
ac_extend = EXTEND[ac_ssss]
|
||||
|
||||
@@ -214,13 +215,10 @@ pri func decoder.decode_mcu!(workbuf: slice base.u8, mx: base.u32[..= 0x1FFF], m
|
||||
(((this.util.sign_extend_rshift_u64(a: bits, n: 63) & 0xFFFF) as base.u16) ^ 0xFFFF)
|
||||
bits ~mod<<= ac_ssss
|
||||
n_bits ~mod-= ac_ssss
|
||||
z += ac_rrrr + 1
|
||||
this.mcu_blocks[0][UNZIG[z]] =
|
||||
ac_value
|
||||
} else if ac_rrrr < 15 {
|
||||
break.ac_components
|
||||
} else {
|
||||
z += 16
|
||||
}
|
||||
} endwhile.ac_components
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ pri func decoder.decode_mcu_progressive_ac_high_bits!(workbuf: slice base.u8, mx
|
||||
// Split the 8-bit ac_symbol into two 4-bit halves, per section
|
||||
// F.2.2.2 "Decoding procedure for AC coefficients".
|
||||
ac_rrrr = ac_symbol >> 4
|
||||
z += ac_rrrr + 1
|
||||
ac_ssss = ac_symbol & 15
|
||||
ac_extend = EXTEND[ac_ssss]
|
||||
|
||||
@@ -131,7 +132,6 @@ 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) as base.u16) ^ 0xFFFF)
|
||||
bits ~mod<<= ac_ssss
|
||||
n_bits ~mod-= ac_ssss
|
||||
z += ac_rrrr + 1
|
||||
this.mcu_blocks[0][UNZIG[z]] =
|
||||
((ac_value ~mod<< this.scan_al) & 0xFFFF) as base.u16
|
||||
} else if ac_rrrr < 15 {
|
||||
@@ -142,8 +142,6 @@ pri func decoder.decode_mcu_progressive_ac_high_bits!(workbuf: slice base.u8, mx
|
||||
n_bits ~mod-= ac_rrrr
|
||||
}
|
||||
break.ac_components
|
||||
} else {
|
||||
z += 16
|
||||
}
|
||||
} endwhile.ac_components
|
||||
|
||||
|
||||
Reference in new issue
Block a user