Skip to content

Fix tolerance handling for unnormalized formats#1166

Merged
MarkCallow merged 8 commits intomainfrom
fix_hdr_diff
May 7, 2026
Merged

Fix tolerance handling for unnormalized formats#1166
MarkCallow merged 8 commits intomainfrom
fix_hdr_diff

Conversation

@MarkCallow
Copy link
Copy Markdown
Collaborator

@MarkCallow MarkCallow commented May 6, 2026

The tolerance for unnormalized formats is now specified as a fraction of the minimum of the two values being compared, given as a value between 0 and 1. For normalized formats the tolerance is, as before, specified as the normalized value of the acceptable difference.

The PR also adds a comparison for 16-bit unorm values.

ViNeek and others added 8 commits May 6, 2026 20:44
when comparing unnormalized images.

Use asctenc_mathlib for float16_to_float.a

Replace isFormatAstc switch function with check of
DFD color model.

Add compareUnorm16.
* merge issues from rebase;
* use imageio::half_to_float conversion instead of astcenc's;
* interpret tolerance as a percentage of the min of the two values.
Restore the return/exit on failure.
Update test ref for modified tolerances.
@MarkCallow MarkCallow merged commit 4e0b328 into main May 7, 2026
41 checks passed
@MarkCallow MarkCallow deleted the fix_hdr_diff branch May 7, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants