diff options
| author | bobcatchris <83428450+bobcatchris@users.noreply.github.com> | 2026-11-30 05:43:54 -0600 |
|---|---|---|
| committer | bobcatchris <83428450+bobcatchris@users.noreply.github.com> | 2026-11-30 05:44:42 -0600 |
| commit | e5f9f3b47a20b684458e7e1df5297d51c6f1a4cf (patch) | |
| tree | 159203abcc7bd21f9720db828fefcfe7b1be2ba6 /scripts/export_github_metadata.py | |
| parent | d367675c705c758f731ae9eb603839a4ebb2283c (diff) | |
leonida-formats: table-driven BC7 index residuals and packing (D3D12-FORMATS-BC7-POST-LUTS)
The BC7 block loop of the BCPack decoder took 100-155 ns a block on top
of the rANS lanes: every index residual was rebuilt bit by bit (two
4-iteration folds per byte), each index went through an add_index with
per-element branches, endpoint residuals were done a column at a time and
bc7_pack made about 45 Bits::put calls on a u128.
- nibbles() reads a 256-entry table (also used by BC6H).
- The sixteen indices of a set are added to the reference's in one pass
with the shifts hoisted out of the loop (bc7_indices).
- Endpoint residuals of a row go through one multiply-by-precision per
column instead of a masked shift per column.
- bc7_pack puts each channel's endpoints, the p-bits and each index set
with one put, taking an anchor's top bit out of the fixed-width fields
afterwards.
Output is unchanged: a copy of the previous block loop is kept in the
tests as the reference, and bc7_blocks_match_the_reference compares the
two byte for byte on the shipped tables and on tables with arbitrary
control words, dictionaries and reference widths (history wrapping), and
on the error of an unused control code.
AI-assisted: Claude Sonnet 5.5
Co-authored-by: Cursor <cursoragent@cursor.com>
Diffstat (limited to 'scripts/export_github_metadata.py')
0 files changed, 0 insertions, 0 deletions