R7 closes the coefficient-decode hypothesis, points r8 at mode_info/tile offset
Browse files at this commit222de206975c7698215fdb8cc78c19138dbbd647Parent: 924ba44- docs
- r7 closes the coefficient-decode hypothesis, points r8 at mode_info/tile offset
1 changed file +1 -1
crates/ec-av1/src/stream.rsmodified+1 -1
| @@ -513,7 +513,7 @@ mod tests { | ||
| 513 | 513 | /// decode: pixel-exact against ffmpeg's own decode, not just "decoded". |
| 514 | 514 | /// |
| 515 | 515 | #[test] |
| 516 | - #[ignore = "r6: scan-transposition hypothesis FALSIFIED empirically, not by re-derivation. Read `default_scan_4x4/8x8/32x32` in /tmp/libaom-src/av1/common/scan.c as raster indices (value = row*side+col) and found the odd/even diagonal-walk parity backwards vs this crate's default_scan in both tile.rs and decode.rs; swapped both. Result: a_real_libaom_gradients_stream_decodes_pixel_exact (the whole-SB Luma64/TX32 case, previously ground-truth pixel-exact against ffmpeg per r5) REGRESSED to failing, and this CfL test's failure was UNCHANGED (still wrong, same row-0-only energy shape) -- reverted both files back to HEAD (5232eff). Two readings are possible: either libaom's default_scan_NxN array is not read as row-major (row*side+col) the way I assumed -- e.g. it may be column-major (col*side+row) or defined over a transposed coefficient buffer relative to this crate's grid[row*side+col] -- or the parity truly is backwards but only for Luma32 BLOCK-granularity quadrants specifically, not the Luma64 whole-SB case, meaning a single default_scan() cannot serve both correctly and the bug is a missing quadrant-position transform (block-relative vs SB-relative row/col), not the scan generator itself. r7 should NOT re-attempt a source-transcription parity re-derivation without first re-confirming against gradients (known-good, keep it green) on every candidate; instead resume r6's extend-the-python-cross-check plan (msac.py has the CDF_TOP/EC_PROB_SHIFT MSAC core through the eob-group symbol already) through base/base_eob/br/dc_sign/golomb for the pinned CfL block, comparing context index and decoded value at every step against a temporary Rust trace (EC_AV1_TRACE pattern, strip before commit), to find the first (ctx, value) divergence directly rather than guessing at table conventions."] | |
| 516 | + #[ignore = "r7: the symbol-level cross-check this note asked for is done and CLEARS the coefficient decode. An EC_AV1_TRACE-gated trace (decode.rs read_coeffs/read_eob) was diffed against an independent Python MSAC decoder (real libaom default CDFs pulled from token_cdfs.h, context arithmetic ported from txb_common.h's get_nz_mag/get_nz_map_ctx_from_stats/get_br_ctx -- not from this crate). Every symbol matches ours bit-for-bit through the full Luma32 base loop: eob_pt=5, eob_extra(ctx=2)=1, eob=15, base_eob(ctx=1)=1, then base ctx/value pairs 21/0,21/0,21/0,21/0,6/0,6/0,6/0,7/0,7/2,6/0,6/0,1/0,2/2,0/2, dc_sign(ctx=0)=negative -- three nonzero levels (magnitude 2 each) at raster positions 0/1/2. The scan table, CDF tables, and every context function are proven correct for this stream; r6's transposition hypothesis stays reverted and should not be revisited. Feeding those exact levels through dequant_and_inverse_typed (base_q_idx=60) gives a near-flat residual (row 0 barely varies, rows 1-31 replicate it -- correct behaviour for energy confined to row 0) landing luma at a uniform ~126 against ffmpeg's real ~50-and-varying output: three magnitude-2 coefficients cannot close a gap that size even transformed exactly right, so the desync is BEFORE this trace starts -- mode_info (partition/skip/y_mode/uv_mode) or the tile-group byte offset itself. r8: extend EC_AV1_TRACE (already added, off by default) to mode_info's own symbols and cross-check them the same way, and separately confirm the tile data's starting byte offset against the OBU/frame-header parse (ec-av1-syntax) rather than trusting a byte slice pulled from a prior round's own decoder run."] | |
| 517 | 517 | fn a_real_libaom_cfl_stream_decodes_pixel_exact() { |
| 518 | 518 | if !have_ffmpeg() { |
| 519 | 519 | eprintln!("SKIP a_real_libaom_cfl_stream_decodes_pixel_exact: no ffmpeg"); |