Repository navigation
Add HDR perceptual channel weighting to improve IQ - #759
Merged
Merged
Conversation
solidpixel
force-pushed
the
opt-hdr-channel-weighting
branch
from
November 12, 2026 13:44
be217c2 to
461bb5b
Compare
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.
Only update records in reference CSVs when PSNR changes.
solidpixel
force-pushed
the
opt-hdr-channel-weighting
branch
from
November 12, 2026 17:15
461bb5b to
85b74cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!