Lane-palette2 r6 charter -- gate the broad rect-strip case, not the rare palette-on-rect one
Browse files at this commit09120e8d1da8b8c10b0b7f4b2973884bb7dbfec0Parent: 0f46093- docs
- lane-palette2 r6 charter -- gate the broad rect-strip case, not the rare palette-on-rect one
1 changed file +63 -0
- lanes/palette2-r6.charter.md +63 -0
lanes/palette2-r6.charter.mdadded+63 -0
| @@ -0,0 +1,63 @@ | |||
| 1 | +# lane-palette2 r6 — gate the case that actually occurs | ||
| 2 | + | ||
| 3 | +At the r5 commit. Read `lanes/palette2-r5.report.md`. r5 did good work and | ||
| 4 | +reported an honest RED: its gate hard-asserts `palette_rect_hits()` and 70 | ||
| 5 | +aomenc attempts never moved that counter, so r4's implementation is still | ||
| 6 | +unverified. | ||
| 7 | + | ||
| 8 | +## What I think went wrong, from my own measurement | ||
| 9 | +The counter is too narrow. The refusal r4 removed was: | ||
| 10 | + | ||
| 11 | + "a HORZ/VERT intra strip in a screen-content frame | ||
| 12 | + (palette syntax is consumed for square blocks only)" | ||
| 13 | + | ||
| 14 | +That fires on a rect strip in a frame with screen-content tools enabled — | ||
| 15 | +whether or not that particular block ends up USING a palette. r5 searched for a | ||
| 16 | +block that both is a rect strip and codes a palette, which RD apparently almost | ||
| 17 | +never picks. But the broad case is common: **I hit that exact refusal on main | ||
| 18 | +with plain default settings**, no flag hunting: | ||
| 19 | + | ||
| 20 | + ffmpeg -v error -f lavfi -i "smptebars=size=192x128:rate=30" -t 0.2 \ | ||
| 21 | + -pix_fmt yuv420p in.y4m -y | ||
| 22 | + aomenc --codec=av1 --ivf --threads=1 --row-mt=0 --sb-size=64 --limit=3 \ | ||
| 23 | + --cpu-used=4 --end-usage=q --cq-level=32 -o out.ivf in.y4m | ||
| 24 | + ffmpeg -v error -i out.ivf -c:v copy -f obu out.obu -y | ||
| 25 | + cargo run -p ec-av1 --example decode_probe -- out.obu | ||
| 26 | + | ||
| 27 | +On main that prints the refusal above. `rgbtestsrc` does the same. On THIS | ||
| 28 | +branch the refusal is gone, so the same stream now runs through r4's code — and | ||
| 29 | +that is the thing to gate. | ||
| 30 | + | ||
| 31 | +## The job | ||
| 32 | +1. Reproduce the above on main first, so you are gating a case you have watched | ||
| 33 | + occur rather than one you hope occurs. | ||
| 34 | +2. Add a counter at the site r4 actually changed — the rect-strip-in-a- | ||
| 35 | + screen-content-frame path — not a palette-specific one. Then gate: this | ||
| 36 | + stream, through `decode_stream`, pixel-exact vs ffmpeg, with that counter | ||
| 37 | + hard-asserted to have moved. | ||
| 38 | +3. If pixels match, the lift is earned: keep r4's narrower refusal | ||
| 39 | + ("a palette block with a real transform on a superblock-level HORZ/VERT | ||
| 40 | + strip...") and update `refusal_inventory.rs` so the lists agree. | ||
| 41 | +4. If pixels mismatch, that is r4's implementation being wrong — bisect with a | ||
| 42 | + range ladder against the oracle (rung 12 is yours) and say so. | ||
| 43 | + | ||
| 44 | +**Right now this branch has removed a refusal with no gate behind it** | ||
| 45 | +([[refusal-lifted-without-a-gate]]), which is the one state that cannot merge. | ||
| 46 | +Closing that is this round's whole point. | ||
| 47 | + | ||
| 48 | +Keep r5's gate too if you can make it fire, but do not spend the round on it — | ||
| 49 | +its own report says the honest next lever is `aomenc --partition-info-path` or a | ||
| 50 | +fixture with two very different flat-colour halves, and that is a later problem. | ||
| 51 | + | ||
| 52 | +## Budget discipline | ||
| 53 | +75 turns, no reset on resume. At about turn 55, stop starting new work: commit | ||
| 54 | +what you have — red included, named as such — and write your report. Landing red | ||
| 55 | +on this branch is fine; only merging red is forbidden, and I do the merges. | ||
| 56 | + | ||
| 57 | +Hard rules: `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-palette2`; foreground | ||
| 58 | +`nice -n 19 cargo ... -j4`; every `cargo test` a timeout >= 600000 ms; ffmpeg | ||
| 59 | +generates bounded with `-t`; `EC_AV1_REQUIRE_AOMENC=1`; aomenc | ||
| 60 | +`--threads=1 --row-mt=0 --sb-size=64`. The oracle is SHARED — env-gated rungs | ||
| 61 | +only. Sibling worktrees have live agents — never build in or edit them. Never | ||
| 62 | +push, never merge into main. End with `lanes/palette2-r6.report.md`, VERDICT on | ||
| 63 | +line 1. | ||