lane-av1422warp: the defect-3 dc-sign VERDICT -- our value is wrong, the rect
Browse files at this commit3d97c32405002df3b49d9a72142107cc0d41701aParent: 50a09271 changed file +56 -0
- lanes/av1422warp.report.md +56 -0
lanes/av1422warp.report.mdmodified+56 -0
| @@ -294,6 +294,62 @@ VALUES match by scan index on both sides, so this does not by itself move a bit, | ||
| 294 | 294 | but it places coefficients in the wrong cells and would corrupt the transform |
| 295 | 295 | independently of the entropy question. |
| 296 | 296 | |
| 297 | +### The dc-sign verdict: the VALUE is wrong, and the input is the rect path | |
| 298 | + | |
| 299 | +Rung on both sides: ours is the existing `EC_DCDUMP` (which prints the vote and | |
| 300 | +every sampled neighbour cell), the oracle's is a new `DCSIGN` print in | |
| 301 | +`get_txb_ctx_general` reading `txb_ctx->dc_sign_ctx`, its `dc_sign` sum, and the | |
| 302 | +individual `a[]`/`l[]` sign fields over `txb_w_unit`/`txb_h_unit`. Both reverted | |
| 303 | +(oracle `aomdec` rebuilt, `grep -c DCSIGN` = 0). | |
| 304 | + | |
| 305 | +**First, a wrong turn worth recording: our `dc_sign_ctx` table is CORRECT.** | |
| 306 | +libaom's `dc_sign_contexts` is 65 entries read at `dc_sign + 32`; extracted | |
| 307 | +programmatically it is `dc_sign < 0 -> 1`, `== 0 -> 0`, `> 0 -> 2`, which is | |
| 308 | +exactly what [`dc_sign_ctx`]'s `signum` buckets compute. A hand count of that | |
| 309 | +table literal suggests a different mapping and would have sent the next lane | |
| 310 | +after a non-bug; the table is fine. | |
| 311 | + | |
| 312 | +**The vote differs.** libaom's own print at the neighbouring units is shaped | |
| 313 | +`dc_sign=-4 ctx=1 above=[-1,-1,-1,-1] left=[0,0,0,0,0,0,0,0]` — and the symbol | |
| 314 | +ladder showed the oracle resolving ctx **1** where we resolve **0**, i.e. | |
| 315 | +libaom's `dc_sign` is negative and ours is 0. | |
| 316 | + | |
| 317 | +**The input, from our own `EC_DCDUMP` at the block in question:** | |
| 318 | + | |
| 319 | +``` | |
| 320 | +EC_DCDUMP mi=(48,28) plane=2 wh=(16,8) vote=0 | |
| 321 | + above=[None/6, None/6, Some(false)/7, Some(false)/7] <- FOUR cells | |
| 322 | + left =[Some(true)/7, Some(true)/7] <- TWO cells | |
| 323 | +``` | |
| 324 | + | |
| 325 | +`wh=(16,8)` is the block's LUMA footprint, so the rect path summed the vote over | |
| 326 | +**4 above + 2 left** cells. The unit actually being decoded is the 8x8 V CHROMA | |
| 327 | +transform, whose own `txb_w_unit`/`txb_h_unit` are **2 and 2** — libaom reads two | |
| 328 | +above cells, not four. Dropping two above cells can drop a negative contribution | |
| 329 | +and turn a negative vote into exactly the 0 we produce. | |
| 330 | + | |
| 331 | +**So: the 4:2:2 chroma correction exists but is not wired into this path.** | |
| 332 | +[`around_mi_422_chroma`] — the function whose own comment says "libaom | |
| 333 | +`get_txb_ctx_general` reads its above votes over `txb_w_unit` CHROMA 4-px cells, | |
| 334 | +and at ss_x 1 one chroma cell spans TWO luma mi columns... Sampling every second | |
| 335 | +above cell counts each chroma column once, which IS libaom's sum" — is reached | |
| 336 | +1653 times on this stream, but NOT for this block: mi(48,28) prints | |
| 337 | +`EC_DCDUMP`, not `EC_DCDUMP422`. The **rect** path (`around_mi_rect`) has no 4:2:2 | |
| 338 | +variant, so a 4:2:2 RECT block votes over the luma unit counts. | |
| 339 | + | |
| 340 | +That is the same neighbour-read family as the `smooth_uv` fix, in the same file, | |
| 341 | +for the same reason: a per-axis shape correction that was applied to some paths | |
| 342 | +and not to the rect one. **This lane ran out of budget before landing the fix**; | |
| 343 | +it is handed off here with the evidence above. | |
| 344 | + | |
| 345 | +**On the scan-table finding (Main's caution): checked, and the caution does not | |
| 346 | +explain it.** Unit 1418 is mi(48,28) plane 2 and it PAIRED on both sides as 8x8 | |
| 347 | +with an identical prediction sum (9024) — the tiling divergence (TX_4X4 vs | |
| 348 | +TX_8X8) is at unit 1419, the NEXT unit. So unit 1418 is 8x8 on both sides and a | |
| 349 | +"different scan table by design because the tx size differs" explanation does not | |
| 350 | +apply to it. The finding stands, though it may still be downstream of something | |
| 351 | +else; it is second priority to the vote. | |
| 352 | + | |
| 297 | 353 | ### Unblock |
| 298 | 354 | |
| 299 | 355 | The per-TU window bisect below has been run and NAMES the read: the **DC sign |