Adaptive Scalable Texture Compression (ASTC) is an advanced lossy texture compression format for the OpenGL ES and Vulkan graphics APIs. The ASTC Encoder "astcenc" compressor is our texture compressor for this format, available as an open-source project on GitHub.
In the summer of 2021, I wrote a blog about the recent astcenc 3.1 release highlighting the significant performance improvement compared to the original 1.x series. When this release went live, I announced on our engineering team Slack channel that “I think it’s finished!”
Well, here we are 11 releases later and I am very happy to announce the release of astcenc 4.4. And yes, I do get reminded of that Slack comment every time we have made a release in the last 18 months.
For most users, the main reason to upgrade to the latest compressor is better compression performance. We have continued to find optimizations that either improve the performance of the core algorithm or reduce the amount of the state space that it tests.
The latest build is between 2 and 3 times faster than the 3.1 release for most images, giving developers a significant productivity improvement. It is particularly nice that -thorough compression is faster than the 1.7 release -fast compression, making it practical to use the high-quality settings in real-world workflows. The test set used includes LDR and HDR photographic images, as well as game textures for color, masks, and normal maps.
-thorough
-fast
The one exception to this performance gain is the -fastest compression setting. Images using this compression quality were not always usable, so we have spent the gained performance to increase the amount of search space covered. Image quality improves by up to 2dB PSNR, with a significant reduction in block artifacts, but the average performance remains similar to the 3.1 release.
-fastest
The improvements to date make the latest compressor between 20 and 50 times faster than the 1.7 compressor we started optimizing back in 2019. The great news for mobile is that the 6x6 block size (3.56bpp), which is the most commonly used by mobile applications, sees the largest improvements.
One of the most powerful tools I use when optimizing astcenc is to alter the trade-off between image quality and compression performance. The original 1.x series compressor was very slow, but achieved great image quality, because it was searching and refining so much of the search space. Many optimizations in the 2.x and 3.x releases gained performance by removing search passes and tuning heuristics that cost more than the gain in quality justified. However, this approach does cause a slow decrease in image quality that cannot always be mitigated by adjusting tuning elsewhere. One the goals for the 4.x series has been to try to regain some of the quality losses caused by earlier optimizations.
The good news is that we found improvements, particularly for the high bitrate encodings using 4x4 blocks (8bpp). For this block size, the image quality now exceeds the 1.x series compressor by up to 0.25dB PSNR, despite the losses incurred by the optimization work. The quality gains are smaller for the larger block sizes. We have recovered around 25% of the lost quality for 6x6 and 8x8 blocks, but remain slightly below the 1.x series by an average of 0.1dB.
In addition to the general improvements that help everywhere, we have targeted specific improvements at the heuristics used by the XY two component normal map compression. Earlier releases of astcenc were prone to block artifacts for normal maps. We discovered that the channel weighting heuristic that was used for normal maps was actually making this problem worse. We have removed this misfiring heuristic, and added an improved partition selection algorithm that accounts for the biased error weighting caused by the XXXY channel replication. When combined with the faster -thorough search, these improvements enable you to use a 6x6 block size (3.56bpp) for normal maps, lowering application bandwidth and memory footprint.
The two images below show some of the improvements in block artifacts seen in astcenc 4.4 compared to the 3.1 release. Both test images images are compressed using -medium -normal compression and a 5x5 block size.
-medium
-normal
We continue to add features and fixes requested by developers to make the compressor easier to use, integrate, or deploy. There have been no major new features added since the 3.1 release, but there are several smaller features that make your life easier:
-verythorough
-exhaustive
Full change logs can be found on the project GitHub pages:
We are very proud of the improvements we have made to the compressor, and hope you find them useful. You can find source code and binaries for the latest astcenc release on the project GitHub page.
I think it’s finished.
[CTAToken URL="https://github.com/ARM-software/astc-encoder" target="_blank" text="Download astcenc 4.4" class ="green"]