Conversation
Signed-off-by: Scott Dyer <sdyer@oscars.org>
scottdyer
force-pushed
the
refactor/tonescale
branch
from
August 28, 2026 22:21
89ca80a to
233edc2
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.
Encapsulates reference luminance scaling directly within
tonescale_inv()and updates call accordingly inLib.Academy.OutputTransform.Rationale$\text{cd/m}^2$ ). The tonescale math relies on luminance normalized 0-1 relative to the reference luminance of 100 $\text{cd/m}^2$ .
The function comment for
tonescale_inv()inLib.Academy.Tonescale.ctlstates that parameterYaccepts luminance in absolute units (Previously, the calling function in
Lib.Academy.OutputTransform.ctl(e.g., insidetonemap_and_compress_inv()) manually performedluminance / ref_luminanceprior to invokingtonescale_inv(). While the OutputTransform is functionally correct, handling the scaling in the call meant thattonescale_inv()was incorrect when called independently according to its documented interface.Changes
aces-core/lib/Lib.Academy.Tonescale.ctl: ChangedYtoY / params.n_ron first line oftonescale_inv(), allowing it to follow its documented scaling expectations and work as a standalone inverse of thetonescale_fwd()functionaces-core/lib/Lib.Academy.OutputTransform.ctl: Removed the now redundant pre-scaling (luminance / ref_luminance) at the call site to prevent double-scaling.Impact
There should be no change to overall mathematical or pixel-level output across the inverse Output Transform pathway.
The refactor just aligns internal caller logic and independent usage to be consistent with the function signature.
Fixes #160
PR Description was
Assisted-by: Gemini / 3.6 Flash