dds_png: decode DXGI R16G16B16A16_SNORM previews #2158

Closed
ZroIsHere wants to merge 0 commits from upstream-pr/2158 into main
ZroIsHere commented 2026-11-26 00:26:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ZroIsHere on 2026-11-26T00:26:43Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5501621121 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2158). Originally posted by [ZroIsHere](https://github.com/ZroIsHere) on 2026-11-26T00:26:43Z. --- 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
real-rusher commented 2026-11-26 10:12:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by real-rusher on 2026-11-26T10:12:46Z.


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)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7189058972 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2158#issuecomment-7189058972). Originally posted by [real-rusher](https://github.com/real-rusher) on 2026-11-26T10:12:46Z. --- 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)
aslan2142 commented 2026-11-26 18:28:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-26T18:28:56Z.


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)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7200512215 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2158#issuecomment-7200512215). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-26T18:28:56Z. --- 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

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2158
No description provided.