Skip to content

philiptaylor/oastc

Repository files navigation

OASTC

A totally unfinished open-source ASTC texture compression/decompression tool. You almost certainly don't want to use this.

Features

  • 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.

Missing features

  • 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.

Alternatives

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.

How to build

mkdir build
cd build
cmake ..
make -j8
make test

How to run

./oastc_dec -i example.astc -o example.tga

Introduction to ASTC

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 hardware support

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:

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published