Skip to main content

WAI Extension: Derived Tracks

Mirrored from the canonical text at commit 117bad22 ().

Status: Draft. Registers the derivation operations of ISO/IEC 23001-16:2021 as wai.derive.* capability strings, each with a per-operation determinism tier, and states how a tier composes over a derived sample. No wire format, and no compositing. The geometric conditions listed per operation are read from the operations’ titles: clause 8 of ISO/IEC 23001-16, which defines each operation, was not read. Reference impl: wai-rs codecs::derivation. Keywords MUST, MUST NOT, SHOULD, MAY are RFC 2119/8174.

1. Prior art, stated plainly

A track that carries a process the receiver evaluates, rather than the processed result, is not new. ISO/IEC 23001-16:2021, Derived visual tracks in the ISO base media file format (1st edition, 2021-11), ratified it. A derived visual track (sample entry dtrk) carries derived samples, each active for a duration of the track’s composition timeline. Each derived sample is an ordered list of derivation operations, each applying a derivation transformation, with its parameters, to an ordered list of inputs. An input is either a visual input (an image item, an interval of an input track or track group possibly spanning several samples, the visual output of a preceding operation, or a default fill picture) or a parameter input (a metadata item, or an interval of a metadata track possibly spanning several samples). A parameter takes the value the derived sample gives it, else the value in the sample entry, else the default its transformation’s clause defines. A visual output is one frame or a sequence of frames, and any transformation may have internal time structure (the standard’s example is a cross-fade), so the picture may change during the sample’s duration. Operations chain, and a derived track can be an input to another. The first edition defines a base set of ten transformations, each identified by a four-character code, with 'uuid' reserved for vendor transformations identified by UUID.

The parts of that specification read for this extension (clauses 1–4, 5.1 and 5.2, and the table of contents, from the published sample, which ends at 5.2) do not say whether an operation’s output reproduces byte for byte across conforming readers. The rest was not read: clause 5.3 (the semantics of the derivation boxes), clauses 6 and 7 (the sample entry, the configuration record and the sample format), clause 8, which gives each operation’s definition, syntax and semantics, and so any blend or resampling formula, and Annex A. This extension states, per operation, when a claim over its output may hold, in the vocabulary of determinism-tiers, so a receipt or binding over a derived sample can say which tier it actually holds. Every tier rests on conditions that the sink which executed an instance checks on that instance, in space and in time. Clause 8 decides what an instance does, and so which conditions it can meet. What the registry takes from outside clause 8 is each operation’s purpose, read from its title, which decides the geometric conditions listed for it (§2, Basis of the tiers). The tiers are not uniform. Dissolve and Scaling compute new sample values by their nature. The others are exact only for instances that copy samples without converting them, and whose output does not change over the span a claim covers.

Scope. WAI does not composite. Presentation stays with the sink, as in linear-film and interactive-worlds. Registering grid and overlay composition states what a reproducibility claim over their output would need; it does not make WAI a renderer. Registering the operations aligns WAI’s vocabulary with the standard; it says nothing about which players evaluate derived visual tracks.

2. Registered operations

An executed instance of an operation is exact when every output sample is a copy of an input sample, or of a constant the claim names, placed by integer geometry, with no arithmetic on sample values, no change of sample representation, and no change over the span the claim covers. Inputs at decode-equivalence give an exact instance’s output at decode-equivalence. A per-operation tier is one of:

The three universal conditions, required of every tiered operation:

Because every tiered operation requires all three, an instance is untiered, not over-claimed, if it uses any parameter that clause 8 allows to convert or compute sample values, or to vary its output over time. This holds as long as the executing sink lists only the conditions it actually checked.

capability23001-16 clauseoperationtierconditions beyond the universal three (read from the operation’s title; clause 8 was not read), or why untiered
wai.derive.identity8.2Identityexact whennone. It copies its input; uncovered output samples come from the default fill picture, a constant the claim must name (§3 rule 5). Whether clause 8 lets Identity emit a representation other than its input’s was not read, so same-representation is checked, not assumed
wai.derive.srgb_fill8.3sRGB Fillexact whennone. The colour is stated in sRGB; writing it into any other representation is a conversion, which same-representation excludes. As its title is read, it reads no visual input, and it is the only operation registered as reading none
wai.derive.dissolve8.4Dissolveuntiereda transition that mixes two inputs, so its output values are computed, not copied. A transition is also time structure of its own, which time-invariant excludes for every operation (clause 4’s example of internal time structure is a cross-fade). Untiered until a blend arithmetic, and how its weights depend on the instant, are pinned; clause 8.4, which may fix them, was not read
wai.derive.crop8.5Cropexact whenthe kept region lies on the sample grid of every component (no component is resampled)
wai.derive.rotation8.6Rotationexact whenthe angle is a multiple of 90°, and every component is sampled at the same resolution, so the rotation permutes samples
wai.derive.mirror8.7Mirrorexact whenthe reflection maps every component’s sample grid, including its siting, onto itself (always so without chroma subsampling)
wai.derive.scaling8.8Scalinguntieredresamples, so its output values are computed, not copied. Untiered until an interpolation filter and its rounding are pinned; clause 8.8, which may fix them, was not read
wai.derive.roi_selection8.9Region of interest (ROI) selectionexact whenthe region lies on the sample grid of every component, and is emitted at its own size
wai.derive.grid_composition8.10Grid compositionexact whenevery input is placed at its own size, at offsets on every component’s sample grid
wai.derive.overlay_composition8.11Overlay compositionexact whenevery input is placed at its own size, at offsets on every component’s sample grid, and opaquely (no alpha, opacity or blending)

3. Composing a tier over a derived sample

  1. Weakest step. A derived sample holds decode-equivalence only if every visual input holds decode-equivalence and every executed operation instance is exact: it meets the three universal conditions and every condition listed for its operation. Otherwise it holds no tier, and a receipt over it MUST NOT carry a reproducible derived-sample hash.

  2. entropy-consistency does not pass through. Derivation operations act on reconstructed samples, which that tier does not fix. A derived sample over an input at entropy-consistency holds no tier.

  3. The claim is about what was executed, with what, and when. ISO/IEC 23001-16 lets a reader treat an unsupported non-essential operation as a null operation, so two conforming readers can emit different samples from one derived sample. A parameter can come from a metadata track, and the output can change within the sample’s duration. A tier claim or receipt over a derived sample MUST name:

    • the operations executed, in order;
    • for each instance, the parameter values it applied, whatever their source (the derived sample, the sample entry, the default of the operation’s clause, or a parameter input), with any region, offset or size expressed in samples;
    • the span it covers. For a claim over the whole duration, that is the derived sample’s composition time and duration on the derived track’s timeline, in its timescale. Otherwise it is the composition instant of each output frame the claim covers;
    • its inputs, visual and parameter, by content hash. For an interval of a track, the hash covers the samples the instance read.

    Two sinks’ derived-sample hashes are comparable only when all four are equal. A sink MUST NOT present a hash computed with an operation skipped as the hash of the sample with that operation, and MUST NOT present the hash of one output frame as the hash of a derived sample whose output changes over its duration.

  4. Transforms applied before derivation count. ISO/IEC 23001-16 applies the transformative properties of inputs (clean aperture, track matrix, and the like) before the derivation operation. For a tier claim each counts as a step, tiered as the registered operation it performs. A unity matrix is identity; a quarter-turn or reflection matrix is rotation or mirror; a clean aperture is a crop. Any other matrix is untiered, whether or not it resamples (a scale, a shear or a sub-sample translation does): the registry pins no arithmetic for it.

  5. The default fill picture is an input. Where output samples come from the configuration record’s default fill (black, grey or white), whatever the operation, the claim MUST name the fill’s sample values in the output representation. A fill whose values the claim does not name is an input with no tier, and an instance that writes it does not meet copies-only. An input that neither the derived sample nor the sample entry lists is the default fill picture (clause 5.1). So an operation reads the fill for every visual input it reads that neither lists, and a claim over it names the fill as an input. Where an instance sits in the executed list does not say what it read: clause 4 lets an operation that is not first read the output of any previous operation, only new inputs, or both. A claim therefore names, for each instance, the visual inputs it read: an input, or the output of an operation executed before it. An instance of an operation that reads a visual input and names none holds no tier, wherever it sits in the list.

  6. Unregistered operations cannot be tiered. A 'uuid' vendor operation, or any transformation this registry does not name, makes the derived sample untiered. The reference implementation returns an error rather than guess.

  7. Relation to determinism-tiers §2. That section’s rule is that a determinism claim covers what the sink emits. A derived sample is an emitted medium, and this section says when a claim over it holds. It does not relax the rule for the inputs: a hash over a decoded input is not a hash over the derived sample.

4. Receipt

A receipt over a derived sample SHOULD carry:

The energy of evaluating the graph is measured and attributed as for any other work (energy-measurement). The tier and the energy are separate claims, and neither implies the other. This extension defines the content of such a receipt, not a field layout.

5. Reference implementation

wai-rs, module codecs::derivation, with no feature gate:

The crate evaluates no derivation operation, and has no receipt emitter. Rules 3 and 4 of §3, and the receipt content of §4, are therefore not implemented. ExecutedOp carries only what the tier depends on (the conditions met and the inputs read), not the parameter values, span or input hashes a claim binds. The wai command-line tool does not yet list these operations.

6. Sources