QuaLix handbook
Explore the QLX bitstream structure, rate-control choices, and SDK integration across TypeScript, Rust, and Quack.
QuaLix (@quajs/qualix / qualix) is a single-track constant-frame-rate (CFR) game video codec and cross-engine runtime built for QuaEngine. Its core decoder is written in #![forbid(unsafe_code)] Rust and targets native crates, C ABI static/shared libraries, CLI tooling, and a self-contained WebAssembly runtime embedded directly in the npm package.
Decoder capabilities
- Bounded single-surface decoding: Reconstructs every frame onto one tightly packed surface (doubling as temporal reference) under a caller-enforced working-set budget, with support for caller-lent GPU buffers (
Decoder::open_into/qlx_open_into) and streamingread_at. - Exact straight alpha & wide gamut: Native support for 8-bit
sRGB + Straight Alphaand 10-bit BT.2020PQ10/HLG10(R10G10B10A2). - Four mastering modes: Bit-exact lossless q0, automated offline perceptual q selection, shot-adaptive VBR, and packet-padded strict CBR.
Choosing an encoding mode
| Scenario | Recommended Mode | CLI Flags / Options | Key Properties |
|---|---|---|---|
| Transparent UI motion, pixel art, titles | Lossless q0 (default) | --quality 0 --profile compact |
Bit-exact RGBA/RGB10A2, shared materialized keyframes, dirty-row skip |
| Tight-budget gradients & dark UI | Automated perceptual | --quality perceptual --profile dense |
Single fixed q verified against CIE ΔE*ab, banding, and local flicker gates |
| Openings, cutscenes & Quack default | Adaptive VBR | --vbr 1.5M --profile fast |
Causal 2-px OBMC, 5-level AQ, IBC/CCC/CfL, symmetric 5-tap Wiener loop filter |
| Fixed streaming read cadence | Strict CBR | --cbr 800k |
Budgets header + seek table globally; physical packets vary by at most 1 byte |
| Wide-gamut HDR playback | 10-bit PQ / HLG | --color pq10 / hlg10 |
Full 1024-level RGB codes + 2-bit alpha, Metal EDR ready |
Where to go next
- Integration guides: TypeScript / WASM · Rust / C ABI · Quack & QPK bundling · Engine hosts & HDR
- Specs & tooling: Media import & color · CLI reference · QLX bitstream · Adaptive pictures · Benchmarks
- Reference: API reference