wai-pack: the packaging policy, scene cuts, and the one integer video encoder #168

Merged
dcharlot merged 26 commits from wai/w4-wai-pack into main 2026-10-06 03:52:48 -04:00
136 changed files with 11641 additions and 199 deletions

View file

@ -22,6 +22,10 @@ name: energy meters on real hardware
# fetched with plain git, and each workspace keeps its target directory in the
# runner's home between runs.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths:

View file

@ -195,7 +195,9 @@ jobs:
# allocator) checks that a header past the caps is refused before anything sized from it
# is allocated; tests/int_payload_cost.rs (its own binary, a live-bytes allocator) checks
# that int_payload::declared_cost bounds what each decode holds, and, in the release
# step only, decodes a 2^30-byte clip a 3 KB payload codes. tests/staged_resources.rs (its
# step only, decodes a 2^30-byte clip a 3 KB payload codes; tests/int_video_enc_memory.rs
# (its own binary, the same allocator) checks that int_video_enc::working_bytes bounds
# what the encoder holds. tests/staged_resources.rs (its
# own binary, a counting allocator) checks that the staged sink's work and memory per
# layer grow linearly in the layer's units, that a layer past the chain budget is
# refused before any stream is decoded, that what no unit holds is dropped, and that a
@ -209,10 +211,10 @@ jobs:
# wai.generate.spectral vector, which `generate` enables.
- name: Fast integer kernels ≡ reference kernels (overflow checks on)
working-directory: wai/wai-rs
run: cargo test --no-default-features --features neural_int,video_int,audio_int,world_int,splat_int,generate,staged --lib --test int_kernels_vectors --test int_kernels_geometry --test int_mlicpp --test int_mlicpp_preflight --test int_audio --test int_splat --test generate --test int_payload --test int_payload_preflight --test int_payload_cost --test cli_stage --test staged_resources
run: cargo test --no-default-features --features neural_int,video_int,audio_int,world_int,splat_int,generate,staged --lib --test int_kernels_vectors --test int_kernels_geometry --test int_mlicpp --test int_mlicpp_preflight --test int_audio --test int_splat --test generate --test int_payload --test int_payload_preflight --test int_payload_cost --test int_video_enc_memory --test cli_stage --test staged_resources
- name: Fast integer kernels ≡ reference kernels (release, overflow checks off)
working-directory: wai/wai-rs
run: cargo test --release --no-default-features --features neural_int,video_int,audio_int,world_int,splat_int,generate,staged --lib --test int_kernels_vectors --test int_kernels_geometry --test int_mlicpp --test int_mlicpp_preflight --test int_audio --test int_splat --test generate --test int_payload --test int_payload_preflight --test int_payload_cost --test cli_stage --test staged_resources
run: cargo test --release --no-default-features --features neural_int,video_int,audio_int,world_int,splat_int,generate,staged --lib --test int_kernels_vectors --test int_kernels_geometry --test int_mlicpp --test int_mlicpp_preflight --test int_audio --test int_splat --test generate --test int_payload --test int_payload_preflight --test int_payload_cost --test int_video_enc_memory --test cli_stage --test staged_resources
# The integer decode path builds under each of its features alone, so a sink can take
# one medium without the others, and for wasm32 (a browser sink); `int_payload` arms a
# medium only under its feature, and none needs `neural`.

192
.github/workflows/wai-pack.yml vendored Normal file
View file

@ -0,0 +1,192 @@
name: wai-pack
# The reference packager of WAI's packaging extension (wai/extensions/packaging.md) and
# its conformance corpus (wai/pack-conformance). Three jobs:
#
# - legs: on each architecture of the fleet, clippy with float arithmetic denied (no
# float decides anything in a package), the tests in release with a floor on how many
# each target lists, and the corpus recomputed by the crate.
# - independent: the corpus recomputed by its second implementation, written in Python
# from the extension text and sharing no code with wai-pack.
# - licences: every crate in wai-pack's dependency graph is under a licence deny.toml
# allows; a source-available licence fails it.
#
# Push filters match the push's delta, so every path a build or a verifier reads is
# listed: the crate, the wai crate it builds on, the corpus, the BLAKE3 and integer
# payload verifiers and the registry export pack_verify.py reads, and this file.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths:
- 'wai/wai-pack/**'
- 'wai/wai-rs/**'
- 'wai/pack-conformance/**'
- 'wai/claim-conformance/_blake3.py'
- 'wai/int-payload-conformance/int_payload_verify.py'
- 'wai/registry/capabilities.json'
- '.github/workflows/wai-pack.yml'
push:
branches: [main]
paths:
- 'wai/wai-pack/**'
- 'wai/wai-rs/**'
- 'wai/pack-conformance/**'
- 'wai/claim-conformance/_blake3.py'
- 'wai/int-payload-conformance/int_payload_verify.py'
- 'wai/registry/capabilities.json'
- '.github/workflows/wai-pack.yml'
jobs:
legs:
name: wai-pack · ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Self-hosted fleet labels: x86_64 by linux, arm64 by linux-arm64 and macos.
# A Windows leg waits for its runner (see wai-byte-equality.yml).
os: [linux, linux-arm64, macos]
steps:
- uses: actions/checkout@v5
# The docker runners ship no Rust, so rustup is bootstrapped; the macOS host has
# it, but launchd's PATH omits ~/.cargo/bin.
- name: Install Rust 1.98.0
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
command -v rustup >/dev/null 2>&1 || \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.98.0
rustup toolchain install 1.98.0 --profile minimal
rustup default 1.98.0
rustup component add --toolchain 1.98.0 clippy
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
# clippy::float_arithmetic is denied for the library and the CLI (Cargo.toml and
# the crate attributes); -D warnings makes every other lint fail the step too.
- name: clippy, float arithmetic denied
working-directory: wai/wai-pack
run: cargo clippy --locked --all-targets -- -D warnings
- name: Tests (release)
working-directory: wai/wai-pack
run: cargo test --release --locked
# A target that lost its tests (a module dropped, a cfg that compiles them out)
# would still report ok. Each target must list at least as many tests as it had
# when the floor was set; raise a floor when tests are added.
- name: Test-count floor per target
shell: bash
working-directory: wai/wai-pack
run: |
set -euo pipefail
fail=0
while read -r target floor; do
n=$(cargo test --release --locked $target -- --list 2>/dev/null | grep -c ': test$' || true)
echo "$target: $n tests (floor $floor)"
[ "$n" -ge "$floor" ] || { echo "::error::$target lists $n tests, under its floor of $floor"; fail=1; }
done <<'EOF'
--lib 17
--test=conformance 1
--test=scenecut 3
--test=source_alloc 1
EOF
exit $fail
- name: The corpus, recomputed by wai-pack
working-directory: wai/wai-pack
run: cargo run --release --locked --bin wai-pack -- conformance check ../pack-conformance
independent:
name: wai-pack · independent verifier (Python)
runs-on: linux
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with:
python-version: '3.11'
# Standard library only (tomllib, hashlib); BLAKE3 comes from the shared pure-Python
# module beside the claim corpus.
- name: pack_verify.py
working-directory: wai
shell: bash
run: python3 pack-conformance/pack_verify.py pack-conformance
- name: Install Rust 1.98.0
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
command -v rustup >/dev/null 2>&1 || \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.98.0
rustup toolchain install 1.98.0 --profile minimal
rustup default 1.98.0
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
# The source readers differentially: seeded Y4M and WAV mutations, every verdict of
# wai-pack (debug and release, both with overflow checks) equal to pack_verify.py's,
# and no reader panicking.
- name: source_diff.py, wai-pack against pack_verify.py
shell: bash
working-directory: wai/wai-pack
run: |
set -euo pipefail
cargo build --locked --bin wai-pack
cargo build --release --locked --bin wai-pack
for profile in debug release; do
python3 ../pack-conformance/source_diff.py "target/$profile/wai-pack" 1 3000
done
# The policy reader differentially: byte-level cases and seeded random policies,
# every verdict and digest of wai-pack equal to pack_verify.py's.
- name: policy_diff.py, wai-pack against pack_verify.py
shell: bash
working-directory: wai/wai-pack
run: python3 ../pack-conformance/policy_diff.py target/release/wai-pack 1 3000
# wai.pack.scenecut/1 differentially: the streaming segmenter against
# pack_verify.py's on-demand form on seeded random clips.
- name: segment_diff.py, wai-pack against pack_verify.py
shell: bash
working-directory: wai/wai-pack
run: python3 ../pack-conformance/segment_diff.py target/release/wai-pack 1 2000
licences:
name: wai-pack · dependency licences
runs-on: linux
steps:
- uses: actions/checkout@v5
- name: Install Rust 1.98.0
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
command -v rustup >/dev/null 2>&1 || \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.98.0
rustup toolchain install 1.98.0 --profile minimal
rustup default 1.98.0
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Install cargo-deny
shell: bash
run: cargo install --locked cargo-deny --version 0.19.8
- name: cargo deny check licenses
working-directory: wai/wai-pack
run: cargo deny --locked check licenses
# deny.toml's MPL-2.0 exception covers cbindgen as wai's build-time tool: it must
# reach wai-pack through no normal (linked) edge. The second query sees the build
# edge, so an empty answer from the first is an answer.
- name: cbindgen is a build dependency only
shell: bash
working-directory: wai/wai-pack
run: |
set -euo pipefail
err=$(mktemp)
if ! linked=$(cargo tree --locked -e normal --target all -i cbindgen 2>"$err"); then
grep -q "did not match any packages" "$err" || { cat "$err"; exit 1; }
linked=""
fi
if [ -n "$linked" ]; then
echo "::error::cbindgen is a linked dependency of wai-pack; its MPL-2.0 exception covers a build tool only"
echo "$linked"
exit 1
fi
cargo tree --locked -e normal,build --target all -i cbindgen | grep -q '^cbindgen v' || { echo "::error::cbindgen not found as wai's build dependency"; exit 1; }
echo "cbindgen is a build dependency only"

View file

@ -6,6 +6,50 @@ wire format may change and such changes are recorded here.
## v0.4.0 — current
### Packaging: a declared policy, its digest, and pieces cut at scene changes
- **The extension** [packaging](extensions/packaging.md), first sections: a package is
made under one TOML policy, `wai.pack.policy/1` (§3), read in a fixed order with
every refusal named: value kinds a canonical JSON cannot carry exactly (floats,
dates, negatives, integers past `2^53 − 1`), then the schema, every default written
in, then the constraints across members (ladders and their refinement chains,
classes, rules, deadlines against layer lags). The effective policy's digest is
BLAKE3 over its RFC 8785 form, so two spellings of one policy have one digest.
- **Pieces** (§4): `wai.pack.scenecut/1` cuts a video component at scene changes by
integer histogram distance, with a bounded lookahead whose return and revisit
clauses keep a short flash from cutting; a decision reads no frame past the
lookahead, so live and on-demand packing cut alike. Pieces are bounded by `min` and
`max`, aligned across components to the lead, and classified static, synthetic,
high-motion or natural. Y4M and WAV sources convert by stated integer rules.
- **`wai-pack`**, the reference packager, as far as a plan (`wai-pack policy`,
`wai-pack plan`), with float arithmetic denied for the whole crate, and the corpus
[`pack-conformance/`](pack-conformance/) with a second implementation in Python.
- **What a packager may emit** (§3.6): only capabilities SPEC §5 registers as payloads
with a pinned format, in a role each can play, and under `royalty_free_only` only
royalty-free ones; every refusal names the capability (`capability-unknown`,
`capability-not-payload`, `capability-candidate`, `capability-role`,
`license-unclassified`, `license-refused`).
- **One integer video encoder** (§5.5): `int_video_enc` codes RGB8 frames as the
`WIV1` keyframe-0 payload SPEC §5 pins to `wai.video.int_motion`, with integer block
motion search (whole- or half-pel) over the decoder's own prediction, residuals
quantized in a closed loop, and one residual table for the clip; it states the SSE
of its reconstruction. `int_payload::encode_wiv1_zero_motion` is its zero-motion
case and writes the bytes it wrote before. The corpus holds its payloads for every
piece of every fixture, decoded independently to the same frames.
- **`wai::jcs`**: the canonical JSON form moves out of `claim_receipt` into a module
of its own, compiled under every feature set, unchanged in behaviour.
- **Choosing the step** (§5.6), specified and built ahead of the stage that writes
objects: the largest of `q_candidates` (read as a set) whose SSE per sample, in
thousandths, is at most `max_sse_px_milli`, else the smallest
(`wai_pack::encode::choose_q`), with goldens recomputed independently.
- **Reading what a packager is given**: a policy is read from its bytes (UTF-8, no
byte-order mark, nesting at most 32 deep, `policy-toml` otherwise), ids are unique
across every kind, a cut window holds at least 3 scores, a WAV block alignment is
compared without wrapping, and no declared size sizes a buffer; the segmenter's state
is bounded by its lookahead and window. The encoder codes in two passes and states
what it holds (`int_video_enc::working_bytes`), and `rans::RansReverseEncoder` codes
values last-first into the same bytes.
### Staged delivery in the browser, a base writer, a trace and a bench
- **A base is bounded before it is decoded, and its chain from the start**

349
wai/extensions/packaging.md Normal file
View file

@ -0,0 +1,349 @@
# WAI Extension: Packaging
> Status: Draft. A packager turns sources into WAI objects under a declared policy;
> this extension fixes what a verifier recomputes. This revision defines the policy,
> its digest and what it may ask a packager to emit (§3), how a source is cut into
> pieces (§4), and the integer video payloads a packager writes (§5.5). Reference
> impl: `wai-pack` — `policy`, `capcheck`, `source`, `scenecut`, `classify`; the
> encoder `wai-rs` `int_video_enc`; the corpus
> [`pack-conformance/`](../pack-conformance/). Keywords **MUST**, **MUST NOT**,
> **SHOULD**, **MAY** are RFC 2119/8174.
## 1. Scope
A **packager** turns one or more sources into WAI objects, stage indexes, catalogs
and a package receipt, under a declared **policy**. This extension fixes what a
package contains and what a verifier recomputes. It fixes an encoder's choices only
where it names them.
## 2. Terms
- **Component**: one media stream of a package (for example video, or audio).
- **Piece**: a span of a component that decodes with no reference outside itself.
- **Stage**: one object of a piece in staged order: the base is layer 0, refinement
*k* is layer *k* ([staged-delivery](staged-delivery.md)).
- **Rung**: one entry of the policy's ladder: a capability a component's pieces are
coded in, with its role (base, refinement or floor) and parameters.
- **Class**: a delivery profile the policy names.
- **Moment**: a declared span of presentation time with tags.
- **Floor**: a rendition in a standard codec, for sinks that lack the primary.
- **Timebase** of a component: `num / den` units per second. For video one unit is
one frame; for audio, one sample.
## 3. Policy
**3.1** A package is made under exactly one policy, a TOML 1.0 document of schema
`wai.pack.policy/1`, in UTF-8 with no byte-order mark.
**3.2** The **effective policy** is the policy with every default written in (§3.3)
and every override the packager applies (such as a command line forcing
`royalty_free_only`). Its JSON form is §3.3's members, with an optional member that
has no default omitted when absent, and arrays of tables in document order. Its
**policy digest** is
BLAKE3("wai:pack-policy\x01" ‖ JCS(effective policy as JSON))
where JCS is RFC 8785. Two spellings of one policy (member order, inline or standard
tables, dotted keys, string or integer notation, comments, an omitted default or the
default written out) therefore have one digest; the order of an array of tables is
part of the policy.
A packager **MUST** refuse with `policy-toml`, before anything else, a policy whose
bytes are not UTF-8, that begins with a byte-order mark, that is not TOML 1.0 (an
integer outside TOML's 64-bit range included), or that nests arrays and tables more
than 32 deep: the document's own table is at depth 1, and an array or a table
directly inside one at depth *k* is at depth *k* + 1. Then, before it reads any key, it
**MUST** refuse one holding anywhere a float (`policy-float`), a date or time
(`policy-datetime`), a negative integer (`policy-negative`), or an integer above
`2^53 − 1` (`policy-integer-range`), visiting members in byte order of their keys and
arrays in order.
**3.3** *Schema.* Within each table, a key this section does not define is refused
first (`policy-unknown-key`, the first in byte order), then each member in the order
listed: a required member that is absent (`policy-missing-key`), a member of another
type (`policy-type`), a value outside its range or vocabulary (`policy-value`). An
absent table reads as empty.
| Member | Type | Default | Range |
|---|---|---|---|
| `schema` | string | required | `wai.pack.policy/1` (else `policy-schema`) |
| `asset_id` | string | required | 1 to 255 bytes |
| `royalty_free_only` | boolean | `false` | |
| `lead` | string | required | 1 to 255 bytes |
| `component` | array of tables | required | |
| `component.id` | string | required | 1 to 255 bytes |
| `component.media` | string | required | `video`, `image`, `audio`, `world`, `feed`, `avatar`, `film` |
| `component.source` | string | absent | |
| `component.timebase` | table | required | members `num`, `den`, each 1 to `2^32 − 1`, required |
| `segmentation.target_ms` | integer | 2000 | |
| `segmentation.min_ms` | integer | 1000 | |
| `segmentation.max_ms` | integer | 4000 | |
| `segmentation.scene_cut` | string | `wai.pack.scenecut/1` | `wai.pack.scenecut/1` |
| `segmentation.cut_abs_permille` | integer | 300 | 1 to 1000 |
| `segmentation.cut_rel_permille` | integer | 3000 | 0 to 1000000 |
| `segmentation.cut_window` | integer | 8 | 3 to 64 (a window of fewer than 3 scores never applies `cut_rel_permille`, §4.3) |
| `segmentation.lookahead_frames` | integer | 6 | 0 to 64 |
| `segmentation.closed` | boolean | `true` | |
| `ladder` | array of tables | empty | |
| `ladder.id` | string | required | 1 to 255 bytes |
| `ladder.component` | string | required | 1 to 255 bytes |
| `ladder.capability` | string | required | |
| `ladder.role` | string | required | `base`, `refinement`, `floor` |
| `ladder.refines` | string | absent | |
| `ladder.params` | table | empty | by capability, below |
| `floor.supplied_listing` | string | absent | 64 lowercase hexadecimal digits |
| `floor.extra_keyframes` | boolean | `false` | |
| `live.layer_lag_ms` | array of integers | one 0 per layer | §3.4 |
| `class` | array of tables | empty | |
| `class.id` | string | required | 1 to 255 bytes |
| `class.max_layer` | integer | 0 | 0 to 255 |
| `class.max_kbps` | integer | absent | 1 to `2^32 − 1` |
| `class.floor_only` | boolean | `false` | |
| `moment` | array of tables | empty | |
| `moment.id` | string | required | 1 to 255 bytes |
| `moment.from_ms`, `moment.to_ms` | integer | required | `to_ms` above `from_ms` |
| `moment.tags` | array of strings | empty | |
| `rule` | array of tables | empty | |
| `rule.id` | string | required | 1 to 255 bytes |
| `rule.when.piece_kind` | array of strings | absent | `natural`, `static`, `synthetic`, `motion_high` |
| `rule.when.moment_tag` | array of strings | absent | |
| `rule.then.ladder` | array of strings | absent | |
| `rule.then.max_layer` | integer | absent | 0 to 255 |
| `rule.then.deadline_ms` | integer | absent | 1 to `2^32 − 1` |
| `defaults.deadline_ms` | integer | 1500 | 1 to `2^32 − 1` |
| `classify.static_permille` | integer | 5 | 0 to 1000 |
| `classify.static_mad_milli` | integer | 300 | |
| `classify.synthetic_bins` | integer | 12 | 0 to 64 |
| `classify.motion_high_milli` | integer | 9000 | |
A rung's `params` are those of its capability; every other capability takes none.
| Capability | Parameter | Default | Range |
|---|---|---|---|
| `wai.video.int_motion` | `block` | 16 | 4, 8, 16, 32 |
| | `search` | 7 | 0 to 32 |
| | `mv_precision` | 2 | 1, 2 |
| | `q_candidates` | `[8]` | a non-empty array, each 1 to 255 |
| | `max_sse_px_milli` | 0 | |
| `wai.video.int_refine` | `q` | required | 1 to 255 |
| `wai.video.av1`, `wai.video.av1.lossless` | `source` | `supplied` | `supplied`, `encode` |
| `wai.audio.int_refine` | `to_rate`, `q` | required | 1 to 384000; 1 to 65535 |
| `wai.audio.flac` | `source` | `encode` | `encode`, `supplied` |
`wai.audio.int_layered` is reserved for the layered integer audio base: it is not
registered yet, and its parameters are defined when it is.
**3.4** *Constraints.* A policy that passes §3.3 is checked in this order, and the
first that fails is the refusal:
1. 1 to 8 components (`policy-too-many-components`); at most 64 rungs
(`policy-too-many-rungs`), 32 classes (`policy-too-many-classes`), 32 rules
(`policy-too-many-rules`) and 32 moments (`policy-too-many-moments`).
2. Ids unique among components, rungs, classes, moments and rules taken together, so
a reference never names two things (`policy-duplicate-id`).
3. `lead` names a component (`policy-lead`).
4. `segmentation.closed` is true: every piece is closed, §4.1 (`policy-open-gop`).
5. `1 ≤ min_ms ≤ target_ms ≤ max_ms` (`policy-piece-bounds`).
6. Every rung names a component (`policy-ladder-component`).
7. A rung carries `refines` exactly when its role is `refinement`
(`policy-refines-role`); `refines` names a rung (`policy-dangling-refines`); no
chain of `refines` returns to a rung it passed (`policy-refines-cycle`); every
chain stays in its component and ends at a base (`policy-refines-base`); no rung is
refined twice (`policy-refines-branch`).
8. Every component has a base rung (`policy-no-base`).
9. A rung's **layer** is 0 for a base or a floor, and one more than the rung it
refines for a refinement; the policy has one more layer than its highest rung
layer. No class's and no rule's `max_layer` exceeds the highest
(`policy-class-layer`).
10. A rule's `then.ladder` names known rungs, all of one component, at least one of
them a base (`policy-rule-ladder`).
11. `live.layer_lag_ms` has one entry per layer, the first 0, the entries
non-decreasing (`policy-layer-lag`).
12. The deadline values (`defaults.deadline_ms` and every rule's `then.deadline_ms`)
number at most 4 (`policy-too-many-deadlines`), and for every refinement layer
*k* and every deadline value *d*, `d − layer_lag_ms[k] ≥ 1`
(`policy-deadline-unreachable`).
Rules fold in document order: every matching rule applies, and a later `then` member
overrides an earlier one.
**3.5** A package receipt carries the policy digest. A verifier holding the effective
policy recomputes it; it cannot check that the packager followed the policy, except
by packing again.
**3.6** *What a packager may emit.* A packager **MUST** refuse a policy with a rung it
may not emit, reading SPEC §5's registry, never the policy. For each rung in ladder
order the first rule that holds is its refusal, and a policy's refusal is its first
rung's:
1. SPEC §5 does not register the capability: `capability-unknown:<cap>`.
2. SPEC §5 registers it as a record or a derivation operation, which names no payload
format: `capability-not-payload:<cap>`.
3. It is a candidate, whose payload format no revision has pinned (SPEC §5,
*Candidate capabilities*): `capability-candidate:<cap>`.
4. A base or a floor whose capability is not standalone media, or a refinement whose
capability is not refinement-only: `capability-role:<cap>`.
5. Under `royalty_free_only`, a capability the registry gives no licence class:
`license-unclassified:<cap>`; one of any class other than royalty-free:
`license-refused:<cap>:<label>`, with the class's SPEC §5 label. The class is the
registry's, "licensed royalty-free by its standards body"; it is not an opinion on
freedom to operate, and a package states nothing about patents.
## 4. Pieces
**4.1** Every piece **MUST** be closed: its first frame, sample or tick is coded with
no reference outside the piece, and no later object of the package references into
it.
**4.2** Piece boundaries are a pure function of the source frames and the effective
policy. Where the policy names `wai.pack.scenecut/1`, the boundaries **MUST** be those
§4.3 computes. The list of piece starts, in timebase units, is the **plan**, and its
digest is
BLAKE3("wai:pack-plan\x01" ‖ u64 LE n ‖ n × u64 LE start)
**4.3** `wai.pack.scenecut/1`. All arithmetic is integer; `>>` is a shift and every
division rounds down. For each RGB8 frame *f* of `w × h` pixels:
1. Luma `Y = (77R + 150G + 29B + 128) >> 8`, and the histogram `H_f` of 64 bins,
`Y >> 2`.
2. `D(a, b) = (Σ_i |H_a[i] − H_b[i]|) · 1000 / (2wh)`: the share of pixels, in
thousandths, whose bin differs. The score of frame *f* ≥ 1 is `s_f = D(f, f − 1)`.
3. The current piece starts at frame *p*, and `len = f − p`. Its window `W_f` is the
scores `s_g` for `p < g < f`, the last `cut_window` of them; `m_f` is their lower
median (sorted ascending, the element at index `(|W_f| − 1) / 2`).
4. **Hard cut** at *f*: `len ≥ min`, `s_f ≥ cut_abs`, and either `|W_f| < 3` or
`s_f · 1000 ≥ cut_rel · m_f`.
5. **Soft cut** at *f*: `len ≥ target` and `2 · s_f ≥ cut_abs`.
6. **Return clause.** A cut at *f* is rejected when `D(f + k, f − 1) < cut_abs` for
some *k* in `1..=min(L, last − f)`: the content came back within *L* frames, so *f*
starts a flash.
7. **Revisit clause.** A cut at *f* is rejected when `D(f, f − 1 − j) < cut_abs` for
some *j* in `1..=min(L, f − 1)`: *f* returns to content seen within *L* frames, so it
ends a flash. Frames before *p* count.
8. A hard or soft cut that clauses 6 and 7 do not reject starts a piece at *f*.
Otherwise, when `len ≥ max`, a piece starts at *f*.
Frame 0 starts the first piece. *L* is `lookahead_frames`, *last* the index of the
source's last frame, `cut_abs` and `cut_rel` the policy's permille values, and `min`,
`target` and `max` the policy's milliseconds on the component's timebase (§4.4). A
decision about frame *f* reads no frame after `f + L`, so a live segmenter decides it
once frame `f + L` has arrived, and a live and an on-demand segmenter with equal *L*
produce equal boundaries. A piece that follows a cut is flagged a scene cut; one
started at `max`, forced.
**4.4** A piece's duration is an integer number of timebase units, and lies between
`min` and `max` except the last piece of a source, which may be shorter than `min`.
A duration in milliseconds converts to timebase units as
`floor(ms · num / (1000 · den))`; a result of 0 becomes 1, and one above `2^64 − 1`
becomes `2^64 − 1`.
**4.5** *Components.* Every component of a package shares one presentation timeline
that starts at 0. The policy names one **lead** component; every other component cuts
its pieces at the lead's boundary instants, each converted to its own timebase as
`floor(start_lead · num_c · den_lead / (den_c · num_lead))` (above `2^64 − 1`,
`2^64 − 1`). A sink presents piece *p* of every component from that start.
**4.6** *Classification.* Each video piece has a kind, which rules match
(`rule.when.piece_kind`). Over the piece's consecutive frame pairs, with `Y` the luma
of §4.3:
- `mad_milli = Σ |Y_f − Y_{f−1}| · 1000 / (wh · (n − 1))`, and 0 when the piece has
one frame (*n* = 1);
- `changed_permille` = the pixels whose luma differs, `· 1000 / (wh · (n − 1))`, and 0
when *n* = 1;
- `occupancy` = the non-empty histogram bins of the piece's first frame.
The kind is the first that holds of: **static** (`mad_milli ≤ static_mad_milli` and
`changed_permille ≤ static_permille`); **synthetic** (`occupancy ≤ synthetic_bins`);
**motion_high** (`mad_milli ≥ motion_high_milli`); **natural**.
**4.7** *Sources.*
- **Y4M**: 8-bit 4:2:0 (`C420jpeg`, `C420paldv`, `C420mpeg2`, `C420`, or no `C`
parameter) or 4:4:4 (`C444`), progressive. A header that is not `YUV4MPEG2` with a
width and a height is refused `y4m-header`; an interlaced stream or frame,
`y4m-interlaced`; another colour space, `y4m-colorspace`; a `FRAME` line that sets
the width, height or colour space, `y4m-size-change`; a frame that ends early or a
line that is not `FRAME`, `y4m-truncated`. Each pixel converts to RGB8 by BT.709
limited range, with 4:2:0 chroma taken at `(y >> 1, x >> 1)`:
- `R = clip((298(Y−16) + 459(Cr−128) + 128) >> 8)`
- `G = clip((298(Y−16) − 55(Cb−128) − 136(Cr−128) + 128) >> 8)`
- `B = clip((298(Y−16) + 541(Cb−128) + 128) >> 8)`
where `>>` is the arithmetic shift and `clip` clamps to 0..=255.
- **WAV**: RIFF/WAVE with a PCM `fmt ` chunk (format tag 1) of 16-bit samples, block
alignment `2 · channels`. Anything else is refused `wav-format`; a chunk that ends
early, `wav-truncated`.
## 5. Objects
**5.1–5.4** Reserved: an object's identity, its independence of its position in a
package, its name, and `refines` on a refinement object are specified with the
packager stage that writes objects.
**5.5** *Integer video.* An object of `wai.video.int_motion` carries a `WIV1` payload
with keyframe 0, as SPEC §5 pins it ([integer-payloads](integer-payloads.md) §3); this
extension defines no other layout for it, and its decode is that section's. The
reference packager does not write objects yet; when it does, it will write these with
one encoder (`wai-rs` `int_video_enc`) at the step §5.6 chooses. The encoder's choices
make a payload a function of the source frames, the rung's `block`, `search` and
`mv_precision` (§3.3), and the step `q`:
- **Motion search** (frames 1 on): blocks in raster order; for each, every vector
`(dy, dx)` with both components in `−R..=R`, `R = search · mv_precision` (at most
127), `dy` outer and `dx` inner, each ascending. Its cost is the sum, over the
block's pixels inside the frame and the three channels, of `|source − prediction|`,
where the prediction is the decode's (integer-payloads §3) from the previous frame
as decoded. The least cost wins; a tie goes to the smaller `|dy| + |dx|`, then to the
earlier vector.
- **Residual**: each frame, each pixel in raster order, each of R, G, B: the
prediction (128 for frame 0) is subtracted from the source and divided by `q`,
rounding halves away from zero; the frame as decoded is `clamp(prediction + r·q, 0,
255)`, and the next frame predicts from it.
- **Table**: one residual table for the clip, with `offset` the least residual, `top`
the greatest, and `h_i` the count of residual `offset + i`, for
`n = min(top − offset + 1, 4095)` symbols. With `R = 2^16 − n − 1` and `H = Σ h_i`, symbol *i* gets frequency
`1 + ⌊R·h_i / H⌋`; the `R − Σ⌊R·h_i / H⌋` left over go one each to the symbols with
the largest `R·h_i mod H`, the lower symbol first on a tie; the escape gets 1. A
residual past the table's span is coded through the bypass escape
(integer-payloads §2).
- A clip of one frame is written with `block` 1 and `mv_precision` 1, as the format
requires.
The encoder also states the SSE of its reconstruction against the source: the sum of
squared differences over every sample. It codes in two passes (the first finds the
vectors, the reconstruction and the residuals' counts; the second derives each
residual again and codes it last first), so beyond its input it holds the
reconstruction, the vectors, the stream and the residual table: at most
`n·h·w·3 + 24n + 12·v + 3·(2·n·h·w·3 + 16) + T` bytes for `n` frames and `v` motion
vectors (`int_video_enc::working_bytes`). `T` is the widest table's, of `S = 2·255 + 1`
symbols: its fit, `16·(S + 1) + 2·8·S + 4·(S + 2)` bytes (a frequency for each symbol
and the escape, an index for each symbol and the sort's scratch, the table), and the
table's three copies and the payload's header, `3·4·(S + 2) + 64`. For a clip past the
format's caps, which the encoder refuses before it allocates, the figure is `2^64 − 1`.
**5.6** *Choosing the step.* For each piece, the base encode of a `wai.video.int_motion`
rung chooses its step from `q_candidates`, read as a set (a value listed twice is one
candidate). It encodes the piece at each candidate, from the largest down, and chooses
the first whose `floor(SSE · 1000 / (3·w·h·n)) ≤ max_sse_px_milli`, where `SSE` is the
encoder's (§5.5) and *n* the piece's frames: the largest step that meets the bound, so
candidates that meet it alike are decided by their step. Where no candidate meets it,
it chooses the smallest. The function the reference packager's base encode calls is
`wai_pack::encode::choose_q`.
## 6–11. Stage index, floor, classes and delivery, receipt
Reserved. This revision does not yet define a package's stage index, its floor, its
class plans and catalogs, its receipt, royalty-free packaging of a whole package or
re-pack equivalence; they are specified with the packager stages that write them.
## 12. Reasons
| Reason | Where |
|---|---|
| `policy-toml` (not UTF-8, a byte-order mark, not TOML 1.0, nesting past 32), `policy-float`, `policy-datetime`, `policy-negative`, `policy-integer-range` | §3.2 |
| `policy-unknown-key`, `policy-missing-key`, `policy-type`, `policy-value`, `policy-schema` | §3.3 |
| `policy-too-many-components`, `policy-too-many-rungs`, `policy-too-many-classes`, `policy-too-many-rules`, `policy-too-many-moments`, `policy-duplicate-id`, `policy-lead`, `policy-open-gop`, `policy-piece-bounds`, `policy-ladder-component`, `policy-refines-role`, `policy-dangling-refines`, `policy-refines-cycle`, `policy-refines-base`, `policy-refines-branch`, `policy-no-base`, `policy-class-layer`, `policy-rule-ladder`, `policy-layer-lag`, `policy-too-many-deadlines`, `policy-deadline-unreachable` | §3.4 |
| `capability-unknown`, `capability-not-payload`, `capability-candidate`, `capability-role`, `license-unclassified`, `license-refused`, each naming the capability (and the licence label) | §3.6 |
| `y4m-header`, `y4m-interlaced`, `y4m-colorspace`, `y4m-size-change`, `y4m-truncated`, `wav-format`, `wav-truncated` | §4.7 |

2
wai/pack-conformance/.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
# Hashed files: a line-ending conversion on checkout would change every digest.
* -text

View file

@ -0,0 +1,96 @@
# pack-conformance — the packaging corpus
Vectors for [`extensions/packaging.md`](../extensions/packaging.md): the policy, its
digest and what it may ask a packager to emit (§3), how a source is cut into pieces
(§4), and the integer video payloads a packager writes (§5.5).
- `policy/` — policies a packager accepts (every rung one it may emit, §3.6), and
`expected.json`: each policy's effective canonical JSON and
digest (`example.toml` also with `royalty_free_only` overridden to false), and the
pairs `eq-<name>-a.toml` and `eq-<name>-b.toml`, two spellings of one policy that
must have one digest: every default omitted or written out; standard or inline
tables, dotted keys, member order, string escapes, integer notation and comments.
- `refusals/` — `policy/*.toml`, one fault each (the byte layer's among them: a
byte-order mark, bytes that are not UTF-8, an integer at 2^63, nesting to depth 33 and
80), and `source/*` (Y4M and WAV), and `expected.json`: each one's reason (§12). Every
file is read as bytes. A policy's reason is a packager's: the
policy's own (§3.2–§3.4), or its first rung's capability refusal (§3.6), read from
SPEC §5's registry. The source files are written by the generator.
- `conversions.json` and `conversions/` — milliseconds to a timebase (§4.4), a lead
start to a component's timebase (§4.5), and Y4M to RGB8 (§4.7) by the SHA-256 of each
frame, for 4:2:0 with odd dimensions and for 4:4:4. The Y4M files are written by the
generator.
- `scenecut/` — `policy.toml` and `expected.json`: for each fixture, its SHA-256, the
score of every frame, every piece (start, frames, flags, kind, and the statistics the
kind is read from) and the plan digest (§4.2–§4.6).
- `encode/` — `WIV1` payloads of the integer video encoder (§5.5; `wai-rs`
`int_video_enc`), written by the generator, and `expected.json`: one for every piece
of every fixture, coding the piece's first 12 frames, under a whole-pel and a
half-pel parameter set; for each, the encoder's parameters, the payload's BLAKE3,
the SSE of its reconstruction against the source, and the SHA-256 of every decoded
frame. Identical content gives identical bytes: `kinds-01`'s pieces 4 and 5 both
start inside one static shot, so their first frames, and their payloads, are the
same.
- `qchoice/expected.json` — the step the base encode chooses (§5.6) for every piece of
every fixture (its first 12 frames), under two bounds: each candidate's SSE and SSE
per sample in thousandths, the step chosen, and the chosen payload's BLAKE3.
The fixtures are not committed. `wai-pack fixture gen <name>` writes each from its
definition (`wai-pack/src/fixture.rs`), every byte an integer function of the frame
index and the pixel position, and the corpus pins its SHA-256:
- `cuts-01` — hard cuts; a flash exactly as long as the lookahead, which is not cut;
a fade, which is not cut; and two shots cut against each other, each return a cut.
- `kinds-01` — one shot of each kind, then a static shot longer than the longest
piece, cut where `max` forces it.
Files are compared as bytes; `.gitattributes` turns off line-ending conversion.
**Generation.**
cd wai/wai-pack
cargo run --release -- conformance regen ../pack-conformance
**Verifiers.**
- `wai-pack conformance check ../pack-conformance` recomputes every expected file and
every generated input and requires them to equal the committed ones, requires the
digests of each equal pair to be equal, decodes every encode payload through
`decode_int` to the encoder's reconstruction and recomputes its SSE. `cargo test`
runs the same check, with the scene cuts of each fixture stated as tests
(`tests/scenecut.rs`).
- `pack_verify.py`, Python standard library only (TOML through `tomllib`, so 3.11 or
later) and sharing no code with wai-pack, written from the extension: its own policy
schema, constraints, canonical JSON and digest; its own Y4M and WAV readers; the
fixtures regenerated from their definition; `wai.pack.scenecut/1` in its on-demand
form, every frame known, against the vectors of the streaming segmenter; the
capability rules from the registry's published export
(`../registry/capabilities.json`); and every encode payload decoded to its frames'
SHA-256, with its SSE recomputed from the regenerated source. BLAKE3 comes from
`../claim-conformance/_blake3.py`, and the `WIV1` parser and decoder from
`../int-payload-conformance/int_payload_verify.py`.
python3 pack-conformance/pack_verify.py pack-conformance
- `policy_diff.py` runs the policy reader differentially: byte-level cases (a
byte-order mark, bytes that are not UTF-8, integers past 2^53 and 2^63, nesting at
and past the cap, control characters, line endings) and seeded random policies with
faults in every table, each one's verdict and digest from `wai-pack policy-verdict`
equal to `pack_verify.py`'s.
python3 pack-conformance/policy_diff.py <wai-pack binary> 1 3000
- `segment_diff.py` runs `wai.pack.scenecut/1` differentially: seeded random clips
under random parameters, every piece and score of the streaming segmenter
(`wai-pack segment-json`) equal to `pack_verify.py`'s on-demand form, and every piece
within `min` and `max`.
python3 pack-conformance/segment_diff.py <wai-pack binary> 1 2000
- `source_diff.py` runs the source readers differentially: seeded Y4M and WAV
mutations (dimensions and channel counts at and past their range, every format
field, truncations, single-byte changes), each file's verdict from
`wai-pack source-verdict` equal to `pack_verify.py`'s, and no reader panicking.
python3 pack-conformance/source_diff.py <wai-pack binary> 1 3000

View file

@ -0,0 +1,149 @@
{
"ms_to_units": [
{
"ms": 1000,
"num": 25,
"den": 1,
"units": 25
},
{
"ms": 40,
"num": 25,
"den": 1,
"units": 1
},
{
"ms": 39,
"num": 25,
"den": 1,
"units": 1
},
{
"ms": 0,
"num": 25,
"den": 1,
"units": 1
},
{
"ms": 1000,
"num": 30000,
"den": 1001,
"units": 29
},
{
"ms": 2000,
"num": 30000,
"den": 1001,
"units": 59
},
{
"ms": 1,
"num": 48000,
"den": 1,
"units": 48
},
{
"ms": 4000,
"num": 90000,
"den": 1,
"units": 360000
},
{
"ms": 9007199254740991,
"num": 4294967295,
"den": 1,
"units": 18446744073709551615
}
],
"align": [
{
"start": 50,
"lead": [
25,
1
],
"component": [
48000,
1
],
"units": 96000
},
{
"start": 3,
"lead": [
25,
1
],
"component": [
30000,
1001
],
"units": 3
},
{
"start": 29,
"lead": [
30000,
1001
],
"component": [
25,
1
],
"units": 24
},
{
"start": 48000,
"lead": [
48000,
1
],
"component": [
25,
1
],
"units": 25
},
{
"start": 47999,
"lead": [
48000,
1
],
"component": [
25,
1
],
"units": 24
},
{
"start": 18446744073709551615,
"lead": [
1,
4294967295
],
"component": [
4294967295,
1
],
"units": 18446744073709551615
}
],
"y4m_rgb": [
{
"file": "conversions/bt709-420.y4m",
"rgb_sha256": [
"c1d16f98e2ae61ba8cca146cb1856b462e5c7641590ad651fe727658377253a8",
"badec76a4621b64df3cf803df18c58e08d70ced9cf716dc6b7b7fb7fd278e74d",
"6d5c08c958a6cbe09257dddfa9976f9c0bdd9943995ed886b1334d4389586629"
]
},
{
"file": "conversions/bt709-444.y4m",
"rgb_sha256": [
"d2d8ef122db155d44015cf30ff760bc2744cecedba19c6f0388f09dbb207acfd",
"ede0a218313910474b8bfd8e7d1fd5743328b800822516c760214e6fb55a711b"
]
}
]
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,733 @@
{
"policy": "scenecut/policy.toml",
"vectors": [
{
"file": "cuts-01-p0-a.wiv1",
"fixture": "cuts-01",
"first": 0,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "82c184824929e7d9d5991dfc687afa1589c0b3481771cf9828b509cede8316ab",
"sse": 65860,
"frame_sha256": [
"3cff6258acac16c58a4ad3707c76d05262c9a3c52b425e95b6f0fc5f5a67a03b",
"775e7a28d505fdd2f71b380ca2fb1053b115607b1f042941f8a0e7efcfacbf5f",
"ba2a788bae4a580fb412775763d1f0c4ec1c78f73345f27dbcbb7fd63a8be2cb",
"09fc77f8b2a7d0d529440636afea3130fdaea4a40f3a1619b3a25cb252cb995a",
"99853f11c57fa1cb916b50a3907f2f26e9b1022813c0c10e064c1c6cc7696dbf",
"b8881b58cba208757ee26f612dca8494f0b062c656418923733c26cf7b215adf",
"9984f48f5741d491691494ae417b58cd115f87bc3749d1f8cdfab5ab5aa56982",
"3b7f3aca06bfa97ad0d6b8e47b989206367a2b5b7c695e1ba6411f84ed37a020",
"8f98003b3bc9d33133f2b95565ad322b40595caf535c87eea937800fa1a3c71a",
"82d39aaa6022f22b11eeaf40106114d6c9585fb6c723f3b40b7cbd8984cd2565",
"9cc5a18e35c7474625f0f5654366d5b41481d06c81c0ad87f7fba9f4467fc050",
"88d140509801b044a5a951f766fb89141ce8619daf622743f7318e34567d6599"
]
},
{
"file": "cuts-01-p0-b.wiv1",
"fixture": "cuts-01",
"first": 0,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "a835e73bb923b83f4ed311fe382f3609032aec574b96463f40251dbc574d7aba",
"sse": 95473,
"frame_sha256": [
"d61975126ffe62cd0c8179814d385bd21d1a488c54442a3f7f6624f96da91585",
"6c8319fe6d1da2d1a4d4215acfca5abafc74f19208f9dccb351fbbdebf699ae9",
"6bc6e5d7ee2f32017c118494c4fbe099affe0395d43478ef1f4e169f3702c556",
"16d98f4b5c7eb132ed1009be567410840ac030f5a3941c180c9ee975f352f95d",
"4a9b19772544b266175415f82340b87ca50cf3b09d3afb71ce5ee4a7a97f0f6a",
"d9720d1ba4f03a92320c8e832dd191e4d910c158d4047071ad53d0e0950851b3",
"ea96e194c26247b5e77bdcc51c5aacc65ac353e29399a177f6bf6befb3ccb16f",
"bcaa9f33e72c3275c15add4dc028b6942454eefab7d1e2af03e8160d11270ad7",
"a28f0b51bfc5de0a41de9ead89b46eba5435a930cd364cf9fa5e5803ec45efe0",
"38d957495ad5717f819b82f6ecd75ad3c805dbd2c5b9c773a52049902330cb61",
"cc81641d12b00fe39babae6ac6a23b2da1f2ff30204c86e9ba486b7f396b4d14",
"18833421f00fc69cc3520fc85a90ba0991aab8f1716d13ffc0a8da9fd5ecf520"
]
},
{
"file": "cuts-01-p1-a.wiv1",
"fixture": "cuts-01",
"first": 60,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "a388b8ed1dc3b532aad8bd329e0e546460353eb72220b9113aee1b34c21cc3e1",
"sse": 61086,
"frame_sha256": [
"0ddfa6419692edfe727cce0a774ddfa90516ce8cae1ccc26d3f65512e82cc7c3",
"7360b6caab29d4fbaa2cf125d876f63a677e43fdc802de511f5a7073f0adbc5f",
"a503089b91621337b021d029200966d04dafc9cb80959d2e9e96f40a473aff17",
"d4c39a7b272c5f56bb0abe79cf9b0b68b75f4363926e90d5fa4a0951eb060552",
"42215a6423d562c2be3ede40172dfd67ab9859bc71f5af489fd5728a06b936ca",
"63293c12d046216725e6214b7b4e7251144bdf37371356d7db8e89746ebdecbf",
"756921c96f341be33166e35a26afa2f2b7e388e860f8611c08d2cd0e3676af60",
"4f43844c3c4fb1d67277bbcd4469c5c5455949a3fde317c40741871243bb5e2e",
"5370d5765038a88ce3114cf8639f4c30cc9a7403f7c6dfd06b1d299b0b58590d",
"3b46a945899e664cf5a05aadb97f07430bb9e40041e03c017b979b41545146e0",
"b5a53d33f86112860ee152276be85036b4e2d0cf43d5b171b1b1f84a821f3c65",
"9437ca4d407f9149a663613ca81dcc69e0e5d1257b1d6765642875ebfe1b5c95"
]
},
{
"file": "cuts-01-p1-b.wiv1",
"fixture": "cuts-01",
"first": 60,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "55190c77200c5a97951880b1848ed80ace658d7733224217cb7aef73d360bc23",
"sse": 226928,
"frame_sha256": [
"489d38c594d1d24925b3c6dd4aee6c01dae46cbae982e6ff4c33e7836b1ed916",
"2540eec6032a5a00ce4e13ce27799c88776c6a58b13b37cbf417cc8ebda7d2cd",
"e265c616ec2287e9ccfecb5eb2e2788d6e4607980479d6716a6af0cc731545ca",
"12f70afde687a334f57a03267fc9e86c9d025821ee865fdd599be6bce06ad23e",
"a7b9bc46d5678197831564b5359c4582dd7be355d0ee0baf29909ba3f8524f04",
"d80bb3788a5ec8269a6a7bd4abf310d4001213189102f8037598b9912e9e9217",
"5c82b24ac3a2d1d152ad1d778909068a6c929f73fbcf2b6e00c68ca00659e9fb",
"f31a3d7418ab38a1d6e6e85717200927939b446f29ccc8b35d198fbcd56c0c18",
"bab59398765097e1052a15422cf75e58792dab694f91f4fe8cd0fb9c86f09a6a",
"ea631566b0a902ded4de7f61a686a03ca9a002869fc28d1b97f04ea9affe878f",
"4e65728d70e58830cd22aecca93ee1d6a0238fcad2c1657cff367e7e53bb7726",
"181baedde018d87ec28c85e4564abb90d77a405f02b9fe8c06c8fef5cbf1b104"
]
},
{
"file": "cuts-01-p2-a.wiv1",
"fixture": "cuts-01",
"first": 140,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "f9461140ea940cb76ba37222527f6ce53b44f8b3eb9f5b7fd2bdf7bdccb61368",
"sse": 66866,
"frame_sha256": [
"bfd8abd42fc38591b062c9e3c9bd46ff6f2e176dde35372f4f280a706d2e1428",
"5b918970bbdec28e71c1edf1c5219bc3d1c85078963a22b8b0540620957d8c4b",
"dee2a4ca2d1e1c7387d08878f5c0fd11d70122fd0637c06b017ff57e36337125",
"aed26a7cd9788ac3ee339011c81ccec79370e3f15742692439a6e9d8a5ece972",
"be3a20ba6b953befa4d7dd1c5eb87304afebaaa358176c8287c249e78d28c4cb",
"c74c42cd26c8e20ee024636a24e58df134742ec51a80bdbbbf8591990ab8af73",
"646f9a83b42ddfd0c8e881ad98fba922fc6bb24908c5a49fe3afae9339e7a039",
"65c581a720835f8e9bc40d0bbf6a52eb93bbcd21dafb73cb533941b30a6ca7ad",
"7fa69bfa5943cb86bb19818cad136ca88572be84ec614146292978df50b98f0f",
"309bc39bd6c26991610db4262d6f3e3e3c793f927a15a0452b6d4d633952df62",
"3e1ca46691a1ce9d6901754aea3e8c6d8dfd4e01f341d71abd255431f7cfaf74",
"4b3af663ded21072b293bb0cead7b9dc7588ba6d139ee66ff088764b139822dd"
]
},
{
"file": "cuts-01-p2-b.wiv1",
"fixture": "cuts-01",
"first": 140,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "57f1d8509277334917b1d259cd203f36c809035e48f7ef3ee387ad3c1a1c9558",
"sse": 200595,
"frame_sha256": [
"4b2c07361dc312814ba40429509702347834b3c1f268acd7c15fb3a12a91325c",
"68acbe75e013f2fb53f6784ffff8a87243bd7bc338d9ed40fe5535d9a56d0163",
"0e527ffd2e12e0d97f9c6c6c8b1dcea80ebd769b923bf4f5f0e84747aec25e62",
"950bc59e3a2d7904fab1c73f96707c32aa41452b52cd2fd974e0a358ac9162bd",
"634dda3ec5f48b85b1d66a9c434beed345388bad4d3f708e08a5652486c3a0e6",
"9de2a3e05f104b7b66f403746ed17b8d65a2cfc563dd424367612abb28b3891c",
"08dca5625e2546b0fa6fafd3b0675ad4b26d0541248449eaf8acd09d6bc88bcf",
"6017249d3ed59a9293392b084634e3636e6f83d0c9fc2b64905e3990bb628a85",
"057ed2b9d3381a5886bef62003010d04a72bb46c1fbbc51882be5465bf2ed5cf",
"7f870e2527bca27567208fda37d91766bf95556fda0673382839d1d4fada9d50",
"14801b3c7a378898c9bc0b2db986b658923627fbd2e9ecbc145cfee308db5968",
"9151742aa699e767051d7a19847c7d13eaaf33f6ee877ac9c7275ab4dd33d0f1"
]
},
{
"file": "cuts-01-p3-a.wiv1",
"fixture": "cuts-01",
"first": 230,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "24757f506b83c54fad024dc97b1755dbdffbaaa5ca2cfff39aaf387c5dbff5ff",
"sse": 66685,
"frame_sha256": [
"741d9aa7f272dff807a69426deb7ab150c0a9c65361c50ab5d6c2fe9a8917881",
"97671870c5e1303babf547307ad54fa6cd6f1ed79daa3130fce255ab0308465b",
"5c5701477647d1458fd8f611ce94945b6ca88ebdd369a09ad5cb028a01a7a61b",
"49f03b827871f4b57f3a0eaa00c4cd64dba330db18aeddc39fb10baa75e168cd",
"6e683fd3677e503fde52a0ab1b06fe0254a7ba80635cf8d2808ba19ac4c15781",
"e243f3d1960e56127477615659d129e9e516d2741af05d20c8f6bf3522e31c02",
"b6d302fe0016c15abea4e1aba6eaa83ccce710740268318b0b524603c7926e46",
"0b671d71319eb0c2be52e41ee71741df6b8e0a6291ecf346f16381b0fed91f87",
"7016c4f757189b73ded10f978a3010a8bc5308fe99fd82a7979b7c7b3d95217e",
"d87256be1a85762feaa927557cf0ecc986b4d6822460bde82056b7b7644e4977",
"17aedec95ff51e9180db0bfc3bb5f260adb8d7b57d9c4d0293e78af75348505a",
"47f2d8dc9da1faef46cea538d95ffadb701bb387f6ab19a61e4854f331b6da4b"
]
},
{
"file": "cuts-01-p3-b.wiv1",
"fixture": "cuts-01",
"first": 230,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "83ca0892f4e8df6f3b585812fe68cb4e49dcb12f5c077d3eb3a91d2a6812975e",
"sse": 99914,
"frame_sha256": [
"f485f514c21faf5930b378242c86c59c632b0d26fe09443509348ce9b78cf911",
"d37665e84c8e5c4a46dcc65596dbfe4fe138aa37dcba7c8466b1e75fdbd35b7f",
"a80dc8e54202808636785cf23a5a3d81b46b29d65f25ba9bf156a76a6ac1e74b",
"7c74e4083958683343380239c151596f07adb444aab1ff8977711e4ef8a4504e",
"dd690998c665122053f58f6f4e15db9b6de700fd8c381fb898a982d9cd822825",
"88b40d4536bc67981629da9e7cd27c43ba613afe4ce874d9554214f92992ab09",
"b46d8eefa654477694edfdc9c66d296721a3d51f59c1423ba08dda0446981236",
"bc9fad021a3ba3fd63159814142e322e560a5757427edba4fc6998ae99df7426",
"460e3c38b7ef0ea9ec65deced48740d3c4c6b583fcf97217f935e7fa7b7ddd99",
"4798590ae15cb92ab6be61a40ff3f2acbdad3b11cb2e9a152c824f0f71fe86b4",
"93118bf43f6c23ae618bc35ff49ed4bcfeff253f230d7e4b7d3ad1349406909f",
"6536fec63f0780e9d8f6448993bbd880208d553f7cf7265f007f27b8adf2f52c"
]
},
{
"file": "cuts-01-p4-a.wiv1",
"fixture": "cuts-01",
"first": 260,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "341a1d752c0b9f4a422fe4f5e4f09926a4b5133a1a872cc34dc83f538a7bc96f",
"sse": 59834,
"frame_sha256": [
"8f2a997446d807b75ebb926e6798787346783e282fdc497e33c6b7c94d0ccaa1",
"c0eba080aa1c3a7c7b31a3dd26c4cab3a008a22d5dd2448465846025c78bec92",
"0524a4ca1af3f5f173e29057c9c66ec0162c96a88521423b3f4bda11474091de",
"6d60a170f6a018bc3d7a43b142f62fac6a0a75b5a8638d31730c5922545afc05",
"d69df67ac682c995324e5b5fd0c240604321e7ac903f3012441190bc193787d1",
"5b62bf515799d04ad4d559f2d6b74e7c672914f33f1fd979659e01d8d7bab8e8",
"01f04313d29874b66a562dcdfaac3ecdb516eb2cbb25c4b79e49704e829473b4",
"7a7c143b0b7d5e9c7dbe59b7d9610d595b89a881e52498d11473b5a2c12c1e0a",
"ceb3262e5f0341ea0aa52acabe4b42f9ef6e6a354d6cf1b9147a706c1a99be35",
"17cdcb7324d9ddcd814f2adaffd3044c2491cce7d71a91be78fb04987f569fd7",
"1490026fa8c7c33dec7bffd96f512b3e18c63de43b029e4e06dec846f4b12c0e",
"6a9e9d4d4b5b3eb738b77bef39573b89b7fe3da077198ffe9fc99b652e4accaf"
]
},
{
"file": "cuts-01-p4-b.wiv1",
"fixture": "cuts-01",
"first": 260,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "37e32ee5720049a3f0d668dc1f4a0bb2978ea1d49b9e9cf76ffe195c5936742d",
"sse": 109604,
"frame_sha256": [
"4659e05e960a980570ecb9a4ffebc03d85b9c1c14907a49474e9db1459ebd2cc",
"52f5bc85870434352d0acff7a7ab1e45e6e9ccd2fc2c9c337d903ea32b6d206c",
"1daf47029011a0b7c8332af995ebbf68f5309df2e55c805ac277cced51eceee1",
"61d309d8d83879032facbb9135f48010cf22b5ed588b4a91a46321547a5b1eea",
"89c37e10114310bb9fa47408d4b048fd5676d99c4ae09c5cf2b5cbd4a497bb62",
"d0f30ad1ce46f3f4362ad80ecf709427fc4d31cb70a1c68dbab37f831a0e0b52",
"33c89819fd9df62ec7b1f17c2facad6d67fa7cf748cf9e8f0aa315b768f1c192",
"e8ca9ff1fdd0ccb7bf77286db2c7bd37bb08cca598c572f052482287d2549652",
"4474d853a434c3bddf3ced9a9850f80b27ec8def92142d4c9e8c5567b2367856",
"6cb4606675ebfee11cdf731f34fd5dbec42f9a68dc2f68392ab6a533d4d27436",
"3cb0293ea46c6b2df1e6f473a20f68a0ad95a8f3ab4bc75a2134eb1841350f60",
"00c991f91d34cf92df5144e37d14a8abab93832f07091681551af5ecaba1b471"
]
},
{
"file": "cuts-01-p5-a.wiv1",
"fixture": "cuts-01",
"first": 290,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "619d1e788f863ea4b7cfebc2e6acdaefb1982746152adf5621e83923a5f25775",
"sse": 67743,
"frame_sha256": [
"0ad90eabc1d71d2313439d656439123448881bbf44b3c9300aaf124af74fee8f",
"513a26f17c8f984e318cc377f09fa6171d10f38d0558f4d5062aa89c7d1d28e8",
"0139bb0f3953e012eb132fab962e500b0b9d162c2d8160a0c2e9918fc7037a7b",
"2ba7d63410ae1f30bcee8a8f2b502f04a02b31794f6e6dbf856cfb07ad0dd6ba",
"738f68f9b8311603908a85e3a5ab87f970d1cc7916db03f706ff67e2444a5a8c",
"0c5bca8d6f5a4bf40b5de0de8f8322b094f07573c6855e6f0a59766c382bd3f4",
"816e5a8288382299eb7d73403d1b9b1c05ea2e62a04adf8a565babc37a4aa2cf",
"425f53d979c2e71cd09abac8b1d4c7b3a95b7a7911d8d8b18059054e2405ca1e",
"3af775795fc514976a2a648a94bf11a15b402662c56492571a94104f124f76b7",
"9a66ce4a620bb74843161fec086676ff201a1ac3bae91e57a142be8eef87e5bf",
"63b53b5c6f02e381012291097f5c3f7586a0211e1c37b128f576584785a4721c",
"d5269b47ef0790975172fdc1c59f95e171fd0bb3b35337301da42f21df70470b"
]
},
{
"file": "cuts-01-p5-b.wiv1",
"fixture": "cuts-01",
"first": 290,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "2e0619405b65904fa192eb79817a8380a6f224463319d18170c1a4960dea0053",
"sse": 95548,
"frame_sha256": [
"0fab47a2cc7f382016ef5d97d9f105efee6984437d0a00f742572cd0720e0181",
"16182e73392878e8e5de6855154b69715e4c493ceb7d20f6ac5fdc0c5af0235b",
"a51a1d4d3d0c8a7d494ac56daf24ce0184aec5bb7324bc6090904f6cc884250a",
"99416a45d18ee6dc02f75bbaf97b7f9fd9fb1b2b32f45f6f907907164aad5eae",
"acd7f955b7092fe58abe31451e2506ecda04e59b8cc0712a4141de5aad5695ee",
"5bc2728817a6f623bf4a6c6be2fd0473ab0019b32b703a3024fe2e9ca88d3246",
"a18b69ca838096b5633d189e49ea18c6b4db43fd52c02dd6b273ba9175a46fe6",
"bc44c51e7886286782e70a3bd6e3b548948f0da9dce55cd7416df808ced8f6f4",
"0320a0a6d197cdb97a7e6ea99b691edd1fe42ea776c23d5dedec30ab8abb039a",
"692574c81a73bc8597f828e9d5d235b0a395796fc069c25a653156bfa583e6bf",
"b43eb83fde913a7b85b30a5b6e9713be7091235a0d03718affd03c986f6bb261",
"8cf6cccf9c6273bf00762602785da56de609c20da478710e0c54707e7364e390"
]
},
{
"file": "cuts-01-p6-a.wiv1",
"fixture": "cuts-01",
"first": 320,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "488ec040b6ef5d1ca32967e8bff948c2791f54e4e11d8ceca952eea82fc2d2c1",
"sse": 59254,
"frame_sha256": [
"64d71ac5eef11803dda0ad2b883642a6f03753cb68c7c91ac3833dd3a22df683",
"724b5f3c2fef10a077ac785a42319991ee1899335b8b5057b6215dfce05b99a1",
"2166ea9d196c509a43f466cf9139dbb1ee8583f702a8d22c89b515a27c27bf3a",
"c2af90a520055fb3c11b42d9bed536d93a4d42bd575de5bb62b087bf6ec4e4ce",
"1d2832b9e20e1540904991b958859b63a53acd20fa17a61dd73f550304001484",
"41629bfe6117547a3684fc7b7827ec859ec9c1c08009753c22e6ce24d29264dd",
"86f0a50d8674ac11fe8d5ad1d96459ee410ce272940803272a20d43c777e0454",
"bbc9280cf47fb337e07187df9288f1f4e76e8d7e5b7ef097f9dc02cbec88bbcf",
"f75c5ef8f7005e1a965019235ec73c9957669bcab166f7e5c37fc2af75ef6330",
"67cd329a969f86cf3a6128fd80b5d58fd082b4ce8f8b797c3e27b926f85a76f5",
"ef20daf7c1393e58eb623900b31906232ae589bbee3a726a0aefb291d22855e6",
"098c6f4d63ba6f845c051c94939cba73a914b26931284e085df34aa13f254bcc"
]
},
{
"file": "cuts-01-p6-b.wiv1",
"fixture": "cuts-01",
"first": 320,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "fa4beffbc761f4e1f85d223b0f03a33e56639c8d309e2c1789796d2be2c3a539",
"sse": 97827,
"frame_sha256": [
"b12594c0e48af37386f5b12367b159cba8c169469b5ef99dd6e0f87c0edb156c",
"eb5c25b5dfad7b463c699ff3df85e51ee323c14518b44bb501488e9487f47f72",
"b66d5f6c510462bce269c75aa79d99dfe647f91faa33f6bcbba925e91fa424c5",
"cd724a8ea45fae24601a9c3f1e8f4b8d7ac99db20b84616c34e0617bd399a8fa",
"ac50e780c399d22147c062159f64b42759d29bc5bf30ff5bc9659b8ef6b1ef35",
"c3cd1c6a85e3a114f62555591523960db66b7dd3cc7a786b8b97823dce59cba6",
"52e533a854bfec84a0bd05cf8ff9574ef4404891444403a95a3c3dbde2fdd4bd",
"845f1a9c5c170f8b0f561858b85db2bbfa7d14fd94f92594b5816b95d0600028",
"a421cbc0a63d9aad0ff7fd4bb489f5591252218af648aab0067054931ade1cd9",
"6501e9384c4f791310aafbf27a2acd01993df8fa0175775b39f83cdcdf02d180",
"0db48da95f5bdce08144367732b4432e84f8fac23701a4e3201ec661093f38e9",
"a83526b03feeb9cde0571614508f3d8bc7891643bbd8816673b20864dd6b8c67"
]
},
{
"file": "kinds-01-p0-a.wiv1",
"fixture": "kinds-01",
"first": 0,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "5eab0a221e47ae51e5baf1d52cca4655bc2d0dfdf446af29dd1a7a2cb29c5dd7",
"sse": 68688,
"frame_sha256": [
"0a2938f2c054edfe16070bfdeaa0e170d610ce06745cd54f4763a1457ccb26cb",
"e56c28da016321b769b84c7e7a3ef22c7ebdeeae3a5417bd1efdfb5e09b4a01f",
"0a2938f2c054edfe16070bfdeaa0e170d610ce06745cd54f4763a1457ccb26cb",
"e56c28da016321b769b84c7e7a3ef22c7ebdeeae3a5417bd1efdfb5e09b4a01f",
"0a2938f2c054edfe16070bfdeaa0e170d610ce06745cd54f4763a1457ccb26cb",
"e56c28da016321b769b84c7e7a3ef22c7ebdeeae3a5417bd1efdfb5e09b4a01f",
"0a2938f2c054edfe16070bfdeaa0e170d610ce06745cd54f4763a1457ccb26cb",
"e56c28da016321b769b84c7e7a3ef22c7ebdeeae3a5417bd1efdfb5e09b4a01f",
"0a2938f2c054edfe16070bfdeaa0e170d610ce06745cd54f4763a1457ccb26cb",
"e56c28da016321b769b84c7e7a3ef22c7ebdeeae3a5417bd1efdfb5e09b4a01f",
"0a2938f2c054edfe16070bfdeaa0e170d610ce06745cd54f4763a1457ccb26cb",
"e56c28da016321b769b84c7e7a3ef22c7ebdeeae3a5417bd1efdfb5e09b4a01f"
]
},
{
"file": "kinds-01-p0-b.wiv1",
"fixture": "kinds-01",
"first": 0,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "341153c23382e50a91c4dc55f3629eb2e4eba4f2cbfb1f915c39285fbedfb871",
"sse": 95508,
"frame_sha256": [
"3e2acd0885cb6d953a705f389aa193188c1096df6267ee1b91b02f88c3928e2f",
"e78a475d495a65b873c30709c4c385deea80fc103c76c58d4e2904de7c436937",
"5a13e54a747ca7bee9a9f43b644447fe7feac723b4e245b837a6ce95e536b1a7",
"0369a08cb0dbd89889eb59a5cceb5d7f95768f06a7878cd815f4a669fdd57832",
"e982a3d83dd5504e93dbcfe98d27765713fdbb769e3cae4c4d97b8afcd5e2f9c",
"8c7a5152ec456e110a25e07d0108d42235c236e8097f01fb152b25a289915d0c",
"ce609c46df5240e3aa9601a686bd28af91ef5432ed884209e259938421ad867e",
"c5fba24d9fea260881b3f0a3a81ec441b8efa379e0012fcfe1914f543d51b193",
"07a68646cd3246a31be6099ec2c07d70e57177a634a51f6843af4700f03e98b6",
"9e6f20598a9dbcbc2e155cf826c50ec60bad8a51cfb66ea07d39a9b1fe1ebf90",
"c288d71734a35b3e31c9e74e248daf03a1a3651214c7e6e80acdb1567c0e89b4",
"24fa0951ad1382917fab6f6d6601a002b2a4d4c0080ccdbb5cfd64369b375930"
]
},
{
"file": "kinds-01-p1-a.wiv1",
"fixture": "kinds-01",
"first": 40,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "ca514e82998d647b769d68a64d3716187fa80cf8bb1346dfbbd067db5c14f6b4",
"sse": 62208,
"frame_sha256": [
"ce06f0939135d3114c2f9a466a83d735d56ecd9f472b363e7ab8d4b6b633e198",
"c5a121856f15b787f0a34e8a612644aafcdcf5838f4b96ac73b5ea1b5ef78c33",
"1b6f84cecfddcbacc0027729dba9ff7c4082c9c5b74c940e717062c1b15b87ac",
"8aa3b6c444f7d02a6a595f65915931bdcf16cc46af2338c9fc7f454d647e896c",
"add52ba49d80980da4aa5a5619e7ceedc76c343944c4b1c2ab18fe6d955c8606",
"41bcf40df80af7cd0e87b346c2b9951deae69534916efd3a81e14e36d6849300",
"599a8c15d6901d4c48e1afd9e8f4076a1e52212e38199374d5acaaec3ba5bdc0",
"ce860b5adda24e1318906e0bf2948e931d60d46b026e08da34fa5c1566caf272",
"6ac370c582a7044661e63c43f425792debe9fdff911f3a49f4fb6ce357d2f076",
"a2ab1ae35f4dc015ad47b61f67be9e07291b01c4532f62682e284f022f43b876",
"88a5474c8cb0f9f804a194032ddd0101da70669c7de068cf5fcfc95bc6371b55",
"4bfee3b3fcc14021cde9ca56e80530a3aa8d9c509d2a8bc6f90107d399743d40"
]
},
{
"file": "kinds-01-p1-b.wiv1",
"fixture": "kinds-01",
"first": 40,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "178b6851db871c42a0b622f534db19a911a39d60869f502267d0f70079426026",
"sse": 311040,
"frame_sha256": [
"ca9ea64bffac9c105747c5381e626c90df697d90d156125c890608910dc038f2",
"26762929396c8aae06f1454b2b6bf40a667a9cd0a43021a6211b3bb8c900749f",
"759294a008637d5550a1594dcf489f6f9ea377532b879f74be6654e66bd3252e",
"3f4d6d8ededf23b95f1ad540becd79abad83c1ad89d8fc4fbffeb17e0f9df2fc",
"df78456a59f4d34a38ef0011ce4a4390e4613614ecc664a106c20e1b1ef69220",
"2b5b2331c9383cb4af0cb309acc71af891170d6a1a766927d0f30552d938de79",
"3806756815a981b425f477280a9d6e60098b306c3f177cb3f0deeab61b3d3b19",
"c696a2aa0dfcb579e3cfb91d6a152c47928ba0fde4850b6c0dac0680783fb845",
"fd420fbc1e5128906745f691733f179c1aa00d0b4215cb8035581c9ae9fa4a64",
"e3aab8d1273fd235e9d019e23a7b58c64e2243033ea9f1d05c37b95f401172b2",
"40cf233a5d48195bb5c70a804ef97c236c22f2cbb6787994372944ba1ea0f059",
"65457095263ded9f59c3825ed0a882d636ff47029ff61891c280ff01d4c2be39"
]
},
{
"file": "kinds-01-p2-a.wiv1",
"fixture": "kinds-01",
"first": 80,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "95a93a718fef8d21ada403e700063650486ba81f1431f5ff6704d73bb4ac425d",
"sse": 63357,
"frame_sha256": [
"6196344a8b440a484d04a1a0f1d057a4a85d52b20e8c24d26a884f6f0239bb52",
"253d9926f9e065fc055d9bf6e5025528178735a9fb4fab750ab97baaaa562c55",
"a025e746b7e2ebb8535a44e53804c8bee0d1ba0641f6cc436b1cf39e6bed8c30",
"2a38c4effd3a11524e0819a7c5ee49c58206b9105a6e8b3c83ae3904ef1a342b",
"870f235469a2e9d9aeadd7c2440b84f8c4492008fc2fb6ae52850819c5602f24",
"0a06188a6711a6a63fd6da41ce275ec6259696071ca2b2be56ba9eae9dc563eb",
"852106274aa35f27db9418386f9a41ea07f46a8e732ed21f7babaf17b49ee06e",
"df91d5663beaf7f720c758461530ff12e5be328908d6e3505c2a5ef87ad07927",
"3d229e974d8170eb954b12c41137977cd0f8dccf5d939ab61fa3d7653b12e989",
"70ea629a2d6cb608564a3ae60e2c7b9d8904a3177588e56639c7d850bc273aff",
"b81050bdf241440ea08e25d7f20f12ee165a0879414987987d46c507c4b3b411",
"d100209e5ade35978c3b70f713ad5a66dd7db3105feb34a9e9696efd4c7df776"
]
},
{
"file": "kinds-01-p2-b.wiv1",
"fixture": "kinds-01",
"first": 80,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "5afdcaaf91b48a40e3d739ab3ea3c6913df6e1ced6bc509958c3612077fa1fa4",
"sse": 246720,
"frame_sha256": [
"44a47b64e68069922d866d39dc6f4a196dd3ca4117c0718d98dde931defb82fd",
"40b8df1ecd11a09cd75edb097c8cadd3a69eea56387e3e668fc84ec089c055c5",
"31b1f5c937efefb6d74431b962af8d0e7e34210ab0b4abf73f44d47998fdbe07",
"8e1d23e8e4309cbb024c9061e5af023a27d8f04854396482b783936724e7323f",
"d6ef42a29902be8389548f7da8e82cafbf71e6817d13e284603f38ab3b5578fc",
"e996d9c08087be3455fb24569b45c7555fa6121d0fe86f2ef06b11f6200b28a5",
"70a4e7f9bc606b0e1b5a8c2da6e3046d7a1534920d8ae5a4f1d6c736af796f17",
"775f99bc98c684bf4e5504bb78b4d2f3b93f1de3ef7c421c52465e9fabca8ac7",
"2aaa78a898f1e21492bfe173bf4d1bf3eadcad33c49a626afaa5fcafaa1c25a4",
"60e1d2b0dd0ffff13152dae030df50c0a3cc8c825ee105c044d5c2fc2fedb556",
"7cddae930312ae974c546f55d3b583688af1e9612272fac27f9a28b6d36671b6",
"423369b769a993dcffa56312447c3a6156489020978fba7d3c81aad11b20c889"
]
},
{
"file": "kinds-01-p3-a.wiv1",
"fixture": "kinds-01",
"first": 120,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "d54713622ff0cd6bbbf6dae0d2057813e41f277692d99258cee89c0b812f77af",
"sse": 63021,
"frame_sha256": [
"93b4b4ee7a0ec0dc28e7ce62ca096c7ba7e4722ecb17e763cbd0338c8325abb8",
"29dda7595723a8ae243767db9741acb1ed4f44494a59751326d957f53d56eb8f",
"8c6f2a939942f5c78cdbf1e7569a90e652cdd97254d286c39488cb137368044e",
"1486c3a531e0c582f643ad99698bdaa9a67904e30a113bdf336bdf03e0c38591",
"a37700046fbe7eb87546d5f3b0f82cc7a86c6d1d7e23326aae3304adf4b18175",
"f4722bf3b7f13c4e81ec329eaf7942fa871ccb5cacb6a5192bde912b36671dec",
"e5910a27d4876d99e1ea0d8caffc55d0da9671a7a8b578a7512fb86c26873c13",
"23415c862cdcc9c502a578fea08aed7b082d5a8c4f867dc25bfb342052e23078",
"4dec3aec6a7aaadbc4f0e48d662095c4a6e71b144590f84acc0a30eee7ad03db",
"9d5f657117ed167bcdbf92a5b27b992383683149c4b53ae56efdccf3d6bb0beb",
"cd77f44703afdd47ee3b128b84585e7049aa118286f003c3cce8749b6d0bc028",
"de2c10a2b8ad811ba255f4c8dce1bbd59e34a183119abc83ff21a820c17737af"
]
},
{
"file": "kinds-01-p3-b.wiv1",
"fixture": "kinds-01",
"first": 120,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "5bdc99ed0ca6b211ea976c6792610c23f57a8975cfea8085be8659c1dc2fc8ac",
"sse": 119757,
"frame_sha256": [
"30a7bf937c0ae12850822ac638c3c8bb45ed373c26d0d380a656cbdbe6fde5e7",
"2525365fcfb161d5b55e0a1b9181c570cea654efaef2b84663ec9d58efc8f917",
"8b37c53c7d3bb559faccdf6a9514cef95cff7b3e8fe6ef0de329889f236fa0bd",
"b31628db28ec03a75437976c224404e089ade2e3774237b15f7a6f5d47b99136",
"fb1d4bb64188b6935dff19604ffefd089accd265803744aa26732e6d916be34a",
"7be175e774b23f999e6a5c762dcde712d914424fedcf75bdb340bb9781e8b95c",
"f45711dc25ca6f6543c2e7b4074eda587ba161a1d4ebe5a1232ebfd5b8f546b7",
"44d2a0363d77296c1712406cbff00c109af4a04f92334ef5516985f5663bf668",
"28456d27aef2ee66da687cd55e0806de63b0888ed9c92356e4d885d642c43eee",
"98198c2be37074a3dff8d010fe2534e32d7e8ff4aa9f871b1708b5fb63e00cf3",
"524f8760dc3aaca077da08c889cc4d16e00b1a962b7a500d9e5cfca24075aef1",
"d4423581b2ff368b78e3e1a9f083565d817c51b364efa7be25e8e8d65c4a91f1"
]
},
{
"file": "kinds-01-p4-a.wiv1",
"fixture": "kinds-01",
"first": 160,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "bca3d8a50228c563702f126a86d8997fa7ea297814a517cbd7f03bbd0d63d160",
"sse": 65232,
"frame_sha256": [
"f74dfe59e17737b9bc0459f73dd6267207039724574d853c5d69ab2387048e36",
"35b5d61ceb66d6f4dda5fcc7f573cef1f69ee8bb19da4caab96d2913cc6b68db",
"f74dfe59e17737b9bc0459f73dd6267207039724574d853c5d69ab2387048e36",
"35b5d61ceb66d6f4dda5fcc7f573cef1f69ee8bb19da4caab96d2913cc6b68db",
"f74dfe59e17737b9bc0459f73dd6267207039724574d853c5d69ab2387048e36",
"35b5d61ceb66d6f4dda5fcc7f573cef1f69ee8bb19da4caab96d2913cc6b68db",
"f74dfe59e17737b9bc0459f73dd6267207039724574d853c5d69ab2387048e36",
"35b5d61ceb66d6f4dda5fcc7f573cef1f69ee8bb19da4caab96d2913cc6b68db",
"f74dfe59e17737b9bc0459f73dd6267207039724574d853c5d69ab2387048e36",
"35b5d61ceb66d6f4dda5fcc7f573cef1f69ee8bb19da4caab96d2913cc6b68db",
"f74dfe59e17737b9bc0459f73dd6267207039724574d853c5d69ab2387048e36",
"35b5d61ceb66d6f4dda5fcc7f573cef1f69ee8bb19da4caab96d2913cc6b68db"
]
},
{
"file": "kinds-01-p4-b.wiv1",
"fixture": "kinds-01",
"first": 160,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "18d7978c72a981bd552421cc37852eaf9ba58eaaf879b4c6dbd377d7ccf27400",
"sse": 237072,
"frame_sha256": [
"7729f108901954be29b8109ab0fb27406c017d478417094f68d22a60fec28ccd",
"cd1302ed80afd660e6d07a61d29d0b8960d1770f5ba3665414e3e231050cc7e8",
"72003e0cb5b3ff4e9d9be8b3a7d287edd2568889ef10a6e7396a845ae0e7e4f2",
"fc4f98eeccec46c705481fe9cf1282e63a0baec483bcf3470093870226fa6d41",
"8557f8e485cb9832699370e86beef151f04dbc17aa29936736dfa96afcbeee8f",
"870e87397459d169ee844397f196a92b996b38e6e01a5955a5008e0a988cdb0b",
"44966adbb04d010ff972acf9aa253c396bb76f05ecbc5179d6d83bd8242bd421",
"11736640641707b8decd7bde540478b47a9eedbb35c27f6af57aba280420e84b",
"9dade16421ec1bb2bd456f10c6a442c4d21cfb2db59447c55661fa2138bb8241",
"0de09deb3c0af0522e2ac890f833f270c9f27fb6c9312124c792bba3a2ddb5cc",
"efd20d61cfc984a75223ba6150164147911be2dd0dcb0b09641a565e5dcaf7cc",
"0de09deb3c0af0522e2ac890f833f270c9f27fb6c9312124c792bba3a2ddb5cc"
]
},
{
"file": "kinds-01-p5-a.wiv1",
"fixture": "kinds-01",
"first": 260,
"frames": 12,
"params": {
"block": 8,
"search": 3,
"mv_precision": 1,
"q": 6
},
"blake3": "bca3d8a50228c563702f126a86d8997fa7ea297814a517cbd7f03bbd0d63d160",
"sse": 65232,
"frame_sha256": [
"f74dfe59e17737b9bc0459f73dd6267207039724574d853c5d69ab2387048e36",
"35b5d61ceb66d6f4dda5fcc7f573cef1f69ee8bb19da4caab96d2913cc6b68db",
"f74dfe59e17737b9bc0459f73dd6267207039724574d853c5d69ab2387048e36",
"35b5d61ceb66d6f4dda5fcc7f573cef1f69ee8bb19da4caab96d2913cc6b68db",
"f74dfe59e17737b9bc0459f73dd6267207039724574d853c5d69ab2387048e36",
"35b5d61ceb66d6f4dda5fcc7f573cef1f69ee8bb19da4caab96d2913cc6b68db",
"f74dfe59e17737b9bc0459f73dd6267207039724574d853c5d69ab2387048e36",
"35b5d61ceb66d6f4dda5fcc7f573cef1f69ee8bb19da4caab96d2913cc6b68db",
"f74dfe59e17737b9bc0459f73dd6267207039724574d853c5d69ab2387048e36",
"35b5d61ceb66d6f4dda5fcc7f573cef1f69ee8bb19da4caab96d2913cc6b68db",
"f74dfe59e17737b9bc0459f73dd6267207039724574d853c5d69ab2387048e36",
"35b5d61ceb66d6f4dda5fcc7f573cef1f69ee8bb19da4caab96d2913cc6b68db"
]
},
{
"file": "kinds-01-p5-b.wiv1",
"fixture": "kinds-01",
"first": 260,
"frames": 12,
"params": {
"block": 16,
"search": 2,
"mv_precision": 2,
"q": 12
},
"blake3": "18d7978c72a981bd552421cc37852eaf9ba58eaaf879b4c6dbd377d7ccf27400",
"sse": 237072,
"frame_sha256": [
"7729f108901954be29b8109ab0fb27406c017d478417094f68d22a60fec28ccd",
"cd1302ed80afd660e6d07a61d29d0b8960d1770f5ba3665414e3e231050cc7e8",
"72003e0cb5b3ff4e9d9be8b3a7d287edd2568889ef10a6e7396a845ae0e7e4f2",
"fc4f98eeccec46c705481fe9cf1282e63a0baec483bcf3470093870226fa6d41",
"8557f8e485cb9832699370e86beef151f04dbc17aa29936736dfa96afcbeee8f",
"870e87397459d169ee844397f196a92b996b38e6e01a5955a5008e0a988cdb0b",
"44966adbb04d010ff972acf9aa253c396bb76f05ecbc5179d6d83bd8242bd421",
"11736640641707b8decd7bde540478b47a9eedbb35c27f6af57aba280420e84b",
"9dade16421ec1bb2bd456f10c6a442c4d21cfb2db59447c55661fa2138bb8241",
"0de09deb3c0af0522e2ac890f833f270c9f27fb6c9312124c792bba3a2ddb5cc",
"efd20d61cfc984a75223ba6150164147911be2dd0dcb0b09641a565e5dcaf7cc",
"0de09deb3c0af0522e2ac890f833f270c9f27fb6c9312124c792bba3a2ddb5cc"
]
}
]
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,15 @@
# Every member left to its default.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,43 @@
# eq-defaults-a.toml with every default written out: one effective policy.
schema = "wai.pack.policy/1"
asset_id = "r"
royalty_free_only = false
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[segmentation]
target_ms = 2000
min_ms = 1000
max_ms = 4000
scene_cut = "wai.pack.scenecut/1"
cut_abs_permille = 300
cut_rel_permille = 3000
cut_window = 8
lookahead_frames = 6
closed = true
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
params = { block = 16, search = 7, mv_precision = 2, q_candidates = [8], max_sse_px_milli = 0 }
[floor]
extra_keyframes = false
[live]
layer_lag_ms = [0]
[defaults]
deadline_ms = 1500
[classify]
static_permille = 5
static_mad_milli = 300
synthetic_bins = 12
motion_high_milli = 9000

View file

@ -0,0 +1,40 @@
# Standard tables, one member per line.
schema = "wai.pack.policy/1"
asset_id = "spélling\tid"
lead = "v"
[[component]]
id = "v"
media = "video"
[component.timebase]
num = 25
den = 1
[segmentation]
target_ms = 3000
lookahead_frames = 4
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[ladder.params]
block = 8
q_candidates = [12, 6]
[[ladder]]
id = "r1"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
refines = "b0"
[ladder.params]
q = 4
[[class]]
id = "tv"
max_layer = 1

View file

@ -0,0 +1,32 @@
# eq-spelling-a.toml spelled otherwise: inline tables, dotted keys, members in
# another order, literal strings, a hexadecimal and an underscored integer, comments.
lead = 'v' # the lead component
schema = "wai.pack.policy/1"
asset_id = "sp\u00e9l\u006cing\u0009id"
segmentation.lookahead_frames = 0x4
segmentation.target_ms = 3_000
[[component]]
timebase = { den = 1, num = 25 }
media = "video"
id = "v"
[[ladder]]
role = "base"
params.q_candidates = [ 12, 6, ]
params.block = 0o10
capability = "wai.video.int_motion"
component = "v"
id = "b0"
[[ladder]]
params = { q = 4 }
refines = "b0"
role = "refinement"
capability = 'wai.video.int_refine'
component = "v"
id = "r1"
[[class]]
max_layer = 1
id = "tv"

View file

@ -0,0 +1,131 @@
# The example policy of extensions/packaging.md §3.3: two components (video lead,
# audio), a staged video ladder with a still-image rung and a supplied floor, an audio
# base, three classes, one moment and three rules. Every rung is one a packager may
# emit (§3.6).
schema = "wai.pack.policy/1"
asset_id = "pack-fixture-01"
royalty_free_only = true
lead = "v"
[[component]]
id = "v"
media = "video"
source = "src/video.y4m"
[component.timebase]
num = 25
den = 1
[[component]]
id = "a"
media = "audio"
source = "src/audio.wav"
[component.timebase]
num = 48000
den = 1
[segmentation]
target_ms = 2000
min_ms = 1000
max_ms = 4000
scene_cut = "wai.pack.scenecut/1"
cut_abs_permille = 300
cut_rel_permille = 3000
cut_window = 8
lookahead_frames = 6
closed = true
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
params = { block = 16, search = 7, mv_precision = 2, q_candidates = [16, 12, 8], max_sse_px_milli = 40000 }
[[ladder]]
id = "r1"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
refines = "b0"
params = { q = 6 }
[[ladder]]
id = "r2"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
refines = "r1"
params = { q = 3 }
[[ladder]]
id = "still"
component = "v"
capability = "wai.image.png"
role = "base"
params = {}
[[ladder]]
id = "f0"
component = "v"
capability = "wai.video.av1"
role = "floor"
params = { source = "supplied" }
[[ladder]]
id = "ab"
component = "a"
capability = "wai.audio.flac"
role = "base"
params = { source = "encode" }
[floor]
supplied_listing = "0000000000000000000000000000000000000000000000000000000000000000"
extra_keyframes = false
[live]
layer_lag_ms = [0, 200, 400]
[[class]]
id = "mobile"
max_layer = 1
max_kbps = 900
[[class]]
id = "tv"
max_layer = 2
[[class]]
id = "legacy"
floor_only = true
[[moment]]
id = "m-goal"
from_ms = 30000
to_ms = 34000
tags = ["event"]
[[rule]]
id = "static"
when = { piece_kind = ["static"] }
then = { ladder = ["still", "f0"] }
[[rule]]
id = "motion"
when = { piece_kind = ["motion_high"] }
then = { max_layer = 1 }
[[rule]]
id = "event"
when = { moment_tag = ["event"] }
then = { max_layer = 2, deadline_ms = 800 }
[defaults]
deadline_ms = 1500
[classify]
static_permille = 5
static_mad_milli = 300
synthetic_bins = 12
motion_high_milli = 9000

View file

@ -0,0 +1,47 @@
{
"cases": [
{
"file": "eq-defaults-a.toml",
"canonical": "{\"asset_id\":\"r\",\"class\":[],\"classify\":{\"motion_high_milli\":9000,\"static_mad_milli\":300,\"static_permille\":5,\"synthetic_bins\":12},\"component\":[{\"id\":\"v\",\"media\":\"video\",\"timebase\":{\"den\":1,\"num\":25}}],\"defaults\":{\"deadline_ms\":1500},\"floor\":{\"extra_keyframes\":false},\"ladder\":[{\"capability\":\"wai.video.int_motion\",\"component\":\"v\",\"id\":\"b0\",\"params\":{\"block\":16,\"max_sse_px_milli\":0,\"mv_precision\":2,\"q_candidates\":[8],\"search\":7},\"role\":\"base\"}],\"lead\":\"v\",\"live\":{\"layer_lag_ms\":[0]},\"moment\":[],\"royalty_free_only\":false,\"rule\":[],\"schema\":\"wai.pack.policy/1\",\"segmentation\":{\"closed\":true,\"cut_abs_permille\":300,\"cut_rel_permille\":3000,\"cut_window\":8,\"lookahead_frames\":6,\"max_ms\":4000,\"min_ms\":1000,\"scene_cut\":\"wai.pack.scenecut/1\",\"target_ms\":2000}}",
"digest": "5b195d09af5103475411ebd2d438f91e66b63bae230d2c2eafd27e7b99496f87"
},
{
"file": "eq-defaults-b.toml",
"canonical": "{\"asset_id\":\"r\",\"class\":[],\"classify\":{\"motion_high_milli\":9000,\"static_mad_milli\":300,\"static_permille\":5,\"synthetic_bins\":12},\"component\":[{\"id\":\"v\",\"media\":\"video\",\"timebase\":{\"den\":1,\"num\":25}}],\"defaults\":{\"deadline_ms\":1500},\"floor\":{\"extra_keyframes\":false},\"ladder\":[{\"capability\":\"wai.video.int_motion\",\"component\":\"v\",\"id\":\"b0\",\"params\":{\"block\":16,\"max_sse_px_milli\":0,\"mv_precision\":2,\"q_candidates\":[8],\"search\":7},\"role\":\"base\"}],\"lead\":\"v\",\"live\":{\"layer_lag_ms\":[0]},\"moment\":[],\"royalty_free_only\":false,\"rule\":[],\"schema\":\"wai.pack.policy/1\",\"segmentation\":{\"closed\":true,\"cut_abs_permille\":300,\"cut_rel_permille\":3000,\"cut_window\":8,\"lookahead_frames\":6,\"max_ms\":4000,\"min_ms\":1000,\"scene_cut\":\"wai.pack.scenecut/1\",\"target_ms\":2000}}",
"digest": "5b195d09af5103475411ebd2d438f91e66b63bae230d2c2eafd27e7b99496f87"
},
{
"file": "eq-spelling-a.toml",
"canonical": "{\"asset_id\":\"spélling\\tid\",\"class\":[{\"floor_only\":false,\"id\":\"tv\",\"max_layer\":1}],\"classify\":{\"motion_high_milli\":9000,\"static_mad_milli\":300,\"static_permille\":5,\"synthetic_bins\":12},\"component\":[{\"id\":\"v\",\"media\":\"video\",\"timebase\":{\"den\":1,\"num\":25}}],\"defaults\":{\"deadline_ms\":1500},\"floor\":{\"extra_keyframes\":false},\"ladder\":[{\"capability\":\"wai.video.int_motion\",\"component\":\"v\",\"id\":\"b0\",\"params\":{\"block\":8,\"max_sse_px_milli\":0,\"mv_precision\":2,\"q_candidates\":[12,6],\"search\":7},\"role\":\"base\"},{\"capability\":\"wai.video.int_refine\",\"component\":\"v\",\"id\":\"r1\",\"params\":{\"q\":4},\"refines\":\"b0\",\"role\":\"refinement\"}],\"lead\":\"v\",\"live\":{\"layer_lag_ms\":[0,0]},\"moment\":[],\"royalty_free_only\":false,\"rule\":[],\"schema\":\"wai.pack.policy/1\",\"segmentation\":{\"closed\":true,\"cut_abs_permille\":300,\"cut_rel_permille\":3000,\"cut_window\":8,\"lookahead_frames\":4,\"max_ms\":4000,\"min_ms\":1000,\"scene_cut\":\"wai.pack.scenecut/1\",\"target_ms\":3000}}",
"digest": "23bbf95c100bf114061d7986b113fac020f46b9edd95b53bd5dd99b27aae11c0"
},
{
"file": "eq-spelling-b.toml",
"canonical": "{\"asset_id\":\"spélling\\tid\",\"class\":[{\"floor_only\":false,\"id\":\"tv\",\"max_layer\":1}],\"classify\":{\"motion_high_milli\":9000,\"static_mad_milli\":300,\"static_permille\":5,\"synthetic_bins\":12},\"component\":[{\"id\":\"v\",\"media\":\"video\",\"timebase\":{\"den\":1,\"num\":25}}],\"defaults\":{\"deadline_ms\":1500},\"floor\":{\"extra_keyframes\":false},\"ladder\":[{\"capability\":\"wai.video.int_motion\",\"component\":\"v\",\"id\":\"b0\",\"params\":{\"block\":8,\"max_sse_px_milli\":0,\"mv_precision\":2,\"q_candidates\":[12,6],\"search\":7},\"role\":\"base\"},{\"capability\":\"wai.video.int_refine\",\"component\":\"v\",\"id\":\"r1\",\"params\":{\"q\":4},\"refines\":\"b0\",\"role\":\"refinement\"}],\"lead\":\"v\",\"live\":{\"layer_lag_ms\":[0,0]},\"moment\":[],\"royalty_free_only\":false,\"rule\":[],\"schema\":\"wai.pack.policy/1\",\"segmentation\":{\"closed\":true,\"cut_abs_permille\":300,\"cut_rel_permille\":3000,\"cut_window\":8,\"lookahead_frames\":4,\"max_ms\":4000,\"min_ms\":1000,\"scene_cut\":\"wai.pack.scenecut/1\",\"target_ms\":3000}}",
"digest": "23bbf95c100bf114061d7986b113fac020f46b9edd95b53bd5dd99b27aae11c0"
},
{
"file": "example.toml",
"canonical": "{\"asset_id\":\"pack-fixture-01\",\"class\":[{\"floor_only\":false,\"id\":\"mobile\",\"max_kbps\":900,\"max_layer\":1},{\"floor_only\":false,\"id\":\"tv\",\"max_layer\":2},{\"floor_only\":true,\"id\":\"legacy\",\"max_layer\":0}],\"classify\":{\"motion_high_milli\":9000,\"static_mad_milli\":300,\"static_permille\":5,\"synthetic_bins\":12},\"component\":[{\"id\":\"v\",\"media\":\"video\",\"source\":\"src/video.y4m\",\"timebase\":{\"den\":1,\"num\":25}},{\"id\":\"a\",\"media\":\"audio\",\"source\":\"src/audio.wav\",\"timebase\":{\"den\":1,\"num\":48000}}],\"defaults\":{\"deadline_ms\":1500},\"floor\":{\"extra_keyframes\":false,\"supplied_listing\":\"0000000000000000000000000000000000000000000000000000000000000000\"},\"ladder\":[{\"capability\":\"wai.video.int_motion\",\"component\":\"v\",\"id\":\"b0\",\"params\":{\"block\":16,\"max_sse_px_milli\":40000,\"mv_precision\":2,\"q_candidates\":[16,12,8],\"search\":7},\"role\":\"base\"},{\"capability\":\"wai.video.int_refine\",\"component\":\"v\",\"id\":\"r1\",\"params\":{\"q\":6},\"refines\":\"b0\",\"role\":\"refinement\"},{\"capability\":\"wai.video.int_refine\",\"component\":\"v\",\"id\":\"r2\",\"params\":{\"q\":3},\"refines\":\"r1\",\"role\":\"refinement\"},{\"capability\":\"wai.image.png\",\"component\":\"v\",\"id\":\"still\",\"params\":{},\"role\":\"base\"},{\"capability\":\"wai.video.av1\",\"component\":\"v\",\"id\":\"f0\",\"params\":{\"source\":\"supplied\"},\"role\":\"floor\"},{\"capability\":\"wai.audio.flac\",\"component\":\"a\",\"id\":\"ab\",\"params\":{\"source\":\"encode\"},\"role\":\"base\"}],\"lead\":\"v\",\"live\":{\"layer_lag_ms\":[0,200,400]},\"moment\":[{\"from_ms\":30000,\"id\":\"m-goal\",\"tags\":[\"event\"],\"to_ms\":34000}],\"royalty_free_only\":true,\"rule\":[{\"id\":\"static\",\"then\":{\"ladder\":[\"still\",\"f0\"]},\"when\":{\"piece_kind\":[\"static\"]}},{\"id\":\"motion\",\"then\":{\"max_layer\":1},\"when\":{\"piece_kind\":[\"motion_high\"]}},{\"id\":\"event\",\"then\":{\"deadline_ms\":800,\"max_layer\":2},\"when\":{\"moment_tag\":[\"event\"]}}],\"schema\":\"wai.pack.policy/1\",\"segmentation\":{\"closed\":true,\"cut_abs_permille\":300,\"cut_rel_permille\":3000,\"cut_window\":8,\"lookahead_frames\":6,\"max_ms\":4000,\"min_ms\":1000,\"scene_cut\":\"wai.pack.scenecut/1\",\"target_ms\":2000}}",
"digest": "1997e19e06f6bf191d5de605ba1a4719a3372d5e7a168b5364cc82638d9dd0e9"
},
{
"file": "example.toml",
"canonical": "{\"asset_id\":\"pack-fixture-01\",\"class\":[{\"floor_only\":false,\"id\":\"mobile\",\"max_kbps\":900,\"max_layer\":1},{\"floor_only\":false,\"id\":\"tv\",\"max_layer\":2},{\"floor_only\":true,\"id\":\"legacy\",\"max_layer\":0}],\"classify\":{\"motion_high_milli\":9000,\"static_mad_milli\":300,\"static_permille\":5,\"synthetic_bins\":12},\"component\":[{\"id\":\"v\",\"media\":\"video\",\"source\":\"src/video.y4m\",\"timebase\":{\"den\":1,\"num\":25}},{\"id\":\"a\",\"media\":\"audio\",\"source\":\"src/audio.wav\",\"timebase\":{\"den\":1,\"num\":48000}}],\"defaults\":{\"deadline_ms\":1500},\"floor\":{\"extra_keyframes\":false,\"supplied_listing\":\"0000000000000000000000000000000000000000000000000000000000000000\"},\"ladder\":[{\"capability\":\"wai.video.int_motion\",\"component\":\"v\",\"id\":\"b0\",\"params\":{\"block\":16,\"max_sse_px_milli\":40000,\"mv_precision\":2,\"q_candidates\":[16,12,8],\"search\":7},\"role\":\"base\"},{\"capability\":\"wai.video.int_refine\",\"component\":\"v\",\"id\":\"r1\",\"params\":{\"q\":6},\"refines\":\"b0\",\"role\":\"refinement\"},{\"capability\":\"wai.video.int_refine\",\"component\":\"v\",\"id\":\"r2\",\"params\":{\"q\":3},\"refines\":\"r1\",\"role\":\"refinement\"},{\"capability\":\"wai.image.png\",\"component\":\"v\",\"id\":\"still\",\"params\":{},\"role\":\"base\"},{\"capability\":\"wai.video.av1\",\"component\":\"v\",\"id\":\"f0\",\"params\":{\"source\":\"supplied\"},\"role\":\"floor\"},{\"capability\":\"wai.audio.flac\",\"component\":\"a\",\"id\":\"ab\",\"params\":{\"source\":\"encode\"},\"role\":\"base\"}],\"lead\":\"v\",\"live\":{\"layer_lag_ms\":[0,200,400]},\"moment\":[{\"from_ms\":30000,\"id\":\"m-goal\",\"tags\":[\"event\"],\"to_ms\":34000}],\"royalty_free_only\":false,\"rule\":[{\"id\":\"static\",\"then\":{\"ladder\":[\"still\",\"f0\"]},\"when\":{\"piece_kind\":[\"static\"]}},{\"id\":\"motion\",\"then\":{\"max_layer\":1},\"when\":{\"piece_kind\":[\"motion_high\"]}},{\"id\":\"event\",\"then\":{\"deadline_ms\":800,\"max_layer\":2},\"when\":{\"moment_tag\":[\"event\"]}}],\"schema\":\"wai.pack.policy/1\",\"segmentation\":{\"closed\":true,\"cut_abs_permille\":300,\"cut_rel_permille\":3000,\"cut_window\":8,\"lookahead_frames\":6,\"max_ms\":4000,\"min_ms\":1000,\"scene_cut\":\"wai.pack.scenecut/1\",\"target_ms\":2000}}",
"digest": "53d2fb3b7ad5cfb211e86baaf4faec205b1332b0fe6875d9525c04ff021187bd",
"overrides": {
"royalty_free_only": false
}
}
],
"equal": [
[
"eq-defaults-a.toml",
"eq-defaults-b.toml"
],
[
"eq-spelling-a.toml",
"eq-spelling-b.toml"
]
]
}

View file

@ -0,0 +1,234 @@
#!/usr/bin/env python3
"""The policy reader, differentially: wai-pack against pack_verify.py.
Two sets of policies, each file's verdict (`ok`, or the reason a packager refuses it)
and, when the policy itself parses, its digest, from `wai-pack policy-verdict`, must
equal pack_verify.py's:
- byte-level cases: a byte-order mark, bytes that are not UTF-8, integers at and past
2^53 and 2^63, nesting at and past the cap in arrays, inline tables and dotted keys,
control characters, line endings, NUL, escapes, ids at the byte limit, one id named
twice across kinds;
- seeded random policies with random faults in every table (from a fixed seed).
python3 policy_diff.py <wai-pack binary> [seed] [count]
Exit status 0 only if every verdict and digest agrees. Python 3.11 or later (tomllib).
"""
import os
import random
import subprocess
import sys
import tempfile
HERE = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, HERE)
import pack_verify as PV # noqa: E402
MIN = '''schema = "wai.pack.policy/1"
asset_id = "a"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
'''
def byte_cases():
c = {}
def case(name, b):
c[name] = b.encode() if isinstance(b, str) else b
case("min", MIN)
case("bom", b"\xef\xbb\xbf" + MIN.encode())
case("int-2^53", MIN + "zzz = 9007199254740992\n")
case("int-2^63", MIN + "zzz = 9223372036854775808\n")
case("int-2^64", MIN + "zzz = 18446744073709551616\n")
case("int-i64max", MIN + "zzz = 9223372036854775807\n")
case("int-i64min", MIN + "zzz = -9223372036854775808\n")
case("hex-int", MIN + "[segmentation]\ntarget_ms = 0x7d0\n")
case("nan", MIN + "zzz = nan\n")
case("neg-zero", MIN + "[segmentation]\ncut_window = -0\n")
case("plus", MIN + "[segmentation]\ncut_window = +8\n")
case("non-utf8", MIN.encode() + b"# \xff\xfe comment\n")
case("non-utf8-str", MIN.replace('asset_id = "a"', 'asset_id = "a\xff"').encode("latin-1"))
case("surrogate-utf8", MIN.encode() + b"# \xed\xa0\x80\n")
for d in (31, 32, 33, 60, 79, 80, 200, 3000):
case(f"deep-array-{d}", "zzz = " + "[" * d + "]" * d + "\n" + MIN)
for d in (31, 32, 200):
case(f"deep-inline-{d}", "zzz = " + "{a=" * d + "1" + "}" * d + "\n" + MIN)
for d in (31, 32, 2000):
case(f"deep-dotted-{d}", "zzz." + ".".join(["a"] * d) + " = 1\n" + MIN)
case("deep-after-float", "aaa = 1.5\nzzz = " + "[" * 40 + "]" * 40 + "\n" + MIN)
case("dup-key", MIN + "asset_id = \"b\"\n")
case("ctrl-del", MIN.replace('asset_id = "a"', 'asset_id = "a\\u007f\\u001f\\b\\f"'))
case("u2028", MIN.replace('asset_id = "a"', 'asset_id = "a\\u2028\\u2029"'))
case("astral", MIN.replace('asset_id = "a"', 'asset_id = "\\U0001F600"'))
case("id-255-bytes", MIN.replace('asset_id = "a"', 'asset_id = "' + "é" * 127 + 'a"'))
case("id-256-bytes", MIN.replace('asset_id = "a"', 'asset_id = "' + "é" * 128 + '"'))
case("crlf", MIN.replace("\n", "\r\n"))
case("lone-cr", MIN.replace("\n", "\r"))
case("same-id-across-kinds", MIN.replace('id = "b0"', 'id = "v"'))
case("tab-in-literal", MIN.replace('asset_id = "a"', "asset_id = 'a\tb'"))
case("float-exp", MIN + "zzz = 1e3\n")
case("local-time", MIN + "zzz = 07:32:00\n")
case("int-refine-base", MIN.replace("wai.video.int_motion", "wai.video.int_refine"))
case("empty", b"")
case("nul", MIN.encode() + b"\x00")
case("u0000-escape", MIN.replace('asset_id = "a"', 'asset_id = "a\\u0000"'))
case("key-unicode", MIN + '"é" = 1\n')
case("ladder-empty", MIN.split("[[ladder]]")[0] + "ladder = []\n")
case("mixed-array", MIN + 'zzz = [1, "a"]\n')
case("params-wrong-type", MIN + "params = 5\n")
case("cut-window-2", MIN + "[segmentation]\ncut_window = 2\n")
return c
CAPS = ["wai.video.int_motion", "wai.video.int_refine", "wai.video.av1", "wai.audio.flac", "wai.image.png",
"wai.audio.int_refine", "wai.audio.int_layered", "wai.splat.sog", "wai.video.avc", "wai.video.package",
"wai.meta.hdr10plus", "wai.nope"]
PARAMS = ['{}', '{ block = 8 }', '{ block = 5 }', '{ search = 33 }', '{ q = 6 }', '{ rate = 8000 }',
'{ q_candidates = [] }', '{ q_candidates = [16, 12] }', '{ source = "encode" }', '{ bogus = 1 }',
'{ to_rate = 48000, q = 64 }']
KINDS = ['"static"', '"bogus"', '']
def random_policy(rng):
def biased(seq):
seq = list(seq)
return seq[0] if (rng.random() < 0.85 and seq) else rng.choice(seq)
def val(kind):
if rng.random() < 0.01:
return biased(['1.5', '-3', '9007199254740992', '"x"', 'true', '[]', '{}'])
return kind
q = '"'
L = []
if rng.random() > 0.03:
L.append("schema = " + val(q + "wai.pack.policy/1" + q))
if rng.random() > 0.03:
L.append("asset_id = " + val(q + biased(["a", "", "x" * 256]) + q))
if rng.random() < 0.5:
L.append("royalty_free_only = " + val(biased(["true", "false"])))
comps = [rng.choice(["v", "a", "v2", "v"]) for _ in range(biased([1, 2, 0, 3]))]
lead = rng.choice(comps if rng.random() < 0.95 else comps + ["zz"]) if comps else "v"
L.append(f'lead = "{lead}"')
if rng.random() < 0.05:
L.append("zz_unknown = 1")
body = []
for c in comps:
body += ["[[component]]", f'id = "{c}"', "media = " + val(q + biased(["video", "audio", "bogus"]) + q)]
if rng.random() > 0.05:
num, den = val(str(biased([25, 0, 48000]))), val(str(biased([1, 1001, 0])))
body.append("timebase = { num = " + num + ", den = " + den + " }")
if rng.random() < 0.6:
body.append("[segmentation]")
for k, choices in [("target_ms", [2000, 500, 0]), ("min_ms", [1000, 3000, 0]), ("max_ms", [4000, 100]),
("cut_abs_permille", [300, 0, 1001]), ("cut_window", [8, 0, 2, 3, 65]),
("lookahead_frames", [6, 65]), ("closed", ["true", "false"])]:
if rng.random() < 0.4:
body.append(f"{k} = " + val(str(biased(choices))))
rungs = []
for i in range(biased([2, 1, 3, 4, 0])):
rid = biased([f"r{i}", "r0", "b", "v"])
role = rng.choice(["base", "refinement", "base", "floor", "bogus"])
rungs.append(rid)
comp = rng.choice(comps if rng.random() < 0.95 else comps + ["zz"]) if comps else "v"
cap = rng.choice(CAPS[:5] if rng.random() < 0.8 else CAPS)
body += ["[[ladder]]", f'id = "{rid}"', f'component = "{comp}"', f'capability = "{cap}"', f'role = "{role}"']
if role == "refinement" or rng.random() < 0.1:
body.append(f'refines = "{rng.choice(rungs + ["nope"])}"')
if rng.random() < 0.5:
body.append("params = " + biased(PARAMS))
if rng.random() < 0.3:
body += ["[live]", "layer_lag_ms = " + biased(["[0]", "[0, 200]", "[0, 200, 400]", "[1]", "[0, 100, 50]"])]
for i in range(biased([0, 0, 1, 2])):
body += ["[[class]]", f'id = "{biased(["c" + str(i), "c0"])}"']
if rng.random() < 0.5:
body.append(f"max_layer = {biased([0, 1, 2, 3])}")
if rng.random() < 0.3:
body.append(f"max_kbps = {biased([1, 0, 900])}")
for i in range(biased([0, 0, 1, 2])):
body += ["[[moment]]", f'id = "m{i}"', f"from_ms = {biased([0, 100])}", f"to_ms = {biased([0, 100, 200])}"]
if rng.random() < 0.5:
body.append('tags = ["event"]')
for i in range(biased([0, 0, 1, 2, 5])):
body += ["[[rule]]", f'id = "{biased(["u" + str(i), "u0"])}"']
if rng.random() < 0.5:
body.append("when = { piece_kind = [" + biased(KINDS) + "] }")
t = []
if rng.random() < 0.4:
pick = rng.sample(rungs + ["nope"], k=min(2, len(rungs) + 1))
t.append("ladder = [" + ", ".join(q + x + q for x in pick) + "]")
if rng.random() < 0.4:
t.append(f"max_layer = {biased([0, 1, 2])}")
if rng.random() < 0.4:
t.append(f"deadline_ms = {biased([1, 100, 200, 300, 400, 800])}")
if t:
body.append("then = { " + ", ".join(t) + " }")
if rng.random() < 0.3:
body += ["[defaults]", f"deadline_ms = {biased([1500, 1, 0, 150])}"]
if rng.random() < 0.2:
body += ["[classify]", f"synthetic_bins = {biased([12, 65])}"]
return ("\n".join(L + body) + "\n").encode()
def python_verdict(b):
try:
P = PV.parse_policy_bytes(b)
except PV.Refused as e:
return e.code, "-"
try:
PV.admit(b)
v = "ok"
except PV.Refused as e:
v = e.code
return v, PV.digest(P)
def main(argv):
if len(argv) < 2:
print(__doc__)
return 2
binary = argv[1]
seed = int(argv[2]) if len(argv) > 2 else 1
count = int(argv[3]) if len(argv) > 3 else 3000
rng = random.Random(seed)
cases = list(byte_cases().items()) + [(f"random-{i}", random_policy(rng)) for i in range(count)]
bad = 0
with tempfile.TemporaryDirectory() as d:
paths = {}
for name, b in cases:
p = os.path.join(d, name + ".toml")
with open(p, "wb") as f:
f.write(b)
paths[p] = (name, b)
rust = {}
files = list(paths)
for k in range(0, len(files), 500):
r = subprocess.run([binary, "policy-verdict"] + files[k:k + 500], capture_output=True)
if r.returncode != 0:
print(r.stderr.decode(errors="replace")[-2000:])
return 1
for line in r.stdout.decode().splitlines():
p, v, dg = line.split("\t")
rust[p] = (v, dg)
for p, (name, b) in paths.items():
py = python_verdict(b)
if rust.get(p) != py:
bad += 1
if bad <= 10:
print(f"DIFF {name}: wai-pack {rust.get(p)}, pack_verify.py {py}")
print(f"policy_diff: seed {seed}, {len(cases)} policies, {bad} differences")
return 0 if bad == 0 else 1
if __name__ == "__main__":
sys.exit(main(sys.argv))

View file

@ -0,0 +1,817 @@
{
"policy": "scenecut/policy.toml",
"sets": [
{
"params": {
"block": 8,
"search": 1,
"mv_precision": 1,
"q_candidates": [
16,
12,
8,
4
],
"max_sse_px_milli": 5000
},
"pieces": [
{
"fixture": "cuts-01",
"piece": 0,
"first": 0,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 392984,
"sse_px_milli": 18951
},
{
"q": 12,
"sse": 214400,
"sse_px_milli": 10339
},
{
"q": 8,
"sse": 97272,
"sse_px_milli": 4690
},
{
"q": 4,
"sse": 26376,
"sse_px_milli": 1271
}
],
"q": 8,
"blake3": "2a39ae05e422739effee9c954abf13cb27440d34da97c661486093a15ca815f3"
},
{
"fixture": "cuts-01",
"piece": 1,
"first": 60,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 401850,
"sse_px_milli": 19379
},
{
"q": 12,
"sse": 226928,
"sse_px_milli": 10943
},
{
"q": 8,
"sse": 99098,
"sse_px_milli": 4779
},
{
"q": 4,
"sse": 29032,
"sse_px_milli": 1400
}
],
"q": 8,
"blake3": "1621b28f137c9f77e3790ffa3973460047a8057e9100d93ba6bf7a3499a8a4a8"
},
{
"fixture": "cuts-01",
"piece": 2,
"first": 140,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 449922,
"sse_px_milli": 21697
},
{
"q": 12,
"sse": 233106,
"sse_px_milli": 11241
},
{
"q": 8,
"sse": 113634,
"sse_px_milli": 5480
},
{
"q": 4,
"sse": 30994,
"sse_px_milli": 1494
}
],
"q": 4,
"blake3": "472767afea1e2a550ba95b7e61479ea9df27ba678ddd9ded362f6fbda606a2c9"
},
{
"fixture": "cuts-01",
"piece": 3,
"first": 230,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 429869,
"sse_px_milli": 20730
},
{
"q": 12,
"sse": 239373,
"sse_px_milli": 11543
},
{
"q": 8,
"sse": 112253,
"sse_px_milli": 5413
},
{
"q": 4,
"sse": 29781,
"sse_px_milli": 1436
}
],
"q": 4,
"blake3": "2cc5d4921c6683ad0c24f1ae2c23abd8d299128958453815a4217e5dead14a7e"
},
{
"fixture": "cuts-01",
"piece": 4,
"first": 260,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 394448,
"sse_px_milli": 19022
},
{
"q": 12,
"sse": 217579,
"sse_px_milli": 10492
},
{
"q": 8,
"sse": 99520,
"sse_px_milli": 4799
},
{
"q": 4,
"sse": 27310,
"sse_px_milli": 1317
}
],
"q": 8,
"blake3": "62599533301038a4e1eaf81a85aebceeae584f0d2c63f61078f4f1b5a585eaed"
},
{
"fixture": "cuts-01",
"piece": 5,
"first": 290,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 403995,
"sse_px_milli": 19482
},
{
"q": 12,
"sse": 228499,
"sse_px_milli": 11019
},
{
"q": 8,
"sse": 109291,
"sse_px_milli": 5270
},
{
"q": 4,
"sse": 28451,
"sse_px_milli": 1372
}
],
"q": 4,
"blake3": "3a852edd22164f93e7c1dda30ab756214025dfc03d96f1fc908f96dfa94309ff"
},
{
"fixture": "cuts-01",
"piece": 6,
"first": 320,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 392855,
"sse_px_milli": 18945
},
{
"q": 12,
"sse": 224395,
"sse_px_milli": 10821
},
{
"q": 8,
"sse": 98769,
"sse_px_milli": 4763
},
{
"q": 4,
"sse": 27902,
"sse_px_milli": 1345
}
],
"q": 8,
"blake3": "246de6fad51c9a199195b3d582b73bc3833e301332835faffa71c029292f96aa"
},
{
"fixture": "kinds-01",
"piece": 0,
"first": 0,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 475632,
"sse_px_milli": 22937
},
{
"q": 12,
"sse": 247536,
"sse_px_milli": 11937
},
{
"q": 8,
"sse": 102384,
"sse_px_milli": 4937
},
{
"q": 4,
"sse": 34992,
"sse_px_milli": 1687
}
],
"q": 8,
"blake3": "70aaa4f64eba86964b89050bb718530f95e84f5a061fb7bbd2adfddf51eb51c3"
},
{
"fixture": "kinds-01",
"piece": 1,
"first": 40,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 698112,
"sse_px_milli": 33666
},
{
"q": 12,
"sse": 311040,
"sse_px_milli": 15000
},
{
"q": 8,
"sse": 145152,
"sse_px_milli": 7000
},
{
"q": 4,
"sse": 34560,
"sse_px_milli": 1666
}
],
"q": 4,
"blake3": "d558f1575e493632dbf541b0bedf2450beb8ac5d4385d00ae1b35d396a9422ba"
},
{
"fixture": "kinds-01",
"piece": 2,
"first": 80,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 437037,
"sse_px_milli": 21076
},
{
"q": 12,
"sse": 247704,
"sse_px_milli": 11945
},
{
"q": 8,
"sse": 113172,
"sse_px_milli": 5457
},
{
"q": 4,
"sse": 30987,
"sse_px_milli": 1494
}
],
"q": 4,
"blake3": "a65efbc7e61cda363a4499be32f28e2d824d0604ae7453ec9364b65a24a1a7e5"
},
{
"fixture": "kinds-01",
"piece": 3,
"first": 120,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 456189,
"sse_px_milli": 21999
},
{
"q": 12,
"sse": 230301,
"sse_px_milli": 11106
},
{
"q": 8,
"sse": 105885,
"sse_px_milli": 5106
},
{
"q": 4,
"sse": 31293,
"sse_px_milli": 1509
}
],
"q": 4,
"blake3": "de3f1b968fe6f338a0e1fd1b5e87821f2ce3bb3597d948996f53b1e7a098c18e"
},
{
"fixture": "kinds-01",
"piece": 4,
"first": 160,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 453168,
"sse_px_milli": 21854
},
{
"q": 12,
"sse": 249264,
"sse_px_milli": 12020
},
{
"q": 8,
"sse": 111024,
"sse_px_milli": 5354
},
{
"q": 4,
"sse": 28080,
"sse_px_milli": 1354
}
],
"q": 4,
"blake3": "2386abca06f07180f0f23ca84d04e8df1519da6b214781b8f158f22daaeec0ae"
},
{
"fixture": "kinds-01",
"piece": 5,
"first": 260,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 453168,
"sse_px_milli": 21854
},
{
"q": 12,
"sse": 249264,
"sse_px_milli": 12020
},
{
"q": 8,
"sse": 111024,
"sse_px_milli": 5354
},
{
"q": 4,
"sse": 28080,
"sse_px_milli": 1354
}
],
"q": 4,
"blake3": "2386abca06f07180f0f23ca84d04e8df1519da6b214781b8f158f22daaeec0ae"
}
]
},
{
"params": {
"block": 8,
"search": 1,
"mv_precision": 1,
"q_candidates": [
16,
12,
8,
4
],
"max_sse_px_milli": 1300
},
"pieces": [
{
"fixture": "cuts-01",
"piece": 0,
"first": 0,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 392984,
"sse_px_milli": 18951
},
{
"q": 12,
"sse": 214400,
"sse_px_milli": 10339
},
{
"q": 8,
"sse": 97272,
"sse_px_milli": 4690
},
{
"q": 4,
"sse": 26376,
"sse_px_milli": 1271
}
],
"q": 4,
"blake3": "e670e2721682f4369cce1edbb516b473c5b662c05d971156a08b0edf19bc8901"
},
{
"fixture": "cuts-01",
"piece": 1,
"first": 60,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 401850,
"sse_px_milli": 19379
},
{
"q": 12,
"sse": 226928,
"sse_px_milli": 10943
},
{
"q": 8,
"sse": 99098,
"sse_px_milli": 4779
},
{
"q": 4,
"sse": 29032,
"sse_px_milli": 1400
}
],
"q": 4,
"blake3": "d59f21a7bfccf236f903956111e6ce30d78968e0b4c145a1ac627e423a7a4944"
},
{
"fixture": "cuts-01",
"piece": 2,
"first": 140,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 449922,
"sse_px_milli": 21697
},
{
"q": 12,
"sse": 233106,
"sse_px_milli": 11241
},
{
"q": 8,
"sse": 113634,
"sse_px_milli": 5480
},
{
"q": 4,
"sse": 30994,
"sse_px_milli": 1494
}
],
"q": 4,
"blake3": "472767afea1e2a550ba95b7e61479ea9df27ba678ddd9ded362f6fbda606a2c9"
},
{
"fixture": "cuts-01",
"piece": 3,
"first": 230,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 429869,
"sse_px_milli": 20730
},
{
"q": 12,
"sse": 239373,
"sse_px_milli": 11543
},
{
"q": 8,
"sse": 112253,
"sse_px_milli": 5413
},
{
"q": 4,
"sse": 29781,
"sse_px_milli": 1436
}
],
"q": 4,
"blake3": "2cc5d4921c6683ad0c24f1ae2c23abd8d299128958453815a4217e5dead14a7e"
},
{
"fixture": "cuts-01",
"piece": 4,
"first": 260,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 394448,
"sse_px_milli": 19022
},
{
"q": 12,
"sse": 217579,
"sse_px_milli": 10492
},
{
"q": 8,
"sse": 99520,
"sse_px_milli": 4799
},
{
"q": 4,
"sse": 27310,
"sse_px_milli": 1317
}
],
"q": 4,
"blake3": "157a656d6ba75044cefd49e107dbb676a1ef03df5bd3a0aa7cbfb98420e27ca1"
},
{
"fixture": "cuts-01",
"piece": 5,
"first": 290,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 403995,
"sse_px_milli": 19482
},
{
"q": 12,
"sse": 228499,
"sse_px_milli": 11019
},
{
"q": 8,
"sse": 109291,
"sse_px_milli": 5270
},
{
"q": 4,
"sse": 28451,
"sse_px_milli": 1372
}
],
"q": 4,
"blake3": "3a852edd22164f93e7c1dda30ab756214025dfc03d96f1fc908f96dfa94309ff"
},
{
"fixture": "cuts-01",
"piece": 6,
"first": 320,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 392855,
"sse_px_milli": 18945
},
{
"q": 12,
"sse": 224395,
"sse_px_milli": 10821
},
{
"q": 8,
"sse": 98769,
"sse_px_milli": 4763
},
{
"q": 4,
"sse": 27902,
"sse_px_milli": 1345
}
],
"q": 4,
"blake3": "74bcad209572370ba1b18378e7e4dcae02460fbdf0a271efc7315752a5f28a77"
},
{
"fixture": "kinds-01",
"piece": 0,
"first": 0,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 475632,
"sse_px_milli": 22937
},
{
"q": 12,
"sse": 247536,
"sse_px_milli": 11937
},
{
"q": 8,
"sse": 102384,
"sse_px_milli": 4937
},
{
"q": 4,
"sse": 34992,
"sse_px_milli": 1687
}
],
"q": 4,
"blake3": "ebe7348ac443e7b62193c0f125048b7dd9644e6043a9aa26d36954661d5f090d"
},
{
"fixture": "kinds-01",
"piece": 1,
"first": 40,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 698112,
"sse_px_milli": 33666
},
{
"q": 12,
"sse": 311040,
"sse_px_milli": 15000
},
{
"q": 8,
"sse": 145152,
"sse_px_milli": 7000
},
{
"q": 4,
"sse": 34560,
"sse_px_milli": 1666
}
],
"q": 4,
"blake3": "d558f1575e493632dbf541b0bedf2450beb8ac5d4385d00ae1b35d396a9422ba"
},
{
"fixture": "kinds-01",
"piece": 2,
"first": 80,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 437037,
"sse_px_milli": 21076
},
{
"q": 12,
"sse": 247704,
"sse_px_milli": 11945
},
{
"q": 8,
"sse": 113172,
"sse_px_milli": 5457
},
{
"q": 4,
"sse": 30987,
"sse_px_milli": 1494
}
],
"q": 4,
"blake3": "a65efbc7e61cda363a4499be32f28e2d824d0604ae7453ec9364b65a24a1a7e5"
},
{
"fixture": "kinds-01",
"piece": 3,
"first": 120,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 456189,
"sse_px_milli": 21999
},
{
"q": 12,
"sse": 230301,
"sse_px_milli": 11106
},
{
"q": 8,
"sse": 105885,
"sse_px_milli": 5106
},
{
"q": 4,
"sse": 31293,
"sse_px_milli": 1509
}
],
"q": 4,
"blake3": "de3f1b968fe6f338a0e1fd1b5e87821f2ce3bb3597d948996f53b1e7a098c18e"
},
{
"fixture": "kinds-01",
"piece": 4,
"first": 160,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 453168,
"sse_px_milli": 21854
},
{
"q": 12,
"sse": 249264,
"sse_px_milli": 12020
},
{
"q": 8,
"sse": 111024,
"sse_px_milli": 5354
},
{
"q": 4,
"sse": 28080,
"sse_px_milli": 1354
}
],
"q": 4,
"blake3": "2386abca06f07180f0f23ca84d04e8df1519da6b214781b8f158f22daaeec0ae"
},
{
"fixture": "kinds-01",
"piece": 5,
"first": 260,
"frames": 12,
"candidates": [
{
"q": 16,
"sse": 453168,
"sse_px_milli": 21854
},
{
"q": 12,
"sse": 249264,
"sse_px_milli": 12020
},
{
"q": 8,
"sse": 111024,
"sse_px_milli": 5354
},
{
"q": 4,
"sse": 28080,
"sse_px_milli": 1354
}
],
"q": 4,
"blake3": "2386abca06f07180f0f23ca84d04e8df1519da6b214781b8f158f22daaeec0ae"
}
]
}
]
}

View file

@ -0,0 +1,228 @@
{
"cases": [
{
"file": "policy/capability-candidate.toml",
"reason": "capability-candidate:wai.splat.sog"
},
{
"file": "policy/capability-not-payload.toml",
"reason": "capability-not-payload:wai.video.package"
},
{
"file": "policy/capability-role.toml",
"reason": "capability-role:wai.meta.hdr10plus"
},
{
"file": "policy/capability-unknown.toml",
"reason": "capability-unknown:wai.video.nope"
},
{
"file": "policy/class-layer.toml",
"reason": "policy-class-layer"
},
{
"file": "policy/dangling-refines.toml",
"reason": "policy-dangling-refines"
},
{
"file": "policy/datetime.toml",
"reason": "policy-datetime"
},
{
"file": "policy/deadline-unreachable.toml",
"reason": "policy-deadline-unreachable"
},
{
"file": "policy/duplicate-id-across-kinds.toml",
"reason": "policy-duplicate-id"
},
{
"file": "policy/duplicate-id.toml",
"reason": "policy-duplicate-id"
},
{
"file": "policy/float.toml",
"reason": "policy-float"
},
{
"file": "policy/integer-range.toml",
"reason": "policy-integer-range"
},
{
"file": "policy/ladder-component.toml",
"reason": "policy-ladder-component"
},
{
"file": "policy/layer-lag.toml",
"reason": "policy-layer-lag"
},
{
"file": "policy/lead.toml",
"reason": "policy-lead"
},
{
"file": "policy/license-refused.toml",
"reason": "license-refused:wai.video.avc:patent-pool"
},
{
"file": "policy/missing-key.toml",
"reason": "policy-missing-key"
},
{
"file": "policy/negative.toml",
"reason": "policy-negative"
},
{
"file": "policy/no-base.toml",
"reason": "policy-no-base"
},
{
"file": "policy/open-gop.toml",
"reason": "policy-open-gop"
},
{
"file": "policy/piece-bounds.toml",
"reason": "policy-piece-bounds"
},
{
"file": "policy/refines-base.toml",
"reason": "policy-refines-base"
},
{
"file": "policy/refines-branch.toml",
"reason": "policy-refines-branch"
},
{
"file": "policy/refines-cycle.toml",
"reason": "policy-refines-cycle"
},
{
"file": "policy/refines-role.toml",
"reason": "policy-refines-role"
},
{
"file": "policy/rule-ladder.toml",
"reason": "policy-rule-ladder"
},
{
"file": "policy/schema.toml",
"reason": "policy-schema"
},
{
"file": "policy/toml-bom.toml",
"reason": "policy-toml"
},
{
"file": "policy/toml-depth-33.toml",
"reason": "policy-toml"
},
{
"file": "policy/toml-depth-80.toml",
"reason": "policy-toml"
},
{
"file": "policy/toml-duplicate-key.toml",
"reason": "policy-toml"
},
{
"file": "policy/toml-integer-64.toml",
"reason": "policy-toml"
},
{
"file": "policy/toml-non-utf8.toml",
"reason": "policy-toml"
},
{
"file": "policy/toml.toml",
"reason": "policy-toml"
},
{
"file": "policy/too-many-components.toml",
"reason": "policy-too-many-components"
},
{
"file": "policy/too-many-deadlines.toml",
"reason": "policy-too-many-deadlines"
},
{
"file": "policy/too-many-moments.toml",
"reason": "policy-too-many-moments"
},
{
"file": "policy/too-many-rules.toml",
"reason": "policy-too-many-rules"
},
{
"file": "policy/type.toml",
"reason": "policy-type"
},
{
"file": "policy/unknown-key-params.toml",
"reason": "policy-unknown-key"
},
{
"file": "policy/unknown-key.toml",
"reason": "policy-unknown-key"
},
{
"file": "policy/value-block.toml",
"reason": "policy-value"
},
{
"file": "policy/value-cut-window.toml",
"reason": "policy-value"
},
{
"file": "policy/value-media.toml",
"reason": "policy-value"
},
{
"file": "source/y4m-header.y4m",
"reason": "y4m-header"
},
{
"file": "source/y4m-interlaced.y4m",
"reason": "y4m-interlaced"
},
{
"file": "source/y4m-interlaced-frame.y4m",
"reason": "y4m-interlaced"
},
{
"file": "source/y4m-colorspace.y4m",
"reason": "y4m-colorspace"
},
{
"file": "source/y4m-size-change.y4m",
"reason": "y4m-size-change"
},
{
"file": "source/y4m-truncated.y4m",
"reason": "y4m-truncated"
},
{
"file": "source/wav-format-float.wav",
"reason": "wav-format"
},
{
"file": "source/wav-format-8bit.wav",
"reason": "wav-format"
},
{
"file": "source/wav-truncated.wav",
"reason": "wav-truncated"
},
{
"file": "source/wav-format-channels-32768.wav",
"reason": "wav-format"
},
{
"file": "source/wav-format-channels-32769.wav",
"reason": "wav-format"
},
{
"file": "source/wav-truncated-huge-data.wav",
"reason": "wav-truncated"
}
]
}

View file

@ -0,0 +1,15 @@
# Refused: a candidate capability, whose payload format is not pinned.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.splat.sog"
role = "base"

View file

@ -0,0 +1,15 @@
# Refused: a registered record, which names no payload format.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.package"
role = "base"

View file

@ -0,0 +1,15 @@
# Refused: a companion-only capability as a base.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.meta.hdr10plus"
role = "base"

View file

@ -0,0 +1,15 @@
# Refused: a capability SPEC §5 does not register.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.nope"
role = "base"

View file

@ -0,0 +1,19 @@
# Refused: a class layer no rung reaches.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[class]]
id = "tv"
max_layer = 1

View file

@ -0,0 +1,23 @@
# Refused: refines names no rung.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[ladder]]
id = "r1"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
refines = "nope"
params = { q = 4 }

View file

@ -0,0 +1,20 @@
# Refused: a date-time.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[moment]]
id = "m"
from_ms = 1979-05-27T07:32:00Z
to_ms = 5

View file

@ -0,0 +1,29 @@
# Refused: a deadline layer 1 cannot meet.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[ladder]]
id = "r1"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
refines = "b0"
params = { q = 4 }
[live]
layer_lag_ms = [0, 300]
[defaults]
deadline_ms = 300

View file

@ -0,0 +1,15 @@
# Refused: a component and a rung both named v.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "v"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,21 @@
# Refused: two rungs named b0.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[ladder]]
id = "b0"
component = "v"
capability = "wai.image.png"
role = "base"

View file

@ -0,0 +1,18 @@
# Refused: a float.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[segmentation]
target_ms = 2000.0

View file

@ -0,0 +1,18 @@
# Refused: an integer past 2^53 - 1.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[segmentation]
max_ms = 9007199254740992

View file

@ -0,0 +1,21 @@
# Refused: a rung of a component the policy does not define.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[ladder]]
id = "x0"
component = "x"
capability = "wai.image.png"
role = "base"

View file

@ -0,0 +1,26 @@
# Refused: a first layer lag that is not 0.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[ladder]]
id = "r1"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
refines = "b0"
params = { q = 4 }
[live]
layer_lag_ms = [100, 200]

View file

@ -0,0 +1,15 @@
# Refused: a lead that names no component.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "x"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,16 @@
# Refused: under royalty_free_only, a capability the registry classifies otherwise.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
royalty_free_only = true
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.avc"
role = "base"

View file

@ -0,0 +1,14 @@
# Refused: a component with no timebase.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,18 @@
# Refused: a negative integer.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[defaults]
deadline_ms = -5

View file

@ -0,0 +1,26 @@
# Refused: a component with no base rung.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[component]]
id = "a"
media = "audio"
timebase = { num = 48000, den = 1 }
[[ladder]]
id = "af"
component = "a"
capability = "wai.audio.flac"
role = "floor"

View file

@ -0,0 +1,18 @@
# Refused: pieces that are not closed.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[segmentation]
closed = false

View file

@ -0,0 +1,18 @@
# Refused: min_ms above target_ms.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[segmentation]
min_ms = 3000

View file

@ -0,0 +1,29 @@
# Refused: a refinement of a floor.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[ladder]]
id = "f0"
component = "v"
capability = "wai.video.av1"
role = "floor"
[[ladder]]
id = "r1"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
refines = "f0"
params = { q = 4 }

View file

@ -0,0 +1,31 @@
# Refused: two refinements of one base.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[ladder]]
id = "r1"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
refines = "b0"
params = { q = 3 }
[[ladder]]
id = "r2"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
refines = "b0"
params = { q = 4 }

View file

@ -0,0 +1,31 @@
# Refused: two refinements that refine each other.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[ladder]]
id = "r1"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
refines = "r2"
params = { q = 4 }
[[ladder]]
id = "r2"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
refines = "r1"
params = { q = 4 }

View file

@ -0,0 +1,22 @@
# Refused: a refinement that refines nothing.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[ladder]]
id = "r1"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
params = { q = 4 }

View file

@ -0,0 +1,25 @@
# Refused: a rule ladder with no base.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[ladder]]
id = "f0"
component = "v"
capability = "wai.video.av1"
role = "floor"
[[rule]]
id = "x"
then = { ladder = ["f0"] }

View file

@ -0,0 +1,15 @@
# Refused: another schema.
schema = "wai.pack.policy/2"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,15 @@
# Refused: a byte-order mark before the document.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,16 @@
# Refused: arrays nested to depth 33 (the document's table is depth 1).
zzz = [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,16 @@
# Refused: arrays nested to depth 80 (the document's table is depth 1).
zzz = [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,16 @@
# Refused: not TOML (a key defined twice).
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,16 @@
# Refused: an integer outside TOML's 64-bit range (2^63).
zzz = 9223372036854775808
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,15 @@
# Refused: bytes that are not UTF-8 (in this comment: ÿþ).
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,15 @@
# Refused: not TOML (an unterminated string).
schema = "wai.pack.policy/1"
asset_id = "r
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,55 @@
# Refused: nine components.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[component]]
id = "c0"
media = "video"
timebase = { num = 25, den = 1 }
[[component]]
id = "c1"
media = "video"
timebase = { num = 25, den = 1 }
[[component]]
id = "c2"
media = "video"
timebase = { num = 25, den = 1 }
[[component]]
id = "c3"
media = "video"
timebase = { num = 25, den = 1 }
[[component]]
id = "c4"
media = "video"
timebase = { num = 25, den = 1 }
[[component]]
id = "c5"
media = "video"
timebase = { num = 25, den = 1 }
[[component]]
id = "c6"
media = "video"
timebase = { num = 25, den = 1 }
[[component]]
id = "c7"
media = "video"
timebase = { num = 25, den = 1 }

View file

@ -0,0 +1,39 @@
# Refused: five distinct deadline values.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[ladder]]
id = "r1"
component = "v"
capability = "wai.video.int_refine"
role = "refinement"
refines = "b0"
params = { q = 4 }
[[rule]]
id = "d0"
then = { deadline_ms = 100 }
[[rule]]
id = "d1"
then = { deadline_ms = 200 }
[[rule]]
id = "d2"
then = { deadline_ms = 300 }
[[rule]]
id = "d3"
then = { deadline_ms = 400 }

View file

@ -0,0 +1,180 @@
# Refused: 33 moments.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[moment]]
id = "m0"
from_ms = 0
to_ms = 1
[[moment]]
id = "m1"
from_ms = 1
to_ms = 2
[[moment]]
id = "m2"
from_ms = 2
to_ms = 3
[[moment]]
id = "m3"
from_ms = 3
to_ms = 4
[[moment]]
id = "m4"
from_ms = 4
to_ms = 5
[[moment]]
id = "m5"
from_ms = 5
to_ms = 6
[[moment]]
id = "m6"
from_ms = 6
to_ms = 7
[[moment]]
id = "m7"
from_ms = 7
to_ms = 8
[[moment]]
id = "m8"
from_ms = 8
to_ms = 9
[[moment]]
id = "m9"
from_ms = 9
to_ms = 10
[[moment]]
id = "m10"
from_ms = 10
to_ms = 11
[[moment]]
id = "m11"
from_ms = 11
to_ms = 12
[[moment]]
id = "m12"
from_ms = 12
to_ms = 13
[[moment]]
id = "m13"
from_ms = 13
to_ms = 14
[[moment]]
id = "m14"
from_ms = 14
to_ms = 15
[[moment]]
id = "m15"
from_ms = 15
to_ms = 16
[[moment]]
id = "m16"
from_ms = 16
to_ms = 17
[[moment]]
id = "m17"
from_ms = 17
to_ms = 18
[[moment]]
id = "m18"
from_ms = 18
to_ms = 19
[[moment]]
id = "m19"
from_ms = 19
to_ms = 20
[[moment]]
id = "m20"
from_ms = 20
to_ms = 21
[[moment]]
id = "m21"
from_ms = 21
to_ms = 22
[[moment]]
id = "m22"
from_ms = 22
to_ms = 23
[[moment]]
id = "m23"
from_ms = 23
to_ms = 24
[[moment]]
id = "m24"
from_ms = 24
to_ms = 25
[[moment]]
id = "m25"
from_ms = 25
to_ms = 26
[[moment]]
id = "m26"
from_ms = 26
to_ms = 27
[[moment]]
id = "m27"
from_ms = 27
to_ms = 28
[[moment]]
id = "m28"
from_ms = 28
to_ms = 29
[[moment]]
id = "m29"
from_ms = 29
to_ms = 30
[[moment]]
id = "m30"
from_ms = 30
to_ms = 31
[[moment]]
id = "m31"
from_ms = 31
to_ms = 32
[[moment]]
id = "m32"
from_ms = 32
to_ms = 33

View file

@ -0,0 +1,114 @@
# Refused: 33 rules.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[[rule]]
id = "r0"
[[rule]]
id = "r1"
[[rule]]
id = "r2"
[[rule]]
id = "r3"
[[rule]]
id = "r4"
[[rule]]
id = "r5"
[[rule]]
id = "r6"
[[rule]]
id = "r7"
[[rule]]
id = "r8"
[[rule]]
id = "r9"
[[rule]]
id = "r10"
[[rule]]
id = "r11"
[[rule]]
id = "r12"
[[rule]]
id = "r13"
[[rule]]
id = "r14"
[[rule]]
id = "r15"
[[rule]]
id = "r16"
[[rule]]
id = "r17"
[[rule]]
id = "r18"
[[rule]]
id = "r19"
[[rule]]
id = "r20"
[[rule]]
id = "r21"
[[rule]]
id = "r22"
[[rule]]
id = "r23"
[[rule]]
id = "r24"
[[rule]]
id = "r25"
[[rule]]
id = "r26"
[[rule]]
id = "r27"
[[rule]]
id = "r28"
[[rule]]
id = "r29"
[[rule]]
id = "r30"
[[rule]]
id = "r31"
[[rule]]
id = "r32"

View file

@ -0,0 +1,16 @@
# Refused: a string where a boolean belongs.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
royalty_free_only = "yes"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,16 @@
# Refused: a parameter int_motion does not take.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
params = { block = 16, qp = 3 }

View file

@ -0,0 +1,18 @@
# Refused: a key the schema does not define.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
[segmentation]
keyframe_ms = 2000

View file

@ -0,0 +1,16 @@
# Refused: an int_motion block size outside 4, 8, 16, 32.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"
params = { block = 12 }

View file

@ -0,0 +1,18 @@
# Refused: a cut window of 2, under which the relative test never applies.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "video"
timebase = { num = 25, den = 1 }
[segmentation]
cut_window = 2
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

View file

@ -0,0 +1,15 @@
# Refused: a media class the schema does not list.
schema = "wai.pack.policy/1"
asset_id = "r"
lead = "v"
[[component]]
id = "v"
media = "hologram"
timebase = { num = 25, den = 1 }
[[ladder]]
id = "b0"
component = "v"
capability = "wai.video.int_motion"
role = "base"

Binary file not shown.

View file

@ -0,0 +1,3 @@
YUV4MPEG2 W2 H2 F25:1 C422
FRAME


View file

@ -0,0 +1 @@
YUV4MPEG W2 H2 F25:1

View file

@ -0,0 +1,3 @@
YUV4MPEG2 W2 H2 F25:1 C420jpeg
FRAME Ib


Some files were not shown because too many files have changed in this diff Show more