wai-rs: jpegai_bitstream — full picture-header parser #17
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/jpegai-pih"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Decodes the complete PIH substream →
PictureHeader: fixed prefix (profile, synthesis transforms, level, dims, subsampling, colour_transform_idx, model_id), CCS_SGMM header (multi_threading_z, quantizer beta F/O headers + independent_beta_uv, region_partitioning), per-component tool groups (multi_threading_r, num_chs, then use_cube_flags → lsbs → rvs → grfs + channel flags), gain_3D, synthesis_tile_enable.Field order + conditionals ported from the reference
decode_headersources — notably use_cube precedes lsbs, and synthesis_tile_enable trails the groups (both differ from header_spec.json order; they follow the recursive tool-walk).Validated on real test256.bin: 256x256 4:4:4, colour_idx=1, num_chs 160/96, per-component flags, and
end_bit=437— every field consumed exactly up to the 3-bit pad of the 49-byte PIH. The grfs channel-flag counts (4/9) independently match the sigma-additions gain fixture. Un-exercised branches (region splits, independent beta, signalled colour matrix) follow the reference syntax, untested.dcharlot referenced this pull request2026-11-06 13:54:17 -05:00