Skip to main content

Module gpuwav3

Module gpuwav3 

Source
Expand description

tc-gpu v3 (stream magic TCG3): one global integer CDF 9/7 transform over the whole field, with the coefficients entropy-coded in independently decodable code-blocks (JPEG2000-style).

§Dependency rule

  • Subbands are decoded coarse → fine (LL, then levels nlev−1 … 0). A code-block may read any coefficient of a coarser level (its parent band: the parent and the parent’s 6 face neighbours) — those are decoded first — and, inside its own region, every earlier line in raster order plus its own earlier samples on the line. Nothing outside the block at its own level is visible, so all blocks of one level decode in parallel (one rANS lane each: the parallelism is the block count).
  • Contexts use the residuals q − pred of the visible cells (optional, resctx), predictions use the values.

§Random access

A sub-box needs, at every level, the coefficients in the support of the integer synthesis lifting (±3 samples per half-band per level, a conservative bound for the 4-step 9/7 lifting), plus — for decoding — the parent cells their blocks condition on. Only those code-blocks (and the outlier tiles touching the box) are read; the inverse lifting runs only on the lines inside the needed region at each level.

Structs§

Decoded3
Result of a (sub-box) decode.
Gpu3Config
v3 options.
Parsed3
A parsed v3 stream.
TileRef
An outlier tile.

Enums§

Model3
Probability model of a v3 stream.

Constants§

MAGIC3
Stream magic.

Functions§

ad_default
Default adaptive layer (TC_AD=wa,lim,mask overrides, for sweeps).
blocks_of
Code-blocks of a shape in coding order.
decode3_box
Decode the box [lo, hi) (whole field: [0, d3)).
decode3_box_parsed
decode3_box on a parsed stream.
decode3_f32
Decode a whole v3 stream to f32.
encode3_f32
Encode as a v3 stream.
key3
Predictor key of a code-block band (pass 0; passes add p).
parse3
Parse a v3 stream, plain (TCG3) or carrying its decoder (TCS1, see crate::shipdec). Offsets in the result index bytes either way.
samples3
Training samples for a field at a PSNR/RMSE target (the coefficients the v3 coder would see at the rate-controlled step).