forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to lanes/av1oraclehbd.report.mdClear filter

2026-09-29

lanes: the shared oracle gets the depth-correct, byte-checked rungs (zero-window swap)Ahmet Kaan Gümüş · 4b63be1
lanes: the shared oracle gets the depth-correct, byte-checked rungs (zero-window swap)

The private copy was never the problem: ~/.cache/aom-oracle shipped the same four
broken rungs, so every lane that ever paired against them on a 10/12-bit stream
got a 0-byte file -- which reads downstream as "the oracle has no data for this
stage" and becomes a phantom stage diff.

Swapped with no window, because ps showed a live lane (cargo-target-av1lm444corr,
a_10bit_film_frames_with_frame_edge_mv_clamping...) exec'ing the shared aomenc
at that moment: hardlink backup aomdec.prefix-20260929-054321 + source copy in
revert/, source edit (a file no running process reads), ninja libaom.a only, the
link command re-run with -o to a scratch path, the new binary verified fully
OFF-PATH, then one mv (inode 177294570 -> 177592760). Revert:
  mv ~/.cache/aom-oracle/build/aomdec.prefix-20260929-054321 ~/.cache/aom-oracle/build/aomdec
  git -C ~/.cache/aom-oracle/src checkout -- av1/decoder/decodeframe.c

Verified ON the shared binary after the flip: five rungs exit 0 on av112bit-key.obu
(12-bit, 30720 B each; rung 12 61440 B) and palette_screen_witness_10bit.obu
(10-bit, 73728 B each; rung 12 147456 B); 8/8 byte-identical to the decoder's as
u8 rows; 8-bit no-op vs the backed-up OLD binary 10/10 IDENTICAL (32768 B and
6144 B). Loudness proven live in the shared tree by a mutant also linked off-path
(12-bit: exit 134, expect=30720 wrote=30560; 8-bit: expect=6144 wrote=6080).
check-aom-oracle-rungs.sh against the shared source: 10 ok, exit 0.

Naming: no lane in today's waves (3a: av1cmpaudit/av1leftwit/av1lossy128x96/
av1pinslive/av1txsearch; 3b: av1rawhelper/av1oracleskip) paired against these four
rungs -- cmpaudit records them as having no in-repo consumer, rawhelper names
PREFILT only as dump_yuv's documented contract and gates on rung 12, oracleskip is
the aomenc-SKIP class. No test anywhere sets those env vars, so no automated gate
could rest on a 0-byte dump. Historical users were 8-bit lanes, where the old
rungs were correct.
lanes: make a narrowing-rung regression loud, and check the derivationAhmet Kaan Gümüş · c755a39
lanes: make a narrowing-rung regression loud, and check the derivation

The depth fix made the four u8-narrowing rungs correct; the harm that caused
was their SILENCE -- a segfaulting rung leaves a 0-byte file, which downstream
reads as "the oracle has no data for this stage" and becomes a phantom stage
diff, or as evidence about the decoder. Two additions:

1. ec_dump_finish(): all four narrowing rungs now close through a byte-count
   check against the shape they claim (Y+U+V at one byte per sample, crop for
   PREFILT, mi-aligned for the other three) and abort() with one self-naming
   line on a mismatch. Non-vacuous: dropping PREFILT's last luma row makes
   aomdec exit 134 with
   EC_DUMP_ABORT rung=EC_AV1_PREFILT_DUMP bit_depth=12 hbd=1 expect=30720
   wrote=30560; restoring it gives exit 0 / 30720 B. Rung 12 keeps its own
   fclose (charter: do not change rung 12) and the rewriter cannot reach it --
   it keys on a rewritten ec_dump_narrow_row call in the block. Monochrome
   expects luma only; a failed fopen skips the block, so no config writes 0.

2. scripts/check-aom-oracle-rungs.sh: derives decodeframe.c from PRISTINE
   upstream (scratch copy, real tree never written) and asserts 0 legacy row
   loops, 12 narrow_row call sites, 4 finish call sites (one per rung), rung 12
   still converting and not narrowed, and that a second run is a no-op. Exit 0
   today; deleting the depth block from a copy of the script makes it print 7
   FAILs and exit 1 in under a second, with no build.

Emitted bytes unchanged: re-paired av112bit-key.obu (12-bit) and
palette_screen_witness_10bit.obu (10-bit), all four rungs oracle vs decoder,
all IDENTICAL.
lanes: oracle u8-narrowing rungs were reading a HALVED plane pointerAhmet Kaan Gümüş · 0f2d966
lanes: oracle u8-narrowing rungs were reading a HALVED plane pointer

The four u8-narrowing aomdec rungs (PREFILT, POSTDEBLOCK, PREFILT_WIDE,
POSTCDEF) SIGSEGV on every 10/12-bit stream: exit 139, 0-byte file, so a lane
loses HBD debugging through them and cannot tell the crash from a decoder
defect. Rung 12 (FINAL) works, and the difference is the whole bug.

YV12_BUFFER_CONFIG stores plane pointers HALVED at high bit depth
(aom_ports/mem.h: CONVERT_TO_BYTEPTR(x) = x >> 1; yv12config.c:161-180), so the
real address is CONVERT_TO_SHORTPTR(p) (p << 1). The rungs did
fwrite(y_buffer + r*y_stride, 1, w, f): pointer arithmetic on the halved value
addresses an unrelated, unmapped address, and y_stride/uv_stride count SAMPLES
so the row is wrong too. At 8 bit no halving happens, which is why the same
line is correct there.

Fix: one ec_dump_narrow_row helper (CONVERT_TO_SHORTPTR + low byte per sample,
the C spelling of the decoder's `s as u8`) and every legacy row loop rewritten
to call it. The 8-bit branch is the original expression verbatim. Rung 12 and
every rung the decoder does not pair with are untouched. The new trailing block
is a repair pass, so re-running instrument-aom-oracle.sh fixes an
already-instrumented tree in place; verified byte-identical against a hand
application, idempotent, and equal to a fresh derivation from pristine upstream.

Measured: 12-bit av112bit-key.obu 139/0B -> 0/30720B; 10-bit
palette_screen_witness_10bit and palette_screen_strip16_witness_10bit all four
rungs byte-identical to the decoder's as u8 dumps (73728B); 2- and 6-frame 12-bit
streams identical frame by frame; 8-bit output byte-identical to the shared
oracle on 422_allskip_2f and golden4-pin.