BC3/BC4/BC5 BCPack: 44 preset slots fitted on mip consistency #352

Manually merged
github merged 1 commit from gh-pr/352/head into gh-pr/352/base 2026-11-26 20:29:45 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-26 04:24 UTC · original
holdmysocks:bcpack-bc345-presets → master · +44 −44 · 2 files · 1 commits · merged 2026-11-26 04:43 UTC

Refits preset window slots for the BC3, BC4 and BC5 BCPack decoders, using the same mip-consistency fit as the BC1 and BC6H tables: a decoded block of mip m should match the pixels of mip m+1 it covers.

  • BC3: 1 slot (226)
  • BC4: 20 slots
  • BC5: 23 slots

A slot is kept only where the fit gains on both even and odd chunks. A check over all textures found one regression above 1 dB, a BC5 texture whose reference mip roots mostly at slot 222 (35.4 to 29.2 dB), so slot 222 keeps its old value.

Across all textures, the counts under 20 dB and under 25 dB are unchanged for all three formats. 19 of 40 BC4 BCPack textures gain more than 1 dB, and none lose that much.

Only the two table files change. cargo test -p sixng-core -- bc3pack bc45pack passes.

**@⁠holdmysocks** on GitHub · 2026-11-26 04:24 UTC · [original](https://github.com/holdmysocks/SixNG/pull/352) `holdmysocks:bcpack-bc345-presets` → `master` · +44 −44 · 2 files · 1 commits · merged 2026-11-26 04:43 UTC Refits preset window slots for the BC3, BC4 and BC5 BCPack decoders, using the same mip-consistency fit as the BC1 and BC6H tables: a decoded block of mip m should match the pixels of mip m+1 it covers. - BC3: 1 slot (226) - BC4: 20 slots - BC5: 23 slots A slot is kept only where the fit gains on both even and odd chunks. A check over all textures found one regression above 1 dB, a BC5 texture whose reference mip roots mostly at slot 222 (35.4 to 29.2 dB), so slot 222 keeps its old value. Across all textures, the counts under 20 dB and under 25 dB are unchanged for all three formats. 19 of 40 BC4 BCPack textures gain more than 1 dB, and none lose that much. Only the two table files change. `cargo test -p sixng-core -- bc3pack bc45pack` passes.
Preset slots are refitted so that a decoded block of mip m matches the
pixels of mip m+1 it covers. BC3 changes 1 slot (226), BC4 changes 20
and BC5 changes 23. A slot is kept only where the fit gains on both even
and odd chunks and a check over all textures shows no regression above
1 dB traced to it. BC5 slot 222 was dropped by that check.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:29:43 +00:00
github manually merged commit c95000043c into gh-pr/352/base 2026-11-26 20:29:45 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.