forge
Explore
Log in

Don't you dare go Hollow

scripts: re-point the oracle DEPTH ASSUMPTION blocks at today's decode.rs lines

Browse files at this commit

2562e2c99d4110dfdefc31722a15b2b1a1a95270Ahmet Kaan GümüşParent: e6e5fdc
The four DEPTH ASSUMPTION blocks landed from 98d878d6 citing decoder-side
line numbers that have since drifted (decode.rs is 56341 lines; the cited
:35263 / :35336 / :35356 / :19734 and the "same at :53126 / :53048 /
:53148" duplicates no longer point at the narrowing code). A comment whose
whole job is "read this before you blame your decoder" must not point at
the wrong lines.

Re-verified every substantive claim against the current tree before
re-pointing, all still true:
  - rungs 1/6/7/15: fwrite(..., 1, w, f), no YV12_FLAG_HIGHBITDEPTH check
  - rung 12: the only depth-aware one (2 B for HBD, 1 B for 8-bit)
  - the decoder-side pairs really do narrow to u8 on purpose
    (dump_stage :20048-20054, dump_prefilter_wide :20078-20090; the
    duplicate narrow closures are at :35651 and :53489)

stream.rs:2129-2155 (rung 12's u16 LE writer) was already correct and is
left alone. Comments only -- still zero non-comment added lines, so the
emitted oracle C is byte-identical.
scripts/instrument-aom-oracle.shmodified+9 -8
@@ -131,7 +131,8 @@ s = s.replace(old_sig, new_sig, 1)
131 # DEPTH ASSUMPTION (lane-av1oraclerungdepth): this rung writes 1 byte per131 # DEPTH ASSUMPTION (lane-av1oraclerungdepth): this rung writes 1 byte per
132 # sample and has NO YV12_FLAG_HIGHBITDEPTH check. That is deliberate -- it is132 # sample and has NO YV12_FLAG_HIGHBITDEPTH check. That is deliberate -- it is
133 # byte-paired with our own EC_AV1_PREFILT_DUMP, which narrows 10/12-bit to u8133 # byte-paired with our own EC_AV1_PREFILT_DUMP, which narrows 10/12-bit to u8
134-# on purpose (decode.rs:35263-35273, `p.data.iter().map(|&s| s as u8)`).134+# on purpose (decode.rs:20048-20054, `p.data.iter().map(|&s| s as u8)` in
135+# `dump_stage`).
135 # TRAP: on an HBD stream the file is EXACTLY HALF w*h*2 = w*h bytes, which136 # TRAP: on an HBD stream the file is EXACTLY HALF w*h*2 = w*h bytes, which
136 # reads like a truncated/short decode, not a decoder bug. For HBD use rung 12137 # reads like a truncated/short decode, not a decoder bug. For HBD use rung 12
137 # EC_AV1_FINAL_DUMP (:730) -- it IS depth-correct (u8 / u16 LE).138 # EC_AV1_FINAL_DUMP (:730) -- it IS depth-correct (u8 / u16 LE).
@@ -327,8 +328,8 @@ PYI
327 # --- rung 6: post-deblock, pre-superres row dump ------------------------328 # --- rung 6: post-deblock, pre-superres row dump ------------------------
328 # DEPTH ASSUMPTION (lane-av1oraclerungdepth): 1 byte per sample, NO329 # DEPTH ASSUMPTION (lane-av1oraclerungdepth): 1 byte per sample, NO
329 # YV12_FLAG_HIGHBITDEPTH check. Deliberate -- byte-paired with our330 # YV12_FLAG_HIGHBITDEPTH check. Deliberate -- byte-paired with our
330-# EC_AV1_POSTDEBLOCK_DUMP, which narrows to u8 (decode.rs:35336,331+# EC_AV1_POSTDEBLOCK_DUMP, which narrows to u8 (decode.rs:20048-20054,
331-# `dump_stage(..., &y, &u, &v)` over the u16 planes; same at :53126).332+# `dump_stage(..., &y, &u, &v)` over the u16 planes; same closure at :53489).
332 # TRAP: on an HBD stream the file is EXACTLY HALF w*h*2, which reads like a333 # TRAP: on an HBD stream the file is EXACTLY HALF w*h*2, which reads like a
333 # truncated/short decode, not a decoder bug. For HBD use rung 12334 # truncated/short decode, not a decoder bug. For HBD use rung 12
334 # EC_AV1_FINAL_DUMP (:730) -- depth-correct (u8 / u16 LE).335 # EC_AV1_FINAL_DUMP (:730) -- depth-correct (u8 / u16 LE).
@@ -395,8 +396,8 @@ PYD
395 # be told apart from a margin-region deblock bug.396 # be told apart from a margin-region deblock bug.
396 # DEPTH ASSUMPTION (lane-av1oraclerungdepth): 1 byte per sample, NO397 # DEPTH ASSUMPTION (lane-av1oraclerungdepth): 1 byte per sample, NO
397 # YV12_FLAG_HIGHBITDEPTH check. Deliberate -- byte-paired with our398 # YV12_FLAG_HIGHBITDEPTH check. Deliberate -- byte-paired with our
398-# EC_AV1_PREFILT_WIDE_DUMP, which narrows to u8 (decode.rs:19734-19762,399+# EC_AV1_PREFILT_WIDE_DUMP, which narrows to u8 (decode.rs:20078-20090,
399-# `dump_prefilter_wide`; same body duplicated at :53048). TRAP: on an HBD400+# `dump_prefilter_wide`; same closure at :53489). TRAP: on an HBD
400 # stream the file is EXACTLY HALF w*h*2, which reads like a truncated/short401 # stream the file is EXACTLY HALF w*h*2, which reads like a truncated/short
401 # decode, not a decoder bug. For HBD use rung 12 EC_AV1_FINAL_DUMP (:730) --402 # decode, not a decoder bug. For HBD use rung 12 EC_AV1_FINAL_DUMP (:730) --
402 # depth-correct (u8 / u16 LE).403 # depth-correct (u8 / u16 LE).
@@ -904,9 +905,9 @@ PYST
904 # transcribed here (class: instrument that lives only in a build tree).905 # transcribed here (class: instrument that lives only in a build tree).
905 # DEPTH ASSUMPTION (lane-av1oraclerungdepth): 1 byte per sample, NO906 # DEPTH ASSUMPTION (lane-av1oraclerungdepth): 1 byte per sample, NO
906 # YV12_FLAG_HIGHBITDEPTH check. Deliberate -- byte-paired with our907 # YV12_FLAG_HIGHBITDEPTH check. Deliberate -- byte-paired with our
907-# EC_AV1_POSTCDEF_DUMP, which narrows to u8 (decode.rs:35356; same at908+# EC_AV1_POSTCDEF_DUMP, which narrows to u8 (decode.rs:20048-20054; same
908-# :53148). TRAP: on an HBD stream the file is EXACTLY HALF w*h*2, which reads909+# closure at :53489). TRAP: on an HBD stream the file is EXACTLY HALF w*h*2,
909-# like a truncated/short decode, not a decoder bug. For HBD use rung 12910+# which reads like a truncated/short decode, not a decoder bug. For HBD use rung 12
910 # EC_AV1_FINAL_DUMP (:730) -- depth-correct (u8 / u16 LE).911 # EC_AV1_FINAL_DUMP (:730) -- depth-correct (u8 / u16 LE).
911 # OBSERVED 2026-09-29 (HBD build, av112bit-key.obu): the 1-byte fwrite SIGSEGVs912 # OBSERVED 2026-09-29 (HBD build, av112bit-key.obu): the 1-byte fwrite SIGSEGVs
912 # (exit 139); where it survives it writes 30720 B where 61440 B is expected --913 # (exit 139); where it survives it writes 30720 B where 61440 B is expected --