forge
Explore
Log in

Don't you dare go Hollow

Lane-tiles r4 report -- multi-tile refusal lifted for key frames, scoped to loop-filter-off/cols<=2/rows==1

Browse files at this commit

8b31dcdc9409feccf76c7d1d9762415ffec12a50Ahmet Kaan GümüşParent: 4be6f4c
  • docs
    • lane-tiles r4 report -- multi-tile refusal lifted for key frames, scoped to loop-filter-off/cols<=2/rows==1
Show full message
docs(av1): lane-tiles r4 report -- multi-tile refusal lifted for key frames, scoped to loop-filter-off/cols<=2/rows==1
lanes/tiles-r4.report.mdadded+80 -0
@@ -0,0 +1,80 @@
1+VERDICT: PARTIAL -- steps 1-3 done and committed (9962fb1); step 4 (tile rows,
2+non-uniform spacing, inter frames, several tile-group OBUs,
3+context_update_tile_id != 0) not attempted, out of scope this round.
4+
5+## Step 1: `loop_filter_across_tiles_enabled`
6+Grepped `crates/ec-av1-syntax/src/frame.rs`'s `read_loop_filter_params` (spec
7+5.9.11) end to end: the field does not exist, and it isn't a gap in this
8+crate's parser -- AV1's spec `loop_filter_params()` has no such syntax
9+element at all (unlike HEVC's `loop_filter_across_tiles_enabled` PPS flag,
10+which the charter's naming echoes but AV1 has no equivalent of). Deblocking
11+crosses tile boundaries unconditionally whenever `loop_filter.level` is
12+non-zero; there is no per-stream bit that turns it off. That answers the
13+charter's question: the refusal cannot be conditioned on a header field,
14+only on whether loop filtering is on at all (`level.iter().any(|&l| l != 0)`)
15+combined with the already-known `PlaneBuf` gap (tile origin clips a tile's
16+own left/top reach, never a non-last column's right-edge reach).
17+
18+## Step 2: thread real `tile_bufs` through `decode_stream`
19+`crates/ec-av1/src/stream.rs`'s key-frame call site now builds
20+`tile_bufs: Vec<&[u8]>` from every element of the OBU's own `tiles: Vec<Tile>`
21+(the same `obu_offset + t.offset` correction r3's gate proved necessary) and
22+passes `&tile_bufs` to `decode_key_frame_tile_with_cdfs` instead of the old
23+`&[tile_bytes]` (tile 0 only). The inter-frame call site still passes the
24+single `tile_bytes` it always did -- `decode_inter_frame_tile_with_cdfs`
25+takes one `&[u8]`, not a tile list, and has no per-tile loop at all; widening
26+that signature is real work left for step 4 ("inter frames (tile origin into
27+mvstack.rs)"), not attempted this round.
28+
29+## Step 3: lift the refusal, scoped; re-run r3's gate through `decode_stream`
30+The blanket `cols > 1 || rows > 1` refusal is now four scoped refusals, only
31+firing for what is genuinely still unproven:
32+- inter frame with `cols > 1` (no per-tile loop on that path at all)
33+- `rows > 1` (tile rows never tested)
34+- `cols > 2` (non-last column's right-edge reach bound past column 0 is
35+ unimplemented -- r3's own documented gap, matters starting at 3 columns)
36+- multi-tile frame with `loop_filter.level` non-zero anywhere (deblocking
37+ crossing gap from step 1)
38+
39+A key frame with exactly 2 tile columns, 1 tile row, and loop filtering off
40+now decodes through `decode_stream` itself. New test
41+`a_real_aomenc_stream_with_two_tile_columns_decodes_through_decode_stream`
42+(`stream.rs`, next to r3's gate) runs the identical aomenc recipe through
43+`decode_stream(&stream)` instead of the hand-parsed bypass: 20/20 pixel-exact,
44+`tile_hits()` delta `> 1` every attempt, `pictures.len() == 1`.
45+
46+Did not drop `--loopfilter-control=0` from either gate -- step 1 established
47+that would hit the still-unfixed `PlaneBuf` cross-tile-column reach gap
48+(the new refusal explicitly names this and blocks it before it can silently
49+miscode), not something worth testing-then-reverting this round.
50+
51+## Full suite
52+`cargo check -p ec-av1 --tests`: clean (only pre-existing doc-lint warnings).
53+`EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib -j4`: 234 passed, 0
54+failed, 17 ignored, 146.97s -- both tile gates included, nothing else moved.
55+
56+## Refusal strings
57+
58+Removed (verbatim, was the single blanket refusal):
59+> a frame with more than one tile (this decoder only ever decodes tile 0)
60+
61+Added, four in its place (all in `stream.rs`, all `Error::unsupported("AV1
62+decode_stream", ...)`):
63+> an inter frame with more than one tile (the inter tile-decode path has no per-tile loop, only key frames do)
64+
65+> a frame with more than one tile row (only tile columns are proven pixel-exact so far)
66+
67+> a frame with more than two tile columns (a non-last column's right-edge reach bound past column 0 is unimplemented)
68+
69+> a multi-tile frame with loop filtering enabled (deblocking crosses tile boundaries by spec default; PlaneBuf's tile origin does not clip a non-last column's right-edge reach)
70+
71+## Still open (per charter step 4, unattempted)
72+Tile rows, non-uniform tile spacing, inter-frame multi-tile decode (needs
73+`decode_inter_frame_tile_with_cdfs` to grow the same per-tile loop
74+`decode_key_frame_tile_with_cdfs` already has, plus tile origin threaded into
75+`mvstack.rs` for inter prediction/MV candidates that reach across a tile
76+boundary), several tile-group OBUs per frame, `context_update_tile_id != 0`
77+(this decoder still only ever keeps tile 0's adapted CDF table as the frame's
78+output regardless of what the header names), and the 3+-column right-edge
79+reach bound in `PlaneBuf` itself (currently hard-refused via the `cols > 2`
80+check above rather than silently miscoding).