Lane-screen round 2 report
Browse files at this commit88cde1837204fba97b3c9e546f3a4c4c3dc3349fParent: ad21245- docs
- lane-screen round 2 report
1 changed file +96 -0
- lanes/screen-r2.report.md +96 -0
lanes/screen-r2.report.mdadded+96 -0
| @@ -0,0 +1,96 @@ | ||
| 1 | +VERDICT: GREEN — decode_inter_block/decode_inter_block8's intra-sub-block branches now consume PALETTE_Y_MODE/PALETTE_UV_MODE the same way read_intra_mode does for key frames; stream.rs:169's `frame_type != Key && allow_screen_content_tools` whole-frame refusal is removed entirely; 231/0 lib suite unchanged. | |
| 2 | + | |
| 3 | +## What landed (commit daa6934, on top of merged lane-screen r1 at 42af470) | |
| 4 | + | |
| 5 | +libaom's inter-frame intra-sub-block reader is `read_intra_block_mode_info` | |
| 6 | +(decodemv.c:1065-1107) — confirmed by reading it directly, NOT the | |
| 7 | +key-frame `read_intra_frame_mode_info` the charter warned might not | |
| 8 | +transfer. Two findings that changed scope from what the charter assumed: | |
| 9 | + | |
| 10 | +- Its `mbmi->mode` read already uses `ec_ctx->y_mode_cdf[size_group_lookup[bsize]]`, | |
| 11 | + never `kf_y_mode_cdf` — and this decoder's `decode_inter_block`/ | |
| 12 | + `decode_inter_block8` intra branches already read `cdfs.y_mode[size_group]`/ | |
| 13 | + `cdfs.y_mode[SIZE_GROUP_8]` respectively (pre-existing code, unrelated to | |
| 14 | + this lane). No CDF-selection bug to fix here. | |
| 15 | +- `read_intra_block_mode_info` has **no `use_intrabc` call at all**. | |
| 16 | + `av1_read_mode_info` dispatches `use_intrabc = 0` then branches on | |
| 17 | + `frame_is_intra_only(cm)`: only that branch calls `read_intra_frame_mode_info` | |
| 18 | + (which reads `use_intrabc`); the inter-frame branch calls | |
| 19 | + `read_inter_frame_mode_info` → `read_intra_block_mode_info` for an intra | |
| 20 | + sub-block, with no intrabc symbol at all — it's an intra-frame-only bit by | |
| 21 | + spec construction, not something this decoder was ever missing here. So | |
| 22 | + this round's whole job collapsed to palette only. | |
| 23 | + | |
| 24 | +What was added, mirroring `read_intra_mode`'s existing r1 wiring exactly | |
| 25 | +(same `av1_allow_palette` gate reused via the existing `palette_bsize_ctx` | |
| 26 | +helper, same `palette_mode_ctx`/`palette_uv_mode_ctx` hardcoded-0 | |
| 27 | +corner-cut — still safe, unchanged reasoning): | |
| 28 | + | |
| 29 | +- `decode_inter_block`'s square-intra branch: after `uv_mode`/`alpha` are | |
| 30 | + read (same point `read_palette_mode_info` sits at in libaom, right after | |
| 31 | + `xd->cfl.store_y`), reads `palette_y_mode[bsize_ctx][0]` when | |
| 32 | + `mode == DC_PRED` and `palette_uv_mode[0]` when `uv_mode == DC_PRED`, | |
| 33 | + refusing by name on either firing nonzero. | |
| 34 | +- `decode_inter_block8`'s 8x8-leaf intra branch: same two reads, `bsize_ctx` | |
| 35 | + fixed at 0 (`BLOCK_8X8` is always `av1_allow_palette`-eligible; the leaf's | |
| 36 | + own existing refusal already forces `uv_mode == DC_PRED`, so the UV read | |
| 37 | + is unconditional there, matching libaom's own always-true gate for this | |
| 38 | + shape). | |
| 39 | +- Both functions gained a trailing `allow_screen_content_tools: bool` param; | |
| 40 | + `decode_inter_frame_tile_with_cdfs` gained the same param, threaded to all | |
| 41 | + 19 `decode_inter_block` and 1 `decode_inter_block8` call sites (the public | |
| 42 | + `decode_inter_frame_tile` wrapper and one test call site pass `false`, | |
| 43 | + matching the existing key-frame wrapper convention). | |
| 44 | +- `stream.rs`'s production call passes `header.allow_screen_content_tools`. | |
| 45 | +- `stream.rs:169`'s remaining `frame_type != Key && allow_screen_content_tools` | |
| 46 | + refusal is deleted (comment left explaining why no whole-frame refusal is | |
| 47 | + needed anymore — genuine palette use still refuses deeper in the block | |
| 48 | + readers, same as key frames). The `delta.q_present || delta.lf_present` | |
| 49 | + refusal on the lines below is untouched, per charter. | |
| 50 | + | |
| 51 | +No new CDF tables — `palette_y_mode`/`palette_uv_mode`/`palette_y_size`/ | |
| 52 | +`palette_uv_size` already exist and were already 4-site-wired in r1 | |
| 53 | +(`reset2`/`reset3` length-generic, save/restore whole-struct, defaults | |
| 54 | +checked then). This round only reused them from a second call site. | |
| 55 | + | |
| 56 | +Rect intra strips inside a screen-content frame still refuse by name | |
| 57 | +("a HORZ/VERT intra strip in a screen-content frame (palette syntax is | |
| 58 | +consumed for square blocks only)") — untouched, per charter. | |
| 59 | + | |
| 60 | +## Verification | |
| 61 | + | |
| 62 | +`cargo check -p ec-av1 --lib --tests`: clean (pre-existing warnings only). | |
| 63 | + | |
| 64 | +`cargo test -p ec-av1 --release --lib`: **231 passed, 0 failed, 17 ignored** | |
| 65 | +— identical to the pre-change baseline; the bit is clear on every existing | |
| 66 | +stream, so the new palette reads are unreached (inert) for all of them. | |
| 67 | + | |
| 68 | +`allow_screen_content_tools` refusal count, before (commit 42af470) vs after | |
| 69 | +(daa6934), same seed range, same test: | |
| 70 | + | |
| 71 | +- `a_real_aomenc_stream_with_ab_partitions_decodes_pixel_exact`: **before 6/40** | |
| 72 | + refusing specifically on `"a non-key frame with allow_screen_content_tools set"` | |
| 73 | + (34 named refusals total, 6 pixel-exact matches, partab_hits=3) → **after | |
| 74 | + 0/40** on that string (31 named refusals — same partition/rect-transform/ | |
| 75 | + rect-screen-content-strip reasons as before minus the 6 whole-frame ones, | |
| 76 | + 9 pixel-exact matches, partab_hits=5). | |
| 77 | +- `a_real_aomenc_stream_with_interintra_wedge_decodes_pixel_exact`: 0/40 on | |
| 78 | + that string both before and after in this fixed-seed run — every refusal | |
| 79 | + here is `"more than one concurrently active ROTZOOM/AFFINE global-motion | |
| 80 | + ref slot"` (unrelated, pre-existing gap), 20/40 pixel-exact both times | |
| 81 | + (wii_hits 8-9, consistent with the documented aomenc-RD-nondeterminism | |
| 82 | + attempt-selection class). The charter's "9 of 40" estimate for this gate | |
| 83 | + did not reproduce in this measurement — noted rather than silently | |
| 84 | + dropped; the AB-partitions gate is the one that actually carried this | |
| 85 | + refusal in both rounds. | |
| 86 | + | |
| 87 | +## What still refuses | |
| 88 | + | |
| 89 | +- Genuine palette use (nonzero `palette_size`) or genuine intrabc use, on | |
| 90 | + any frame type — reconstruction is out of scope, by design (spec-correct | |
| 91 | + named refusal, not a desync). | |
| 92 | +- A HORZ/VERT (rect) intra strip in a screen-content frame — the square-only | |
| 93 | + `palette_bsize_ctx` doesn't cover rect strips; unchanged from r1. | |
| 94 | +- `SMOOTH_PRED`/`PAETH_PRED` chroma, directional chroma on the general | |
| 95 | + intra-in-inter path, non-angle-zero deltas, `mode >= 13` — all pre-existing, | |
| 96 | + unrelated round-2 gaps this lane didn't touch. |