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

No ktx tool writes KTXwriterScParams metadata. #758

Closed
MarkCallow opened this issue Aug 28, 2023 · 2 comments · Fixed by #779
Closed

No ktx tool writes KTXwriterScParams metadata. #758

MarkCallow opened this issue Aug 28, 2023 · 2 comments · Fixed by #779

Comments

@MarkCallow
Copy link
Collaborator

I've only just noticed this. Something else I missed during project review.

@aqnuep I don't expect you do fix this but please give me a clue as to how to capture the relevant options (names and values) to a std::string in cxxopts to become the value of KTXwriterScParams. The options to be captured are those in compress_utils.h, encode_utils.h and the ASTC options in ktx create.

The information is incredibly useful when looking at an existing .ktx2 file to see exactly how it was compressed.

@aqnuep
Copy link
Collaborator

aqnuep commented Aug 28, 2023

Hi @MarkCallow, what you suggest makes some sense, and something that would not be difficult to add.

However, section 5.6 of the spec defining KTXwriterScParams says the following:

KTX file writers may, and are strongly encouraged to, identify any
non-default Basis Universal encoding and supercompression options
specified when the file is created by including a value with the key

This parameter is supposed to only store super-compression parameters (BasisU, Zstd, Zlib), but ASTC is not a super-compression, hence I'm not sure whether it would make a lot of sense to include its parameters there. Maybe it's worth clarifying the spec if this attribute is meant to capture all sorts of compression/encoding related parameters.

@MarkCallow
Copy link
Collaborator Author

I will clarify the spec. That was written before the ASTC encoder was added and the metadata originally added before UASTC hence its now rather inappropriate name. Supporting UASTC was rectified by amending the original language to "Basis Universal".

The intent when I came up with the idea, and the intent today, is to capture information about encoding that can not be determined from examining the header and format information. I was fed up trying to create meaningful and short file names to indicate the information.

MarkCallow pushed a commit that referenced this issue Oct 5, 2023
Fixes #758.

- Remove unneeded astc-mode option from `ktx create`.

Depends on the CTS PR
KhronosGroup/KTX-Software-CTS#5.
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 a pull request may close this issue.

2 participants