Repository navigation
v1.1.2.0
v1.1.2.0: faster decoding and hardening
A maintenance release of API set 1. No public function was added, removed or changed, and the ABI is unchanged.
Performance
VLC coefficient decoding was reworked:
- The exp-Golomb prefix is read with a count-leading-zeros instead of bit by bit.
- The bit buffer is topped up with whole bytes before each symbol, so the prefix and suffix of a normal code are read in one step. The buffer end is never read past.
- The separate
k = 0readers were removed; all run and level codes go through one reader.
Decoding is about 20–30% faster at high bitrates and about 8% faster at low bitrates, measured on x86 with both single- and multi-threaded decoding. The decoded output is bit-exact with v1.1.1.0.
Correctness and robustness
- Dequantization no longer left-shifts negative values or overflows
intat high QP; the SIMD paths now saturate correctly - The exp-Golomb prefix sum no longer wraps
u32on malformed input, so builds with-fsanitize=unsigned-integer-overflow(such as Android) no longer abort - The exp-Golomb prefix length is bounded to keep decoded values within
int - Metadata
payload_typeandpayload_sizeare checked againstu32wraparound OAPV_MAX_NUM_META_PAYLOADSis enforced per access unit inoapvm_set()- Encoder error paths release the input and reconstruction image references
- Reconstructed AC coefficients are checked against the 16-bit range
- The encoder enforces the minimum tile width and height of the constrained profiles
- Decoder API hardening: output stride and plane count validation, NULL argument checks
Code cleanup
- Include guards renamed to non-reserved
OPENAPV_<FILE>_H_names static inlinehelpers useforce_inline- Quantization and dequantization matrices renamed to
q_matanddq_mat - Comments explain why the VLC prefix loops have no per-bit range check
- Unused bitstream reader code removed
Tools and documentation
- ImHex pattern: tile, access unit info, gain map and ICC parsing, bit-exact frame header size
- README: related projects section
Upgrading from v1.1.1.0
Applications only need to relink. Two things to note:
- The include guard of
oapv.hchanged from__OAPV_H__...toOPENAPV_OAPV_H_. Code that tested the old guard macro must be updated. - The encoder now rejects
tile_w/tile_hvalues that are not a multiple of 16 when set directly inoapve_param_t. Some of these were silently accepted before. The string parameter parser already rejected them.