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

Merged
descent81 merged 2 commits from upstream-pr/69 into main 2026-11-21 15:22:43 +00:00
descent81 commented 2026-11-21 15:05:33 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by descent81 on 2026-11-21T15:05:33Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6530496758 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/69). Originally posted by [descent81](https://github.com/descent81) on 2026-11-21T15:05:33Z. --- 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.
upstream-sync closed this pull request 2026-11-24 06:41:12 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!69
No description provided.