-
Notifications
You must be signed in to change notification settings - Fork 239
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
toktx: Zstd deflation failed; KTX error: Out of memory. #512
Comments
This is happening because the "deflated" image is larger than the UASTC image. Investigation into why is necessary. |
I plan to consult the zstd experts but it looks to me as though the nature of the data in this image means it does not compress well with lossless techniques. Running zstd, with default compression level of 3, on the .png file results in a larger file. Of course that already has internal Deflate compression which makes it tougher for any subsequent compression steps. You can try increasing the zstd compression level, libktx should probably handle this case by aborting the zstd compression and not changing the input |
And fix asserts in DeflateZstd so they fire as intended. Fixes #512.
The fix in PR #527 ensures there is enough space for the output so there will no longer be an out of memory error. Using the default compression level, 3, and no RDO the result is a handful of bytes larger than the original. To make it smaller you can use RDO, as suggested in an earlier comment or you can raise the zstd compression level. I think this image is a struggle for zstd due to the random nature of the pattern. |
And fix asserts in DeflateZstd so they fire as intended. Fixes KhronosGroup#512.
And fix asserts in DeflateZstd so they fire as intended. Fixes KhronosGroup#512.
And fix asserts in DeflateZstd so they fire as intended. Fixes KhronosGroup#512.
And fix asserts in DeflateZstd so they fire as intended. Fixes KhronosGroup#512.
And fix asserts in DeflateZstd so they fire as intended. Fixes KhronosGroup#512.
when I try toktx --uastc 4 --zcmp 3 N.ktx2 N.png, it fail with message "toktx: Zstd deflation failed; KTX error: Out of memory."
if i remove --zcmp 3 option it will be ok.
I tried many images all with the same format (1024*1024 rgba png), just one image has this problem.
I'm use OSX Monterey 12.0.1, toktx is 4.0.0~6
the image is attached below.
.
The text was updated successfully, but these errors were encountered: