Skip to content

Add HDR perceptual channel weighting to improve IQ - #759

Merged
solidpixel merged 4 commits into
mainfrom
opt-hdr-channel-weighting
Nov 12, 2026
Merged

solidpixel merged 4 commits into
mainfrom
opt-hdr-channel-weighting

Conversation

@solidpixel

@solidpixel solidpixel commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

More work on #364 to improve our HDR image quality. Currently this includes two changes that can be merged independently:

Image quality differences are expected with these changes, including PSNR regressions because perceptual error != PSNR.
This is not a full fix for all the HDR quality issues, and we still get a lot of block artifacts, but it's a good start and a lot better than 5.7!

@solidpixel
solidpixel force-pushed the opt-hdr-channel-weighting branch from be217c2 to 461bb5b Compare November 12, 2026 13:44
Apply brightness-dependent RGB channel weights to HDR blocks when
perceptual mode is enabled, in addition to existing global color-based
weighting. The search operates in ASTC's approximately logarithmic LNS
space, where errors in dim channels can have excessive influence relative
to their visible contribution.

Estimate each channel's geometric mean brightness by converting its mean
LNS value back to linear light. Normalize these estimates by the brightest
RGB channel, retain a minimum weight of 1%, and multiply by the configured
channel weights. Keep the alpha multiplier at one. This approximates
display-space error and gives brighter channels more influence during
encoding while retaining a minimum contribution from dim channels.

Apply the same weighting to every block size in both HDR profiles. The
weights are computed once per block and are independent of the exposure
range used for CLI quality reporting.
@solidpixel solidpixel changed the title Opt hdr channel weighting Add HDR perceptual channel weighting to improve IQ Nov 12, 2026
Only update records in reference CSVs when PSNR changes.
@solidpixel
solidpixel force-pushed the opt-hdr-channel-weighting branch from 461bb5b to 85b74cb Compare November 12, 2026 17:15
@solidpixel
solidpixel merged commit baa27b5 into main Nov 12, 2026
21 checks passed
@solidpixel
solidpixel deleted the opt-hdr-channel-weighting branch November 12, 2026 18:22
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.

1 participant