Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
  • Groups
    • Research Collaboration and Enablement
    • DesignStart
    • Education Hub
    • Innovation
    • Open Source Software and Platforms
  • Forums
    • AI and ML forum
    • Architectures and Processors forum
    • Arm Development Platforms forum
    • Arm Development Studio forum
    • Arm Virtual Hardware forum
    • Automotive forum
    • Compilers and Libraries forum
    • Graphics, Gaming, and VR forum
    • High Performance Computing (HPC) forum
    • Infrastructure Solutions forum
    • Internet of Things (IoT) forum
    • Keil forum
    • Morello Forum
    • Operating Systems forum
    • SoC Design and Simulation forum
    • 中文社区论区
  • Blogs
    • AI and ML blog
    • Announcements
    • Architectures and Processors blog
    • Automotive blog
    • Graphics, Gaming, and VR blog
    • High Performance Computing (HPC) blog
    • Infrastructure Solutions blog
    • Innovation blog
    • Internet of Things (IoT) blog
    • Operating Systems blog
    • Research Articles
    • SoC Design and Simulation blog
    • Tools, Software and IDEs blog
    • 中文社区博客
  • Support
    • Arm Support Services
    • Documentation
    • Downloads
    • Training
    • Arm Approved program
    • Arm Design Reviews
  • Community Help
  • More
  • Cancel
Arm Community blogs
Arm Community blogs
Graphics, Gaming, and VR blog Yet more ASTC compression
  • Blogs
  • Mentions
  • Sub-Groups
  • Tags
  • Jump...
  • Cancel
More blogs in Arm Community blogs
  • AI and ML blog

  • Announcements

  • Architectures and Processors blog

  • Automotive blog

  • Embedded blog

  • Graphics, Gaming, and VR blog

  • High Performance Computing (HPC) blog

  • Infrastructure Solutions blog

  • Internet of Things (IoT) blog

  • Operating Systems blog

  • SoC Design and Simulation blog

  • Tools, Software and IDEs blog

Tell us what you think
Tags
  • ASTC Evaluation Codec
  • Graphics and Gaming
Actions
  • RSS
  • More
  • Cancel
Related blog posts
Related forum threads

Yet more ASTC compression

Peter Harris
Peter Harris
April 24, 2023
5 minute read time.

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.

More performance

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.

 Performance scaling graphs

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. 

 Performance scaling graph

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.

More image quality

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. 

Normal map compression improvements in astcenc 4.4

Improvements in astcenc 4.4 normal map compression

More features

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:

  • We have refreshed the Adaptive Scalable Texture Compression Developer Guide. This means you can get up-to-date advice about how to get the best out of the format when using the astcenc compressor.
  • Support for building using the Visual Studio LLVM-based clang-cl.exe compiler has been added. Clang-cl is the recommended compiler for astcenc on Windows because the resulting binaries are 20% faster than using the traditional cl compiler.
  • Support for building the core codec as a shared library has been added.
  • The core codec stack use has been reduced, allowing deployment on devices with 128KB stack limits.
  • Build variants that support only a subset of block sizes have been added, reducing memory footprint and ROM size for embedded applications.
  • Build variants that support only the ASTC block modes that the compressor uses have been added, reducing memory footprint for embedded applications.
  • A new high-quality -verythorough mode, and a more exhaustive -exhaustive mode, have been added. These modes enable even deeper searches of the search space to find that extra bit of image quality for hard-to-compress images.
  • Non-invariant build variants are supported. This build target improves performance by up to 20% on x86-64 systems that support AVX2 and the FMA instruction set extensions. Non-invariant builds cause a small loss in image quality. Image output may also vary between builds on different CPU architectures and compilers.

Full change logs can be found on the project GitHub pages:

  • https://github.com/ARM-software/astc-encoder/blob/main/Docs/ChangeLog-3x.md
  • https://github.com/ARM-software/astc-encoder/blob/main/Docs/ChangeLog-4x.md

Summary

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.

Download astcenc 4.4

Anonymous
Graphics, Gaming, and VR blog
  • More speed with Arm Mobile Studio 2023.1

    Julie Gaskin
    Julie Gaskin
    What's new in Arm Mobile Studio? Here's a round-up of the latest improvements we've made to our free profiling tools for Android.
    • May 12, 2023
  • Yet more ASTC compression

    Peter Harris
    Peter Harris
    This blog explains the performance and quality benefits that developers can expect if they switch to the latest astcenc 4.4 compressor release.
    • April 24, 2023
  • Arm Immortalis-G715 Developer Overview

    Peter Harris
    Peter Harris
    The new Arm®︎ Immortalis™︎ -G715 GPU is now available in consumer devices. This blog explores what is new, and how developers can get the best performance out of it.
    • March 20, 2023