Check the second refill byte of a fixed-symbol BCPack lane #69

Manually merged
github merged 2 commits from gh-pr/69/head into gh-pr/69/base 2026-11-26 21:25:19 +00:00
Owner

@⁠descent81 on GitHub · 2026-11-21 15:05 UTC · original
descent81:contribution/bcpack-second-refill → main · +36 −4 · 2 files · 2 commits · merged 2026-11-21 15:22 UTC

Related to #15.

What changed

The fixed-symbol BCPack probe already checks the first byte consumed by a lane after the 48-byte header. This change adds an optional --next-mask argument for the immediately following refill round. For a lane participating in both rounds, the probe reports the second byte’s packet offset and whether its value matches the model’s prediction.

Reproducible example

The regression test uses a synthetic 25,000-block input. Lane 4’s six header bytes are DE 05 03 0C 86 4E, and the model predicts two refill bytes in consumption order: AC, then 7D.

With first-round mask 0x11, lanes 0 and 4 consume offsets 48 and 49. With second-round mask 0x14, lanes 2 and 4 consume offsets 50 and 51. This gives a concrete prediction for lane 4: its second byte should be 7D at offset 51.

Lane 4 input First check Second check
AC, 7D Match Match at offset 51
AC, 7C Match Mismatch at offset 51

Changing only the second byte leaves the first check intact. The test also checks that supplying a second-round mask without its required byte raises ValueError.

Validation and scope

Ran python -B tests/bcpack_check.py -v with Python 3.15. All three tests passed.

This verifies a fixed-symbol prediction against synthetic data with explicitly supplied participation masks. Inferring the masks, decoding variable symbols, and comparing reconstructed BC7 block rows against an independent reference remain open.

**@⁠descent81** on GitHub · 2026-11-21 15:05 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/69) `descent81:contribution/bcpack-second-refill` → `main` · +36 −4 · 2 files · 2 commits · merged 2026-11-21 15:22 UTC Related to #15. ### What changed The fixed-symbol BCPack probe already checks the first byte consumed by a lane after the 48-byte header. This change adds an optional `--next-mask` argument for the immediately following refill round. For a lane participating in both rounds, the probe reports the second byte’s packet offset and whether its value matches the model’s prediction. ### Reproducible example The regression test uses a synthetic 25,000-block input. Lane 4’s six header bytes are `DE 05 03 0C 86 4E`, and the model predicts two refill bytes in consumption order: `AC`, then `7D`. With first-round mask `0x11`, lanes 0 and 4 consume offsets 48 and 49. With second-round mask `0x14`, lanes 2 and 4 consume offsets 50 and 51. This gives a concrete prediction for lane 4: its second byte should be `7D` at offset 51. | Lane 4 input | First check | Second check | |---|---|---| | `AC`, `7D` | Match | Match at offset 51 | | `AC`, `7C` | Match | Mismatch at offset 51 | Changing only the second byte leaves the first check intact. The test also checks that supplying a second-round mask without its required byte raises `ValueError`. ### Validation and scope Ran `python -B tests/bcpack_check.py -v` with Python 3.15. All three tests passed. This verifies a fixed-symbol prediction against synthetic data with explicitly supplied participation masks. Inferring the masks, decoding variable symbols, and comparing reconstructed BC7 block rows against an independent reference remain open.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:25:18 +00:00
github manually merged commit 8511465896 into gh-pr/69/base 2026-11-26 21:25:19 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.