open-standards/wai/wai-rs/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 954307816d wai-rs: derive the entropy-decode inputs — skip_mask + rvs_additive (fixture-free)
Ports the last two inputs the mANS sgm decoder needed but that were still being read
from an e2e fixture. With these, every input of the decode path is computable from the
codestream plus normative assets.

  skip_mask     scale_hat = i_s + gain_per_ch ; mask = scale_hat > 382
                NOTE the skip decision uses the scale WITHOUT the RVS additive, while
                sigma_index uses it WITH — the two differ by exactly the rvs values and
                are easy to conflate.

  rvs_additive  likely = clamp((sum_8x8 |i_s| + 32) >> 6, 0, 4351)
                band   = #{ e in [1003,1352,1937] : likely >= e }
                rvs    = A[grfs_flag ? 0 : 1][band]

Band edges are precomputed as idx2log(thr * 2^4) against the reference
Log2LinConvertion table, so the 4352-entry table is not needed at decode time; the
per-band additives come from the normative scale list scaled by the GRFS branch factor.
Band membership is INCLUSIVE at the lower edge — only the luma plane exercises this
(one block lands exactly on 1352 and the reference places it in the band above), which
is why both planes are tested.

Validated against the ISO reference on real test256.bin, both planes, including the
composition (derived rvs fed through sigma_index must reproduce the indices the
reference entropy coder consumed):
  luma   rvs 40960/40960, mask 40960/40960 (703 coded), sigma 40960/40960
  chroma rvs 24576/24576, mask 24576/24576 (537 coded), sigma 24576/24576

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-18 23:30:54 -04:00
..
audio_scene wai: interactive + temporal cargo classes, provenance, telepresence 2026-06-13 23:16:42 -04:00
bin wai: generative-replicate — deterministic byte-exact GENERATION (wai.generate.spectral) 2026-06-25 18:48:21 -04:00
codecs wai: learned integer-exact Gaussian-splat attribute codec (wai.splat.int_codec) 2026-06-28 09:14:46 -04:00
film wai: a reel can embed its soundtrack — one envelope, movie + sound 2026-06-17 03:10:12 -04:00
haptic wai: interactive + temporal cargo classes, provenance, telepresence 2026-06-13 23:16:42 -04:00
neural wai: full integer conditional codec — bitstream→image decode, byte-for-byte 2026-06-24 14:37:50 -04:00
score wai: ScoreReceipt — the music class gets the same measured-energy receipt 2026-06-14 11:30:53 -04:00
splat4d wai: interactive + temporal cargo classes, provenance, telepresence 2026-06-13 23:16:42 -04:00
world wai: linear film — wai.film.linear, a sealed camera-on-rails world 2026-06-16 09:06:28 -04:00
container.rs wai: companion-component binding — HDR/audio metadata in one envelope 2026-06-18 15:11:46 -04:00
ffi.rs wai: companion-component binding — HDR/audio metadata in one envelope 2026-06-18 15:11:46 -04:00
ffi_neural.rs Add WAI — Web AI Media Transport & Execution standard 2026-05-24 13:36:51 -04:00
generate.rs wai.generate.spectral/4: angular (rays) + spiral synthesis primitives 2026-06-27 06:15:35 -04:00
int_audio.rs wai: learned integer-exact audio codec (wai.audio.int_codec) + conformance 2026-06-27 17:01:31 -04:00
int_entropy.rs wai: int_entropy — integer Gaussian-conditional bucketing (contract's entropy half) 2026-06-20 15:36:43 -04:00
int_hyper_synth.rs wai: faster integer conv/conv_t in the conditional decode (byte-identical) 2026-06-25 10:15:53 -04:00
int_splat.rs wai: learned integer-exact Gaussian-splat attribute codec (wai.splat.int_codec) 2026-06-28 09:14:46 -04:00
int_synth.rs wai-web: integer-exact neural decode in the browser, no ML runtime 2026-06-21 05:53:41 -04:00
int_transform.rs wai int_transform: TransformerEncoder — stack of blocks 2026-06-23 11:52:30 -04:00
int_transformer.rs wai-rs: jpegai_synthesis — whole-net integer JPEG-AI synthesis decoder (58 dB PSNR) (#49) 2026-07-07 07:42:11 -04:00
int_video.rs wai: half-pel motion compensation for int_motion video + real-footage conformance 2026-06-27 11:10:48 -04:00
int_world.rs wai: two-agent co-control world.model — both agents drive one byte-exact frame 2026-06-28 03:14:57 -04:00
jpegai_bitstream.rs wai-rs: fix picture-header per-component flag order (grfs_channel_flags were corrupt) 2026-07-18 02:04:41 -04:00
jpegai_icci.rs wai-rs: jpegai_icci::IcciNet — the eICCI filter, float-exact vs the ONNX 2026-07-15 09:07:07 -04:00
jpegai_mans.rs wai-rs: byte-exact mANS entropy decoder (jpegai_mans) — sgm + fac paths (#55) 2026-07-07 22:38:36 -04:00
jpegai_pipeline.rs wai-rs: derive the entropy-decode inputs — skip_mask + rvs_additive (fixture-free) 2026-07-18 23:30:54 -04:00
jpegai_synthesis.rs wai-rs: hyper_scale_decoder — floor (>>) not truncation; byte-exact vs the REFERENCE decoder 2026-07-09 07:01:28 -04:00
lib.rs wai-rs: jpegai_bitstream — codestream container + MSB-first header bit reader 2026-07-16 04:39:36 -04:00
ort_session.rs wai: reconcile the neural + semantic subsystem onto main 2026-06-14 03:55:29 -04:00
provenance.rs wai: collapse a nested if in provenance verify (clippy clean) 2026-06-17 00:46:23 -04:00
rans.rs wai: full integer conditional codec — bitstream→image decode, byte-for-byte 2026-06-24 14:37:50 -04:00
semantic.rs wai: reconcile the neural + semantic subsystem onto main 2026-06-14 03:55:29 -04:00
world_model.rs wai: wai.world.model — generative-world transport (replay-equivalent action trace + provenance) 2026-06-27 17:25:02 -04:00