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, oetf and eotf functions.

Test: ./ultrahdr_unit_test

@ram-mohan
Copy link
Contributor Author

ram-mohan commented Aug 6, 2024

Does this change affects the entries of ICC box

@ram-mohan ram-mohan force-pushed the DispP3 branch 5 times, most recently from 096dabf to 9de27e7 Compare November 8, 2024 08:20
@ram-mohan ram-mohan force-pushed the DispP3 branch 7 times, most recently from 9456267 to 05163a6 Compare November 18, 2024 13:19
ram-mohan and others added 3 commits November 20, 2024 14:20
- 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, oetf and eotf
  functions.

fixes google#177

Test: ./ultrahdr_unit_test

Change-Id: Iec77b3d24adb7ad887a8f53d805eecc0c0160f28
icc tag does not signal matrix coefficients directly. They signal color
primaries. From these color primaries, one can derive the matrix
coefficients needed for yuv to rgb conversion using, equations 39-44 of
itu h273. In this process bradford chroma adaptation matrix also plays a
role. The current change does not do all this. Instead it does a look up
mapping of icc tag to color gamut. Successfull harvesting of matrix
coefficients from icc tags is dependent on the color gamut dictionary
maintained internally. For now, this is okish. If gamut map fails, we
will default to srgb color space as per iso 21496-1 sec c.4.4

Test: ./ultrahdr_unit_test

Change-Id: I41cb5013c5d29d5ebaa535a78e45a9b487a3c122
Test: ./ultrahdr_app

Co-authored-by: Vivek R Jadhav <vivek.jadhav@ittiam.com>
Change-Id: I0155a1dc043f3c3e0493e04e5a6eabe160756476
private:
static constexpr uint32_t kTrcTableSize = 65;
static constexpr uint32_t kGridSize = 17;
static constexpr uint32_t kGridSize = 11;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@ram-mohan ram-mohan Nov 21, 2024

Choose a reason for hiding this comment

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

Comment on lines +265 to +271
//#if (defined(UHDR_ENABLE_INTRINSICS) && (defined(__ARM_NEON__) || defined(__ARM_NEON)))
// UHDR_ERR_CHECK(
// convertYuv_neon(sdr_intent_yuv, sdr_intent_yuv->cg, (uhdr_color_gamut_t)UHDR_CG_BT_601));
//#else
// UHDR_ERR_CHECK(
// convertYuv(sdr_intent_yuv, sdr_intent_yuv->cg, (uhdr_color_gamut_t)UHDR_CG_BT_601));
//#endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe we intended to convert YUV. Is there any reason this was removed?

return status;
case UHDR_CG_DISPLAY_P3:
coeffs_ptr = &kYuvBt709ToBt601;
coeffs_ptr = &kYuvBt709ToDisplayP3;
Copy link
Collaborator

Choose a reason for hiding this comment

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

We intended to use BT601 YUV encoding here

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.

I suggest separating this change into two: changes before 10/29 to be the first one, and changes after 10/29 to be the second one. Thank you!

@ram-mohan ram-mohan closed this Nov 22, 2024
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