std/jpeg: memoize Huffman table selectors

This commit is contained in:
Nigel Tao committed 2023-06-12 16:23:53 +10:00
1 parent 04344db374
commit 1f0f323414
6 files changed
+31 -14

No files matched your search

@@ -61,7 +61,7 @@ pri func decoder.decode_mcu_progressive_ac_high_bits!(workbuf: slice base.u8, mx
n_bits |= 56
// Read the Huffman-encoded ac_symbol, up to 16 bits long.
ac_h = 4 | this.scan_comps_ta[this.mcu_blocks_sselector[0]]
ac_h = this.mcu_blocks_ac_hselector[0]
ac_ht_fast = this.huff_tables_fast[ac_h][bits >> 56] as base.u32
ac_bl = ac_ht_fast >> 8
if n_bits >= ac_bl {