Skip to content

Add limitations to DFD use from issue #64. #75

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

Merged
merged 7 commits into from
May 30, 2019

Conversation

MarkCallow
Copy link
Contributor

No description provided.

@MarkCallow
Copy link
Contributor Author

@lexaknyazev, please review the latest version.

ktxspec.adoc Outdated
5.6 or its successors, currently `KDF_DF_MODEL_BC1A` to
`KDF_DF_MODEL_PVRTC2`.
* `color_primaries` may be any of the available values since conversion
to a display's primaries is relatively straightforward.
Copy link
Member

Choose a reason for hiding this comment

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

It is "relatively straightforward" only when the white point is the same. Otherwise it's a bit more complicated (from that NVIDIA guide):

In addition to simply changing the color primaries, it may be necessary to adjust the white point of the image as well. The standard way of doing this is through a Chromatic Adaptation Transform (CAT). The common CAT solutions are the Bradford or Von Kries transforms. These convert the colors to an LMS color space, then scale by destination white / source white (also in LMS space), and finally convert back from LMS space. As the transform to LMS space in both Bradford and Von Kries is simply a 3x3 matrix multiply, the entire CAT can be collapsed into a single 3x3 multiply, just like the transform of primaries.

Do matrices provided in the DFD spec accommodate for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It boils down to a single matrix multiply, which of course the hardware is very good at doing, that converts both primaries and white point. This single matrix multiply is what I mean by relatively straightforward. Can you propose some alternative language. I certainly don't want to get into details of color space conversion here.

I'll check the matrices in the DFD spec. In any case the color spaces are all standard which proper specifications and ICC profiles which will provide the necessary information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the matrices in KDFS spec. are for von Kries transform but, given the nature of the KDFS spec., I think the chapter 14 introduction is explanatory. I do not think that KTX2 needs to specify what CAT should be used. If glTF starts to allow different primaries it may want to mandate a CAT. HTML5 should probably specify the CAT to be used by browsers when converting from sRGB/BT.709 primaries to the display primaries.

I'll change the language to something along the lines of

... conversion of the primaries and white point to those of a display's can be done by a 3x3 matrix multiply.

Copy link
Member

Choose a reason for hiding this comment

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

HTML5 should probably specify the CAT...

If only web standards were so specific...

Rendering of HTML Images with embedded ICC profiles is up to implementation, Canvas API should someday consistently support rendering to float16 surfaces (IIUC, with extended sRGB).

I'm fine with the latest proposed language.

@MarkCallow MarkCallow merged commit c6ea8aa into KhronosGroup:master May 30, 2019
@MarkCallow MarkCallow deleted the issue64 branch May 30, 2019 17:32
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