Add a byte-exact BC7 mode-6 BCPack fixture for the decoder in #15 #442
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#442
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@wish131400 on GitHub · 2026-11-22 03:33 UTC · original
Following up on #15, could this one-block fixture be added to the BC7 regression suite? It gives another implementation a fixed compressed input and the expected 16 output bytes. I generated it from a chosen standard BC7 mode-6 block with Leonida’s synthetic encoder and checked the result with the packaged Python decoder in strict mode. The fixture requires no game files or preset history. Its scope is a synthetic round trip; I have no Xbox hardware reference for it.
Reproduce
With
tools/from the linked revision on the Python import path, this passes as written. To exercise another implementation, replace the call todecode_with_infoand compare all 16 bytes. Decoder · Synthetic encoderFrom the stream to the BC7 block
4,4,8,8,8,8,8,7,7,5,6,8,8,8,8,5. Each lane emits two symbols per 16-byte output block. The feeder grants at most eight requested bytes per clock in lane order. The two lane-15 symbols select the mode, partition, rotation and index-selection configuration.inter(a,b)put the four bits ofain positions 0,2,4,6 and those ofbin 1,3,5,7. For each block in stored order, computedi = inter(lane1[2*i], lane1[2*i+1])andde = (di + unzig(inter(lane0[2*i], lane0[2*i+1]))) & 255, whereunzig(v) = (v >> 1) ^ -(v & 1). These are the index and endpoint distances respectively. Distance zero uses the BC7 zero predictor. A positive distance reads blocki-d, or initial history slot256+i-dwhend > i. This fixture sets both distances to zero.On a local corpus, all 5,167 BC7 chunks consumed their declared payload and reached legal rANS end states. End-state convergence checks the entropy layer. Exact reconstruction of chunks that reference fitted initial history still needs independent block comparisons. Earlier feeder work and bcpack-rs results
@wish131400 on GitHub · 2026-11-22 04:38 UTC · original
While testing archive extraction, oVolkra caught a mistake in my companion issue. In an RDS5 chunk-table entry, the low 26 bits give the physical offset in units of 256 bytes. Bits 26 through 29 give the codec ID.
For example, the synthetic entry value
0x1d000000selects codec 7 at byte offset 4 GiB. A 24-bit mask would instead read from byte zero. The BC7 fixture above already supplies the extracted bytes, so its expected 16-byte output is still valid.Leonida PR #882
@R0Y00 on GitHub · 2026-11-23 01:59 UTC · original
#613 merged in
f77b829. The bounded rANS decoder reproduces all 32 expected symbols from this issue’s synthetic packet and consumes all 104 bytes. The pinned Rust-generated controls cover another 9,168 symbols. Both Windows configurations and the Linux checks passed on the merged candidate.This issue stays open for an independent symbol-to-field reconstruction of the expected 16-byte BC7 block using the repository’s decoder.