731.astcenc_r
Image compression
731.astcenc_r is written by Peter Harris <Peter [dot] Harris[at]arm [dot] com> and many others from the ASTC encoder GitHub community: contributors
731.astcenc_r is based on the Adaptive Scalable Texture Compression (ASTC) Encoder, astc-encoder, which provides a command line tool for use of ASTC compression.
astcenc compresses image files into the Adaptive Scalable Texture Compression (ASTC) image format, a lossy compression format design for use in real-time graphics applications. It is a fully featured compressor implementation, supporting all of the compression profiles and block sizes specified by the ASTC format:
The compressor provides a flexible quality level, allowing users to trade off compressed image quality against compression performance. For ease of use, a number of quality presets are also provided. For advanced users the compressor provides many additional control options for fine tuning quality. In quality test mode, astcenc can also be used to decompress ASTC compressed images, and perform compression image quality analysis.
To compress an image using the ASTC format you must specify the color profile, the input file name, the output file name, the target block size, and the quality preset. For example, the ref input is an RGB PNG image using LDR linear color profile, 4x4 block size and fixed quality preset thorough:
-tl Images/Small/LDR-RGB/ldr-rgb-00.png ldr-rgb-00_4x4_thorough.png 4x4 -thorough -j 1 -repeats 1
In the command above, the -tl indicates a quality test (round-trips a single image through compression and decompression) using LDR linear color profile. The -j 1 indicates that only a single thread is used. The -repeats 1 indicates the number of times the compression should be performed.
Here is simple help from the command line.
Basic usage:
To compress an image use:
astcenc {-cl|-cs|-ch|-cH} <in> <out> <blockdim> <quality> [options]
e.g. using LDR profile, 8x6 blocks, and the thorough quality preset:
astcenc -cl kodim01.png kodim01.astc 8x6 -thorough
To decompress an image use:
astcenc {-dl|-ds|-dh|-dH} <in> <out>
e.g. using LDR profile:
astcenc -dl kodim01.astc kodim01.png
To perform a compression test, writing back the decompressed output, use:
astcenc {-tl|-ts|-th|-tH} <in> <out> <blockdim> <quality> [options]
e.g. using LDR profile, 8x6 blocks, and the thorough quality preset:
astcenc -tl kodim01.png kodim01-test.png 8x6 -thorough
The -*l options are used to configure the codec to support only the linear
LDR profile, preventing use of the HDR encoding features.
The -*s options are used to configure the codec to support only
the sRGB LDR profile, preventing use of the HDR encoding features. Input
texture data must be encoded in the sRGB colorspace for this option to
provide correct output results.
The -*h/-*H options are used to configure the codec to support the HDR ASTC
color profile. Textures compressed with this profile may fail to decompress
correctly on GPU hardware without HDR profile support. The -*h options
configure the compressor for HDR RGB components and an LDR alpha component.
The -*H options configure the compressor for HDR across all 4 components.
For more information, please see astcenc help.
astcenc is used in quality test mode. It round-trips a single image through compression and decompression. This operation mode will print error metrics suitable for either LDR and HDR images, allowing some assessment of the compression image quality.
As a result, output is composed of an ASCII text file containing PSNR (peak signal-to-noise ratio) quality metrics.
SPEC CPU validates the PSNR quality metrics to ensure the run is completed successfully.C++
The benchmark version is single-threaded.
No known issues.
731.astcenc_r was developed from the Adaptive Scalable Texture Compression Encoder at GitHub, release: 5.2, commit 2319d9c4. The public tarball can be found at 5.2.0.tar.gz.
The ASTC Encoder is available under the Apache License Version 2.0.
stb_image files are available under the MIT license.
File tinyexr.h embeds the 3-paragraph BSD license twice, noting both:
The images processed by the benchmark are from:
Copyright © 2026 Standard Performance Evaluation Corporation (SPEC®)