Skip to content

[spaces/rec2020] Use gamma 2.40 for display-referred rec2020 #669#672

Merged
svgeesus merged 2 commits intomainfrom
bt2020-display-referred
Sep 3, 2025
Merged

[spaces/rec2020] Use gamma 2.40 for display-referred rec2020 #669#672
svgeesus merged 2 commits intomainfrom
bt2020-display-referred

Conversation

@svgeesus
Copy link
Copy Markdown
Member

@svgeesus svgeesus commented Sep 3, 2025

rename previous implementation as scene-referred --rec2020-oetf so people can still use the older implementation if they want

See

…previous implementation as scene-referred --rec2020-oetf #669
@netlify
Copy link
Copy Markdown

netlify bot commented Sep 3, 2025

Deploy Preview for colorjs ready!

Name Link
🔨 Latest commit 7254de4
🔍 Latest deploy log https://app.netlify.com/projects/colorjs/deploys/68b86b8951eb2500085a4170
😎 Deploy Preview https://deploy-preview-672--colorjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@svgeesus
Copy link
Copy Markdown
Member Author

svgeesus commented Sep 3, 2025

Build gives a bunch of type linting errors completely unrelated to the files I changed.
Adding fixes to those should not be done in this PR, and should be done by those who wrote them and understand the types involved.

@svgeesus svgeesus linked an issue Sep 3, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@facelessuser facelessuser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as implementation, everything looks fine. But related Rec. 2020 tests would need to be updated as some are failing:

  • Rec. 2020 <-> Linear Rec. 2020
  • APCA contrast, sRGB gamut in other color spaces

@facelessuser
Copy link
Copy Markdown
Collaborator

As a side note, I don't know when it happened, but it seems gamut mapping tests are not working: https://colorjs.io/test/

I'm thinking there may be some infinite recursion or something as it seems we blow the call stack:

Uncaught RangeError: Maximum call stack size exceeded
    at custom (util.js:75:11)
    at callee (objects.js:225:15)
    at Module.stringify (objects.js:212:9)
    at stringify (util.js:151:17)
    at output (util.js:74:9)
    at Array.map (<anonymous>)
    at custom (util.js:77:16)
    at callee (objects.js:225:15)
    at Module.stringify (objects.js:212:9)
    at stringify (util.js:151:17)

@facelessuser
Copy link
Copy Markdown
Collaborator

I don't see anything obviously wrong with gamut mapping or stringifying the output, so I suspect gamut mapping tests (and a few others) are broken due to calling some special htest check functions. This isn't an area I'm familiar with, but I guess we should open a separate issue to figure out what's going wrong there.

@svgeesus
Copy link
Copy Markdown
Member Author

svgeesus commented Sep 3, 2025

But related Rec. 2020 tests would need to be updated as some are failing:

Agreed, I will fix those

@svgeesus
Copy link
Copy Markdown
Member Author

svgeesus commented Sep 3, 2025

One reason so few rec2020 tests were failing is that an astonishing number use colors with either 0 or 1 coordinates which are insensitive to the actual transfer function.

@facelessuser
Copy link
Copy Markdown
Collaborator

LGTM

@svgeesus svgeesus merged commit f02ce7f into main Sep 3, 2025
4 of 5 checks passed
@svgeesus svgeesus deleted the bt2020-display-referred branch September 3, 2025 16:38
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.

Deploying changes to color(rec2020 ...)

2 participants