Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only apply white scaling if linear_scale_factor == 1.0 #144

Closed
wants to merge 1 commit into from

Conversation

nick-shaw
Copy link
Contributor

The scaling to fit peak white where the limiting and encoding white points do not match is not needed for DCDM encoding, since the necessary headroom is already provided by the 48/52.37 normalisation. A linear scale factor less than 1.0 seems to be a suitable way to identify that headroom is already being provided in the encoding. Without the changes in this PR, the DCDM Output Transforms will have white fitting scaling applied based on the difference between the limiting white and equal energy white, when no scaling is actually required.

@nick-shaw nick-shaw changed the base branch from dev to v2-dev-release June 12, 2024 17:02
@nick-shaw
Copy link
Contributor Author

If we decide that white fitting is not needed for HDR encodings, due to the headroom inherent in the 10,000 nits of ST.2084, a different mechanism to signal "don't apply white fitting" would be needed. Maybe it should be an explicit boolean parameter. It's not a problem with the current list, but if we add D60 sim HDR versions it will be.

@scottdyer
Copy link
Contributor

A bool has been added to determine if or if not to apply the white scaling 414b4bf

This allows the user to control when the white is or isn't applied, and is clearer and more robust than relying on a mismatch in the white point chromaticities.

For example, a DCDM P3D65 ODT already has white point fitting handled by a 48/52.37 scale factor, so wouldn't need that additional white scaling that would otherwise be applied because the encoding white and limiting white would differ.

This commit relies on a corresponding change to the Output Transform to add a "scale_white" bool and include it in the call to the display_encoding/decoding functions.

@scottdyer scottdyer closed this Jul 20, 2024
@remia
Copy link

remia commented Jul 20, 2024

@scottdyer I think there is a small typo on the encode function, it says if(!scale_white) but probably should be if(scale_white).

@scottdyer
Copy link
Contributor

Yes, thanks. I also caught this while running tests but haven't yet pushed the fix

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.

3 participants