dds_png: decode DXGI R16G16B16A16_SNORM previews #2158

Closed
github-bot wants to merge 0 commits from github-bot/gh-2158 into main AGit
Owner

@⁠ZroIsHere on GitHub · 2026-11-26 00:26 UTC · original
ZroIsHere:codex/dds-rgba16-snorm → main · +41 −1 · 2 files · 1 commits · closed without merging

Claimed: DDS-RGBA16-SNORM

What and why

Add DXGI format 13 (R16G16B16A16_SNORM) to the DDS preview decoder. Map signed normalized channels to RGBA8, treating -32768 and -32767 as -1.0 and preserving padded-row and truncation checks. Synthetic cases cover signed endpoints, zero, row padding and truncated payloads.

Tested

Not run in this change. The regression cases are synthetic and use no game data.

GPUs tested: n/a

AI-assisted: yes

**@⁠ZroIsHere** on GitHub · 2026-11-26 00:26 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2158) `ZroIsHere:codex/dds-rgba16-snorm` → `main` · +41 −1 · 2 files · 1 commits · closed without merging Claimed: DDS-RGBA16-SNORM ### What and why Add DXGI format 13 (`R16G16B16A16_SNORM`) to the DDS preview decoder. Map signed normalized channels to RGBA8, treating -32768 and -32767 as -1.0 and preserving padded-row and truncation checks. Synthetic cases cover signed endpoints, zero, row padding and truncated payloads. ### Tested Not run in this change. The regression cases are synthetic and use no game data. GPUs tested: n/a AI-assisted: yes
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:20:34 +00:00
Author
Owner

@⁠real-rusher on GitHub · 2026-11-26 10:12 UTC · original

Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly into main. With this PR, python -I tests/test_dds_png_dx10.py: 7 tests OK. The PR's test file against main's tools/dds_png.py: 2 errors, so the new tests fail on main and pass with the change. compileall clean.

Note for review: it conflicts with #2157 (tools/dds_png.py, tests/test_dds_png_dx10.py) and with #2218 (tools/dds_png.py), which add formats to the same tables, so whichever lands later needs a rebase.

AI-assisted: yes (Claude Code)

**@⁠real-rusher** on GitHub · 2026-11-26 10:12 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2158#issuecomment-7189058972) Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly into main. With this PR, python -I tests/test_dds_png_dx10.py: 7 tests OK. The PR's test file against main's tools/dds_png.py: 2 errors, so the new tests fail on main and pass with the change. compileall clean. Note for review: it conflicts with #2157 (tools/dds_png.py, tests/test_dds_png_dx10.py) and with #2218 (tools/dds_png.py), which add formats to the same tables, so whichever lands later needs a rebase. AI-assisted: yes (Claude Code)
github-bot closed this pull request 2026-11-26 17:59:42 +00:00
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-26 18:28 UTC · original

Merged through the integration PR #2394 (DDS preview formats batch), as head c4439f583, with a merge commit, so your commits stay yours.

  • Your decoder and both tests are unchanged.
  • The docstrings were merged into one format list.

Thanks @⁠ZroIsHere, and thanks to real-rusher for the check.

AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)

**@⁠aslan2142** on GitHub · 2026-11-26 18:28 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2158#issuecomment-7200512215) Merged through the integration PR #2394 (DDS preview formats batch), as head `c4439f583`, with a merge commit, so your commits stay yours. - Your decoder and both tests are unchanged. - The docstrings were merged into one format list. Thanks @⁠ZroIsHere, and thanks to real-rusher for the check. AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.