A totally unfinished open-source ASTC texture compression/decompression tool. You almost certainly don't want to use this.
- Open source (MIT license), free for all commercial and non-commercial use.
- Decompression from ASTC to TGA.
- LDR profile support (minus sRGB).
- Test case generator, to compare behaviour against other ASTC decompression implementations.
- Bit-exact output compared to ARM's ASTC Evaluation Codec, for all the test cases.
- Compression support.
- sRGB support.
- HDR profile support.
- 3D texture support.
- Support for more useful input and output file formats.
- Performance.
- Portability to non-Linux OSes.
ARM's ASTC Evaluation Codec is probably the best tool to use when possible, and comes with source code. Unfortunately its license is incompatible with the Open Source Definition, so it cannot be embedded in open source projects.
Note that ARM's license prohibits the use of their software for developing hardware. OASTC's copyright license does not prevent that; but ARM probably holds patents on many parts of ASTC, and probably cares about hardware implementations. ASTC is royalty-free but there might be some up-front licensing cost. If you want to develop hardware, talk to ARM or Khronos first.
NVIDIA's NVASTC is a GPU-accelerated encoder.
mkdir build
cd build
cmake ..
make -j8
make test
./oastc_dec -i example.astc -o example.tga
ASTC is a lossy texture compression algorithm. Its main goals are:
- Industry-wide support, especially in mobile GPUs, so developers can rely on one format across all the devices their application supports, instead of a fragmented set of compression formats across different vendors (PVRTC, S3TC, ETC2, etc).
- Same or better quality than existing formats, at the same bit-rate.
- Much greater flexibility of bit-rate (from 0.89bpp to 8bpp), so developers can choose the best quality/performance tradeoff for their particular use.
- Support for HDR and 3D textures.
ASTC defines three profiles:
- LDR Profile - only 2D images, and only LDR colours.
- HDR Profile - only 2D images, but both LDR and HDR colours.
- Full Profile - both 2D and 3D images, and both LDR and HDR colours.
The Android Extension Pack requires ASTC (LDR profile). This is a recommended set of functionality for Android Lollipop devices.
OpenGL ES 3.2 includes AEP, so it also requires ASTC (LDR profile).
Most interest in ASTC has come from the mobile space, but Intel's Skylake processors are the first desktop chips to include ASTC.
Here is a soon-to-be-outdated list of GPU designs currently known to include ASTC support:
-
ARM:
-
Imagination:
- PowerVR Series6XT - LDR and HDR, "optional" (some vendors might remove it from their chips).
- PowerVR Series7XE, PowerVR Series7XT - LDR and HDR.
-
Qualcomm:
- Adreno 4xx Series - LDR.
-
NVIDIA:
-
Intel:
- Cherry Trail (Gen8 mobile) - LDR.
- Skylake (Gen9 desktop) - LDR and HDR.
-
Vivante:
- GC7000 and others - apparently LDR.
- OpenGL ES:
- GL ES 3.2 specification (LDR profile)
- GL_KHR_texture_compression_astc_hdr (LDR and HDR profiles)
- GL_OES_texture_compression_astc (LDR, HDR, full profiles)
- OpenGL:
- GL_KHR_texture_compression_astc_hdr (LDR and HDR profiles)
- Adaptive Scalable Texture Compression white paper, Stacy Smith.
- Adaptive Scalable Texture Compression paper, High Performance Graphics 2012, Nystad et al.
- Adaptive Scalable Texture Compression presentation, High Performance Graphics 2012, Nystad et al.