Lane-interintra r1 report
Browse files at this commit0ce8a5b39a24fe1bd39c676ac439cab7034f6e05Parent: a5a10f4- docs
- lane-interintra r1 report
1 changed file +62 -0
lanes/interintra-r1.report.mdadded+62 -0
| @@ -0,0 +1,62 @@ | ||
| 1 | +# lane-interintra r1 report | |
| 2 | + | |
| 3 | +VERDICT: PASS — non-wedge interintra decodes pixel-exact; two defects found and fixed en route. | |
| 4 | + | |
| 5 | +## What landed (commit 277b9a0 on lane-interintra) | |
| 6 | +1. **Interintra syntax + prediction** (charter scope): interintra flag → | |
| 7 | + interintra_mode (4-ary, size-group CDF) → wedge flag (bsize-row CDF; | |
| 8 | + wedge==1 remains a NAMED refusal for r2). Non-wedge blend | |
| 9 | + `(mask*intra + (64-mask)*inter + 32) >> 6` with ii_weights1d | |
| 10 | + (II_DC=const 32, II_V/H/SMOOTH from the 1-D falloff, scale 128/side), | |
| 11 | + all planes, on both the 16/32 single-ref path and the 8x8 leaf. | |
| 12 | + motion_mode is not read for interintra blocks. New CDFs joined | |
| 13 | + cdf.rs/cdf_state.rs including reset_counts and per-frame save/restore. | |
| 14 | +2. **Defect 1 (ii-flake-1..8): interintra neighbours donated warp samples.** | |
| 15 | + libaom `av1_findSamples` (mvref_common.c:1155) requires | |
| 16 | + `ref_frame[1] == NONE_FRAME`; an interintra neighbour carries | |
| 17 | + ref1=INTRA_FRAME and is excluded. Our mi grid recorded it as plain | |
| 18 | + single-ref → extra warp sample → invalid projection → translation | |
| 19 | + fallback → pixel drift on the next WARPED_CAUSAL block. Fix: grid | |
| 20 | + records `ref_frame1 = Some(0)` for interintra blocks (both grid.set | |
| 21 | + sites); `find_samples`' existing `ref_frame1.is_none()` filter then | |
| 22 | + matches libaom, and `num_proj_ref` (same function) with it. The | |
| 23 | + mvstack compound ref-diff scan gained a `rf1 > 0` guard mirroring | |
| 24 | + libaom's `can_rf > INTRA_FRAME`; all other ref_frame1 consumers compare | |
| 25 | + against real refs 1..7 or require mv1 and are inert to the marker. | |
| 26 | +3. **Defect 2 (ii-flake-9, NOT interintra): `switchable_interp` missing | |
| 27 | + from `Cdfs::reset_counts`.** libaom zeroes every CDF counter when the | |
| 28 | + adapted context is saved at frame end (`av1_reset_cdf_symbol_counters`, | |
| 29 | + decodeframe.c:5588). Ours never reset this one table's counters, so | |
| 30 | + after >15 accumulated reads the update rate slowed to >>5 while aom | |
| 31 | + stayed at >>4; the rows drifted a few counts apart and the filter read | |
| 32 | + flaked only on read-dense streams. Localization: range ladder exact | |
| 33 | + into the block, post_motion_mode range equal, post_interp_filter range | |
| 34 | + divergent; per-read CDF dumps showed equal values but step +9 (ours) vs | |
| 35 | + +16 (aom) on ctx 8. Field-list audit (script vs struct): no other Cdfs | |
| 36 | + field is missing from reset_counts; MvComponentCdfs fully covered. | |
| 37 | + | |
| 38 | +## Evidence | |
| 39 | +- Pinned streams: 11/11 byte-exact in one run (`pinned_warp_stream_decodes_pixel_exact`, | |
| 40 | + fixtures warp-mismatch, warp-flake-5/7, ii-flake-1,2,3,5,6,7,8,9). | |
| 41 | +- Interintra gate `a_real_aomenc_stream_with_interintra_decodes_pixel_exact`: | |
| 42 | + 12/12 hammer clean post-fix (23–33 exact of 40 seeds, rest = | |
| 43 | + screen-content refusals; interintra_hits 11–22 per run; before the | |
| 44 | + fixes: 7/8 runs failed). | |
| 45 | +- Warp gate 3/3 post-fix (counter reset touches all switchable-filter streams). | |
| 46 | +- Full `cargo test -p ec-av1 --release --lib`: 218 passed, 0 failed. | |
| 47 | + | |
| 48 | +## Verification note | |
| 49 | +Cross-provider seats exhausted/stalling (opencode-go monthly, kimi-code 5h, | |
| 50 | +zai flash timeouts); orchestrator verified source-level against libaom C | |
| 51 | +directly (decodemv.c read_interintra_mode_info, reconinter.c | |
| 52 | +combine_interintra, mvref_common.c av1_findSamples, | |
| 53 | +entropy.c av1_reset_cdf_symbol_counters) — same fallback as warp close, | |
| 54 | +documented per standing rule. | |
| 55 | + | |
| 56 | +## Classes | |
| 57 | +- Defect 1 = neighbour-votes-all-its-fields + symbol-consumption-gap's | |
| 58 | + prediction-side kin (range ladder exact ⇒ prediction defect). | |
| 59 | +- Defect 2 = NEW CLASS: adaptation-state half of the CDF contract — | |
| 60 | + values right, counter wrong; presents as a late, content-dependent | |
| 61 | + rotating flake exactly like a consumption gap but with an exact range | |
| 62 | + ladder up to the divergent read. Memory written: cdf-counter-not-reset. |