mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 00:47:56 +01:00
std: rename some CLAMP and CLIP tables
This commit is contained in:
1 parent
5daeafbc6f
commit
18488a3bd0
6 files changed
+16
-14
No files matched your search
@@ -23,7 +23,9 @@ pri status "#internal error: inconsistent Huffman decoder state"
|
||||
pub const DECODER_DST_HISTORY_RETAIN_LENGTH_MAX_INCL_WORST_CASE : base.u64 = 0
|
||||
pub const DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE : base.u64 = 0
|
||||
|
||||
pri const CLAMP_TO_5 : roarray[8] base.u8[..= 5] = [0, 1, 2, 3, 4, 5, 5, 5]
|
||||
pri const CLAMP_NO_MORE_THAN_5 : roarray[8] base.u8[..= 5] = [
|
||||
0, 1, 2, 3, 4, 5, 5, 5,
|
||||
]
|
||||
|
||||
pub struct decoder? implements base.io_transformer(
|
||||
bits : base.u32,
|
||||
@@ -197,7 +199,7 @@ pri func decoder.do_transform_io?(dst: base.io_writer, src: base.io_reader, work
|
||||
|
||||
this.block_size = 0
|
||||
this.decode_huffman_finished = false
|
||||
this.decode_huffman_which = CLAMP_TO_5[this.huffman_selectors[0] & 7]
|
||||
this.decode_huffman_which = CLAMP_NO_MORE_THAN_5[this.huffman_selectors[0] & 7]
|
||||
this.decode_huffman_ticks = 50
|
||||
this.decode_huffman_section = 0
|
||||
this.decode_huffman_run_shift = 0
|
||||
|
||||
Reference in new issue
Block a user