-
Notifications
You must be signed in to change notification settings - Fork 229
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
WIP: Encode astc support #952
base: main
Are you sure you want to change the base?
WIP: Encode astc support #952
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @wasimabbas-arm. Can you now get metrics for ASTC compressed files?
You will need to add tests of the new functionality to the tools CTS and possibly need to update some existing tests.
|
||
ktx_error_code_e ec = KTX_SUCCESS; | ||
// Decode the encoded texture to observe the compression losses | ||
ec = ktxTexture2_TranscodeBasis(texture, KTX_TTF_RGBA32, 0); | ||
if (isFormatAstc((VkFormat)texture->vkFormat)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check the colorModel in the DFD to see if it is ASTC rather than the switch statement in isFormatAstc.
@@ -807,3 +890,232 @@ ktxTexture2_CompressAstc(ktxTexture2* This, ktx_uint32_t quality) { | |||
|
|||
return ktxTexture2_CompressAstcEx(This, ¶ms); | |||
} | |||
|
|||
struct decompression_workload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like having the decoder in a file called astc_encode.cpp
. I know we talked about this before but I don't recall the answer to "is there a lot of code in this file shared between encode and decode?" If not then I'd prefer the decoder in a separate file. If there is then consider renaming the file to astc_codec.cpp
.
Updated version of #810.
Since #810 was adding a separate tool. Its easier to start another cleaner PR.
This PR has:
Commit to add --format option and make it exclusive with --codec
Add ASTC support to encode