A new crate beside wai-rs, with its own workspace and lock: the reference
packager of the packaging extension, built so far as far as a plan.
- policy.rs: wai.pack.policy/1 read in three stages (value kinds a canonical
JSON cannot carry; the schema with every default written in; the
constraints across members), each refusal named. The effective policy's
canonical JSON goes through wai::jcs, and its digest is
BLAKE3("wai:pack-policy\x01" || JCS).
- source/: Y4M to RGB8 (BT.709 limited range, integer), WAV PCM s16le.
- scenecut.rs: wai.pack.scenecut/1, one streaming segmenter with a bounded
lookahead and the return and revisit clauses, so live and on-demand
packing cut alike at equal lookahead; plan digest.
- classify.rs: static, synthetic, high motion, natural.
- fixture.rs: integer-generated Y4M fixtures (cuts-01, kinds-01).
- conformance.rs and wai-pack conformance regen|check.
pack-conformance/ holds the policy digests and equal-spelling pairs, a
refusal case per reason, the unit and colour conversions, and the scene-cut
vectors; pack_verify.py recomputes every one of them from the rules, with
its own TOML schema, JCS, readers, fixture generator and segmenter. It
found one defect while it was written: a millisecond bound converted to an
extreme timebase wrapped past 2^64; both conversions now saturate.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
783 lines
11 KiB
JSON
783 lines
11 KiB
JSON
{
|
|
"policy": "policy.toml",
|
|
"component": "v",
|
|
"fixtures": [
|
|
{
|
|
"name": "cuts-01",
|
|
"sha256": "d88e954311b77355c4ae980a0c5d1853be34326d5b24c4d74e5c1f69a8f568dd",
|
|
"frames": 350,
|
|
"scores": [
|
|
0,
|
|
36,
|
|
46,
|
|
65,
|
|
41,
|
|
39,
|
|
57,
|
|
67,
|
|
45,
|
|
59,
|
|
55,
|
|
60,
|
|
45,
|
|
45,
|
|
53,
|
|
39,
|
|
48,
|
|
48,
|
|
86,
|
|
71,
|
|
64,
|
|
45,
|
|
52,
|
|
55,
|
|
52,
|
|
45,
|
|
53,
|
|
57,
|
|
59,
|
|
78,
|
|
60,
|
|
57,
|
|
60,
|
|
53,
|
|
50,
|
|
48,
|
|
39,
|
|
52,
|
|
48,
|
|
50,
|
|
55,
|
|
52,
|
|
60,
|
|
36,
|
|
52,
|
|
86,
|
|
64,
|
|
38,
|
|
52,
|
|
81,
|
|
41,
|
|
52,
|
|
65,
|
|
67,
|
|
48,
|
|
72,
|
|
59,
|
|
52,
|
|
69,
|
|
64,
|
|
1000,
|
|
65,
|
|
41,
|
|
59,
|
|
71,
|
|
50,
|
|
64,
|
|
65,
|
|
48,
|
|
53,
|
|
57,
|
|
45,
|
|
55,
|
|
64,
|
|
60,
|
|
38,
|
|
53,
|
|
57,
|
|
57,
|
|
45,
|
|
48,
|
|
39,
|
|
52,
|
|
69,
|
|
46,
|
|
55,
|
|
52,
|
|
45,
|
|
71,
|
|
57,
|
|
1000,
|
|
48,
|
|
34,
|
|
10,
|
|
20,
|
|
46,
|
|
1000,
|
|
59,
|
|
71,
|
|
53,
|
|
88,
|
|
86,
|
|
41,
|
|
53,
|
|
55,
|
|
59,
|
|
53,
|
|
53,
|
|
57,
|
|
46,
|
|
72,
|
|
50,
|
|
62,
|
|
55,
|
|
50,
|
|
59,
|
|
52,
|
|
53,
|
|
50,
|
|
46,
|
|
50,
|
|
57,
|
|
67,
|
|
72,
|
|
64,
|
|
55,
|
|
55,
|
|
64,
|
|
74,
|
|
45,
|
|
55,
|
|
65,
|
|
67,
|
|
50,
|
|
74,
|
|
67,
|
|
43,
|
|
43,
|
|
50,
|
|
50,
|
|
1000,
|
|
48,
|
|
46,
|
|
50,
|
|
62,
|
|
60,
|
|
45,
|
|
45,
|
|
50,
|
|
39,
|
|
55,
|
|
60,
|
|
43,
|
|
52,
|
|
57,
|
|
57,
|
|
62,
|
|
34,
|
|
50,
|
|
59,
|
|
107,
|
|
121,
|
|
170,
|
|
97,
|
|
175,
|
|
81,
|
|
74,
|
|
135,
|
|
95,
|
|
154,
|
|
78,
|
|
90,
|
|
140,
|
|
93,
|
|
149,
|
|
93,
|
|
100,
|
|
116,
|
|
90,
|
|
149,
|
|
81,
|
|
88,
|
|
119,
|
|
85,
|
|
114,
|
|
97,
|
|
83,
|
|
163,
|
|
114,
|
|
140,
|
|
78,
|
|
86,
|
|
138,
|
|
86,
|
|
121,
|
|
98,
|
|
112,
|
|
123,
|
|
102,
|
|
197,
|
|
81,
|
|
72,
|
|
59,
|
|
59,
|
|
52,
|
|
41,
|
|
64,
|
|
53,
|
|
52,
|
|
48,
|
|
60,
|
|
53,
|
|
53,
|
|
41,
|
|
50,
|
|
62,
|
|
60,
|
|
65,
|
|
50,
|
|
45,
|
|
41,
|
|
59,
|
|
59,
|
|
43,
|
|
60,
|
|
52,
|
|
36,
|
|
36,
|
|
46,
|
|
48,
|
|
1000,
|
|
85,
|
|
100,
|
|
119,
|
|
85,
|
|
83,
|
|
81,
|
|
86,
|
|
97,
|
|
105,
|
|
97,
|
|
111,
|
|
109,
|
|
71,
|
|
97,
|
|
118,
|
|
104,
|
|
86,
|
|
107,
|
|
100,
|
|
79,
|
|
104,
|
|
88,
|
|
116,
|
|
104,
|
|
78,
|
|
76,
|
|
92,
|
|
83,
|
|
71,
|
|
1000,
|
|
48,
|
|
62,
|
|
71,
|
|
50,
|
|
43,
|
|
39,
|
|
31,
|
|
27,
|
|
52,
|
|
36,
|
|
57,
|
|
43,
|
|
59,
|
|
65,
|
|
62,
|
|
52,
|
|
39,
|
|
46,
|
|
74,
|
|
90,
|
|
74,
|
|
71,
|
|
41,
|
|
20,
|
|
52,
|
|
48,
|
|
52,
|
|
52,
|
|
53,
|
|
1000,
|
|
104,
|
|
97,
|
|
98,
|
|
116,
|
|
95,
|
|
90,
|
|
90,
|
|
100,
|
|
100,
|
|
83,
|
|
98,
|
|
97,
|
|
105,
|
|
92,
|
|
88,
|
|
92,
|
|
90,
|
|
88,
|
|
86,
|
|
90,
|
|
95,
|
|
90,
|
|
93,
|
|
97,
|
|
92,
|
|
114,
|
|
76,
|
|
86,
|
|
83,
|
|
1000,
|
|
53,
|
|
64,
|
|
59,
|
|
50,
|
|
71,
|
|
41,
|
|
46,
|
|
57,
|
|
52,
|
|
36,
|
|
60,
|
|
39,
|
|
50,
|
|
67,
|
|
46,
|
|
48,
|
|
43,
|
|
55,
|
|
62,
|
|
46,
|
|
64,
|
|
38,
|
|
52,
|
|
60,
|
|
41,
|
|
52,
|
|
53,
|
|
53,
|
|
46
|
|
],
|
|
"pieces": [
|
|
{
|
|
"start": 0,
|
|
"len": 60,
|
|
"flags": 0,
|
|
"kind": "natural",
|
|
"mad_milli": 5562,
|
|
"changed_permille": 944,
|
|
"occupancy": 23
|
|
},
|
|
{
|
|
"start": 60,
|
|
"len": 80,
|
|
"flags": 1,
|
|
"kind": "natural",
|
|
"mad_milli": 8485,
|
|
"changed_permille": 991,
|
|
"occupancy": 30
|
|
},
|
|
{
|
|
"start": 140,
|
|
"len": 90,
|
|
"flags": 1,
|
|
"kind": "motion_high",
|
|
"mad_milli": 9435,
|
|
"changed_permille": 974,
|
|
"occupancy": 19
|
|
},
|
|
{
|
|
"start": 230,
|
|
"len": 30,
|
|
"flags": 1,
|
|
"kind": "natural",
|
|
"mad_milli": 5911,
|
|
"changed_permille": 947,
|
|
"occupancy": 14
|
|
},
|
|
{
|
|
"start": 260,
|
|
"len": 30,
|
|
"flags": 1,
|
|
"kind": "natural",
|
|
"mad_milli": 4198,
|
|
"changed_permille": 881,
|
|
"occupancy": 19
|
|
},
|
|
{
|
|
"start": 290,
|
|
"len": 30,
|
|
"flags": 1,
|
|
"kind": "natural",
|
|
"mad_milli": 5752,
|
|
"changed_permille": 942,
|
|
"occupancy": 14
|
|
},
|
|
{
|
|
"start": 320,
|
|
"len": 30,
|
|
"flags": 1,
|
|
"kind": "natural",
|
|
"mad_milli": 4205,
|
|
"changed_permille": 876,
|
|
"occupancy": 19
|
|
}
|
|
],
|
|
"plan_digest": "b911c034e31db99779f2547623fd0da9987eea22a5d1a538217b4c7766438816"
|
|
},
|
|
{
|
|
"name": "kinds-01",
|
|
"sha256": "3f87fcdc5f884095cc1284d2157ddd0f3411ea5760b3ea0fbc782c9303c54604",
|
|
"frames": 290,
|
|
"scores": [
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
937,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
947,
|
|
192,
|
|
187,
|
|
185,
|
|
189,
|
|
185,
|
|
173,
|
|
182,
|
|
187,
|
|
166,
|
|
206,
|
|
189,
|
|
152,
|
|
197,
|
|
211,
|
|
182,
|
|
178,
|
|
208,
|
|
192,
|
|
220,
|
|
196,
|
|
206,
|
|
164,
|
|
159,
|
|
180,
|
|
215,
|
|
194,
|
|
163,
|
|
159,
|
|
190,
|
|
177,
|
|
163,
|
|
163,
|
|
170,
|
|
171,
|
|
185,
|
|
211,
|
|
166,
|
|
178,
|
|
175,
|
|
701,
|
|
43,
|
|
69,
|
|
53,
|
|
64,
|
|
45,
|
|
46,
|
|
43,
|
|
43,
|
|
72,
|
|
57,
|
|
50,
|
|
52,
|
|
45,
|
|
52,
|
|
83,
|
|
62,
|
|
59,
|
|
69,
|
|
69,
|
|
52,
|
|
39,
|
|
43,
|
|
65,
|
|
62,
|
|
57,
|
|
41,
|
|
50,
|
|
48,
|
|
55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,
|
|
"flags": 0,
|
|
"kind": "static",
|
|
"mad_milli": 0,
|
|
"changed_permille": 0,
|
|
"occupancy": 32
|
|
},
|
|
{
|
|
"start": 40,
|
|
"len": 40,
|
|
"flags": 1,
|
|
"kind": "synthetic",
|
|
"mad_milli": 15500,
|
|
"changed_permille": 125,
|
|
"occupancy": 3
|
|
},
|
|
{
|
|
"start": 80,
|
|
"len": 40,
|
|
"flags": 1,
|
|
"kind": "motion_high",
|
|
"mad_milli": 85954,
|
|
"changed_permille": 995,
|
|
"occupancy": 64
|
|
},
|
|
{
|
|
"start": 120,
|
|
"len": 40,
|
|
"flags": 1,
|
|
"kind": "natural",
|
|
"mad_milli": 4649,
|
|
"changed_permille": 897,
|
|
"occupancy": 20
|
|
},
|
|
{
|
|
"start": 160,
|
|
"len": 100,
|
|
"flags": 1,
|
|
"kind": "static",
|
|
"mad_milli": 0,
|
|
"changed_permille": 0,
|
|
"occupancy": 32
|
|
},
|
|
{
|
|
"start": 260,
|
|
"len": 30,
|
|
"flags": 2,
|
|
"kind": "static",
|
|
"mad_milli": 0,
|
|
"changed_permille": 0,
|
|
"occupancy": 32
|
|
}
|
|
],
|
|
"plan_digest": "9aa1cba4566b039a1a62e42314a48a9c10dcbca901a94bdae0075c5ec3a42988"
|
|
}
|
|
]
|
|
}
|