Skip to content

Conversation

@ram-mohan
Copy link
Contributor

  • luminance function for p3 gamut is using weights of dci p3 instead of display p3. this is corrected. accordingly the gamut conversions involving display p3 are updated.
  • increased precision of some constants used in csc

Test: ./ultrahdr_unit_test

@ram-mohan ram-mohan changed the title fix primaries using for display p3 gamut fix primaries used for display p3 gamut Nov 22, 2024
Copy link
Collaborator

@DichenZhang1 DichenZhang1 left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@ram-mohan ram-mohan force-pushed the p3primaries branch 2 times, most recently from 94ada70 to c44bd39 Compare November 26, 2024 19:31
- luminance function of p3 gamut is using weights of dci p3 instead of
  display p3. this is corrected. accordingly the gamut conversions
  involving display p3 are updated.
- increased precision of some constants used in csc

Test: ./ultrahdr_unit_test
Change-Id: Iec77b3d24adb7ad887a8f53d805eecc0c0160f28
return {{{1.34369f * e.r + -0.28223f * e.g + -0.06135f * e.b,
-0.06533f * e.r + 1.07580f * e.g + -0.01051f * e.b,
0.00283f * e.r + -0.01957f * e.g + 1.01679f * e.b}}};
return {{{1.343578f * e.r + -0.282179f * e.g + -0.061399f * e.b,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you double check if this matrix is correct?

I use
[2.4934969119,−0.9313836179,−0.4027107845; −0.8294889696,1.7626640603,0.0236246858; 0.0358458302,−0.0761723893,0.9568845240;] x [0.636958,0.144617,0.168881; 0.262700,0.677998,0.059302; 0.000000,0.028073,1.060985;]

and got this: (maybe I am wrong)

[ 1.33736487 -0.33736476 -7.08830856e-07 ] [ 0.02128283 0.97871719 -1.14552781e-07 ] [ 0.00418868 0.03418871 0.99581128 ]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the matrix multiplication seems to be wrong. The individual matrices are same as the ones i am using.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK I re-did the math with gemini and this time the result matches with yours. My previous result with chatGPT was wrong. Sorry for the confusion.

return {{{1.34369f * e.r + -0.28223f * e.g + -0.06135f * e.b,
-0.06533f * e.r + 1.07580f * e.g + -0.01051f * e.b,
0.00283f * e.r + -0.01957f * e.g + 1.01679f * e.b}}};
return {{{1.343578f * e.r + -0.282179f * e.g + -0.061399f * e.b,
Copy link
Collaborator

Choose a reason for hiding this comment

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

OK I re-did the math with gemini and this time the result matches with yours. My previous result with chatGPT was wrong. Sorry for the confusion.

@DichenZhang1 DichenZhang1 merged commit 2b73304 into google:main Dec 3, 2024
20 checks passed
@ram-mohan ram-mohan deleted the p3primaries branch December 3, 2024 19:55
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.

2 participants