The payloads of the WAI-native integer codecs get binary formats: WIV1 for wai.video.int_motion (keyframe 0) and wai.video.int_hyper (keyframe 1, a nested WIH1), WIH1 for wai.neural.int_hyper, WIA1 for wai.audio.int_codec (with its sample rate) and WIS1 for wai.splat.int_codec (with each attribute's presentation range). codecs::PINNED_INT_PAYLOADS maps each string to its format's magic; it is the one table int_payload and the framing check read. int_payload::wire parses and writes the four formats. It is self-contained, so the cross-architecture crate can include it. Every size is formed in u64 and capped alike on every target. A refusal is a code from a closed list (Refusal::code): bad_magic, which a JSON form gets, format_capability_mismatch, keyframe_capability_mismatch, version, reserved_nonzero, field_range, too_large, cdf_malformed, stream_length, nested_length, trailing, stream_exhausted, geometry_mismatch, model_mismatch, set_incomplete, not_dispatchable, unsupported_capability and payload_malformed. int_payload::decode_int decodes every integer capability, these five and wai.neural.int_synth and wai.neural.int_mlicpp, from parameter files held in memory (IntParams), with no ONNX runtime and no filesystem, and only through a dispatchable capability. int_payload::resolve verifies a pin over sets held in memory with pin::verify_bytes_with, and runs SPEC §3.1's check 5 over the set an unpinned decode reads, under every digest a pin over it could name. The converters wiv1_from_json, wih1_from_json, wia1_from_json and wis1_from_json turn the tools' JSON into payloads and parse what they write. wai.audio.int_codec and wai.splat.int_codec are registered with sets of one file (model.wam, g_s.whm): each decoder reads one file that holds every parameter. container::check_int_payload_framing and the Wai and WaiMulti methods check a payload's magic and version without neural_int. wai_int_payload_vectors writes each committed JSON vector's payload beside it, refusal fixtures derived from those payloads, and the index int-payload-conformance/vectors.json; `verify` regenerates them byte for byte, decodes each payload to its sidecar's SHA-256 and checks each fixture's code. int-payload-conformance/int_payload_verify.py checks the same corpus independently, in Python's standard library. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2 lines
88 B
Text
2 lines
88 B
Text
# Hashed files: a line-ending conversion on checkout would change every digest.
|
|
* -text
|