Commit Graph

5 Commits

Author SHA1 Message Date
ab4102efee fix(dstorage): preserve signed BC6H SF16 targets and average full multi-level footprint
- Thread signed=(format == 96) into Bc6hCalibrator.add_pool_chunk so signed
  BC6H_SF16 reference targets clamp to [-32768, 32767] instead of [0, 65535]
  and _eval_w_ops sign-extends and unquantizes candidates in signed space.
- Average the full [x0, x1) x [y0, y1) quadrant footprint across multi-level
  downsamples in _make_multilevel_quads_getter (caching per-4x4-block sums),
  eliminating single-phase column/row aliasing at 4+ mip levels.
- Add DXGI 96 negative-endpoint and 4-level alternating-column BC7 regression
  tests in tests/test_dstorage_multilevel_fit.py.
2026-11-28 20:56:33 -08:00
b55056766e tests: eliminate wrap-around and strengthen precedence/decode checks in multilevel mip fit
- Keep secret_entry >= 192 with ref_count <= secret_entry across all synthetic
  BPTC streams so predictor distances never wrap mod 256 and main leaves
  unknown slots at zero rather than self-fitting wrapped blocks.
- Drive dual-slot BC6H and BC7 chunks (missing slot 240 + pre-populated slot
  241 with conflicting pool colors) so extend_missing precedence is genuinely
  exercised for both codecs.
- Assert fitted BC6H endpoint values, zero confirmed-bit masks, and per-block
  decoded RGBA / unquantized HDR pixels across both parent-downsample and
  child-upsample streams, and include codec mode in fit_distant_mips wanted keys.
2026-11-28 02:11:41 -08:00
4bc50fbd6d tests: drive build_dstorage_history.build in multilevel mip fit tests
Exercise the public history.build(...) pipeline end-to-end across all four
synthetic multi-level BPTC mip fitting tests so running the test file against
main reaches value assertions (4 AssertionErrors, 0 AttributeErrors) instead
of stopping on the missing fit_distant_mips helper.
2026-11-28 01:44:28 -08:00
801f8e7b7e Merge origin/main into fix/dstorage-multilevel-bcpack-fit
Run fit_distant_mips ahead of fit_decoded_neighbors so mixed-codec BC6H and BC7 streams fit directly against lossless raw/zlib mips across multi-level distances before iterative BCPack sibling decoding, eliminating all 10 remaining BC6H stream refusals on 1.0.2.1 (210 -> 226/256 endpoints, 249 -> 251/256 indices) and cutting fit_decoded_neighbors runtime by 46%.
2026-11-26 16:17:53 -08:00
16a95502a2 tools/dstorage: fit missing BPTC history slots across multi-level sibling mips
When a BC6H or BC7 stream still references an unfitted built-in predictor slot after adjacent-mip fitting, pair its mips with the closest raw or zlib mip on the same layer across multi-level mip distances before running the full-stream constraint pass. Existing adjacent-mip, array, and cubemap fits keep precedence.
2026-11-26 01:49:30 -08:00