From e303125eee271e4c3ecfc8a91a809f26ddbaf437 Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Mon, 19 Jan 2026 15:48:58 -0500 Subject: [PATCH 01/10] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index b69e0c0..21907eb 100644 --- a/README.md +++ b/README.md @@ -95,9 +95,7 @@ The ASTC LDR decoder, used in the transcoder module, supports the entire standar 7. **XUASTC LDR 4x4-12x12**: Supercompressed ASTC with weight grid DCT. Bitrate ranges between approximately .3-5.7bpp, depending on profile, block size, and weight grid DCT quality settings. Supports context-based range/arithmetic coding (for higher ratios), Zstd (for faster transcoding), or a hybrid profile using both. Supports all 14 ASTC block sizes. Transcodable to all other supported LDR texture formats. Certain common block sizes (4x4, 6x6, and 8x6) have specializations for particularly fast transcoding directly to BC7. -Supported ASTC configurations: L/LA/RGB/RGBA CEM's, base+scale or RGB/RGBA direct, base+ofs CEM's, Blue Contraction encoding, 1-3 subsets, all partition patterns, single or dual plane. - -Here is the [XUASTC LDR specification](https://github.com/BinomialLLC/basis_universal/wiki/XUASTC-LDR-Specification-v1.0). +Supported ASTC configurations: L/LA/RGB/RGBA CEM's, base+scale or RGB/RGBA direct, base+ofs CEM's, Blue Contraction encoding, 1-3 subsets, all partition patterns, single or dual plane. Here is the [XUASTC LDR specification](https://github.com/BinomialLLC/basis_universal/wiki/XUASTC-LDR-Specification-v1.0). Notes: - Modes #3 (UASTC HDR 4x4) and #4 (RDO ASTC HDR 6x6), and #6 (ASTC LDR 4x4-12x12) output 100% standard or plain ASTC texture data (with or without RDO), like any other ASTC encoder. The .KTX2 files are just plain textures. From 1d4a8811b1d6078238882d6d038001b2dbf85b24 Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Mon, 19 Jan 2026 16:32:10 -0500 Subject: [PATCH 02/10] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 21907eb..7bec5ad 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ The system supports seven modes (or codecs): 4. **ASTC HDR 6x6 (with or without RDO)**: Standard ASTC HDR 6x6 5. **UASTC HDR 6x6 Intermediate ("GPU Photo")**: Supercompressed ASTC HDR 6x6 6. **ASTC LDR 4x4-12x12 (all 14 standard ASTC block sizes)**: Standard ASTC LDR 4x4-12x12 -7. **XUASTC LDR 4x4-12x12 (all 14 standard ASTC block sizes)**: Supercompressed ASTC LDR 4x4-12x12, very high quality, utilizes weight grid ([DCT - Discrete Cosine Transform](https://grokipedia.com/page/Discrete_cosine_transform)) for very high compression ratios +7. **XUASTC LDR 4x4-12x12 (all 14 standard ASTC block sizes)**: Supercompressed ASTC LDR 4x4-12x12, very high quality, utilizes Weight Grid ([DCT - Discrete Cosine Transform](https://grokipedia.com/page/Discrete_cosine_transform)) for very high compression ratios The C/C++ encoder and transcoder libraries can be compiled to native code or WebAssembly (web or WASI), and all encoder/transcoder features can be accessed from JavaScript via a C++ wrapper library which optionally supports [WASM multithreading](https://web.dev/articles/webassembly-threads) for fast encoding in the browser. [WASM WASI](https://wasi.dev/) builds, for the command line tool and the encoder/transcoder as a WASI module using a pure C API, are also supported. @@ -93,7 +93,7 @@ The ASTC HDR decoder, used in the transcoder module, supports the entire ASTC HD The ASTC LDR decoder, used in the transcoder module, supports the entire standard ASTC LDR format. -7. **XUASTC LDR 4x4-12x12**: Supercompressed ASTC with weight grid DCT. Bitrate ranges between approximately .3-5.7bpp, depending on profile, block size, and weight grid DCT quality settings. Supports context-based range/arithmetic coding (for higher ratios), Zstd (for faster transcoding), or a hybrid profile using both. Supports all 14 ASTC block sizes. Transcodable to all other supported LDR texture formats. Certain common block sizes (4x4, 6x6, and 8x6) have specializations for particularly fast transcoding directly to BC7. +7. **XUASTC LDR 4x4-12x12**: Supercompressed ASTC with Weight Grid DCT. Bitrate ranges between approximately .3-5.7bpp, depending on profile, block size, and Weight Grid DCT quality settings. Supports context-based range/arithmetic coding (for higher ratios), Zstd (for faster transcoding), or a hybrid profile using both. Supports all 14 ASTC block sizes. Transcodable to all other supported LDR texture formats. Certain common block sizes (4x4, 6x6, and 8x6) have specializations for particularly fast transcoding directly to BC7. Supported ASTC configurations: L/LA/RGB/RGBA CEM's, base+scale or RGB/RGBA direct, base+ofs CEM's, Blue Contraction encoding, 1-3 subsets, all partition patterns, single or dual plane. Here is the [XUASTC LDR specification](https://github.com/BinomialLLC/basis_universal/wiki/XUASTC-LDR-Specification-v1.0). From 998ce08cc68387a7740482f3a004c86ef2d759e2 Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Mon, 19 Jan 2026 16:32:33 -0500 Subject: [PATCH 03/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7bec5ad..d139bcc 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ The system supports seven modes (or codecs): 4. **ASTC HDR 6x6 (with or without RDO)**: Standard ASTC HDR 6x6 5. **UASTC HDR 6x6 Intermediate ("GPU Photo")**: Supercompressed ASTC HDR 6x6 6. **ASTC LDR 4x4-12x12 (all 14 standard ASTC block sizes)**: Standard ASTC LDR 4x4-12x12 -7. **XUASTC LDR 4x4-12x12 (all 14 standard ASTC block sizes)**: Supercompressed ASTC LDR 4x4-12x12, very high quality, utilizes Weight Grid ([DCT - Discrete Cosine Transform](https://grokipedia.com/page/Discrete_cosine_transform)) for very high compression ratios +7. **XUASTC LDR 4x4-12x12 (all 14 standard ASTC block sizes)**: Supercompressed ASTC LDR 4x4-12x12, very high quality, utilizes Weight Grid DCT ([Discrete Cosine Transform](https://grokipedia.com/page/Discrete_cosine_transform)) for very high compression ratios The C/C++ encoder and transcoder libraries can be compiled to native code or WebAssembly (web or WASI), and all encoder/transcoder features can be accessed from JavaScript via a C++ wrapper library which optionally supports [WASM multithreading](https://web.dev/articles/webassembly-threads) for fast encoding in the browser. [WASM WASI](https://wasi.dev/) builds, for the command line tool and the encoder/transcoder as a WASI module using a pure C API, are also supported. From d74c40efbccab5f20bbef59ce42c3e2dc4bc57ef Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Tue, 20 Jan 2026 10:33:54 -0500 Subject: [PATCH 04/10] Clarify codec support description in README Updated the description of the system's codec support. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d139bcc..518595d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Basis Universal v2.0 is an open source [supercompressed](http://gamma.cs.unc.edu Our overall goal is to simplify the encoding and efficient distribution of *portable* LDR and HDR GPU texture, image, and short texture video content in a way that is compatible with any GPU or rendering/graphics API. -The system supports seven modes (or codecs): +The system supports seven modes (or codecs). In the order they were implemented: 1. **ETC1S**: A supercompressed subset of ETC1 designed for very fast transcoding to other LDR texture formats, low/medium quality but high compression 2. **UASTC LDR 4x4 (with or without RDO)**: Custom ASTC 4x4-like format designed for very fast transcoding to other LDR texture formats, high quality 3. **UASTC HDR 4x4**: Standard ASTC HDR 4x4 texture data, but constrained for very fast transcoding to BC6H From bac475c3ca5f5520c2e6efcb8720b93b2861a547 Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Tue, 20 Jan 2026 11:00:34 -0500 Subject: [PATCH 05/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 518595d..fffeadb 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ An alias for `-xuastc_ldr_6x6` is `-ldr_6x6i` (where 'i'="intermediate"). The options `-xuastc_arith`, `-xuastc_zstd` (the default), and `-xuastc_hybrid` control the XUASTC LDR profile used. The arithmetic profile trades off transcoding throughput for 5-18% better compression vs. the Zstd profile, and the hybrid profile is a balance between the two. -All [14 standard ASTC block sizes](https://developer.nvidia.com/astc-texture-compression-for-game-assets) are supported, from 4x4-12x12. +All [14 standard ASTC block sizes](https://developer.nvidia.com/astc-texture-compression-for-game-assets) are supported, from 4x4-12x12: 4x4, 5x4, 5x5, 6x5, 6x6, 8x5, 8x6, 10x5, 10x6, 8x8, 10x8, 10x10, 12x10 and 12x12. The XUASTC LDR to BC7 transcoder has special optimizations for several common block sizes: 4x4, 6x6 and 8x6. - To compress an LDR sRGB image to a standard ASTC LDR 6x6 .KTX2 file, using effort level 4 (valid effort levels 0-10): From 86c2ec42b199ff6674e630fcedd88e56107de3c5 Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Tue, 20 Jan 2026 11:10:30 -0500 Subject: [PATCH 06/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fffeadb..074b6e1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ The system supports seven modes (or codecs). In the order they were implemented: 4. **ASTC HDR 6x6 (with or without RDO)**: Standard ASTC HDR 6x6 5. **UASTC HDR 6x6 Intermediate ("GPU Photo")**: Supercompressed ASTC HDR 6x6 6. **ASTC LDR 4x4-12x12 (all 14 standard ASTC block sizes)**: Standard ASTC LDR 4x4-12x12 -7. **XUASTC LDR 4x4-12x12 (all 14 standard ASTC block sizes)**: Supercompressed ASTC LDR 4x4-12x12, very high quality, utilizes Weight Grid DCT ([Discrete Cosine Transform](https://grokipedia.com/page/Discrete_cosine_transform)) for very high compression ratios +7. **XUASTC LDR 4x4-12x12 (all 14 standard ASTC block sizes)**: Supercompressed ASTC LDR 4x4-12x12, very high quality, utilizes Weight Grid DCT ([Discrete Cosine Transform](https://grokipedia.com/page/Discrete_cosine_transform)) for very high compression ratios. See [JPEG for ASTC](https://github.com/BinomialLLC/basis_universal/wiki/JPEG-for-ASTC). The C/C++ encoder and transcoder libraries can be compiled to native code or WebAssembly (web or WASI), and all encoder/transcoder features can be accessed from JavaScript via a C++ wrapper library which optionally supports [WASM multithreading](https://web.dev/articles/webassembly-threads) for fast encoding in the browser. [WASM WASI](https://wasi.dev/) builds, for the command line tool and the encoder/transcoder as a WASI module using a pure C API, are also supported. From 135435c036e4233461822cb0d438ce7439eca734 Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Wed, 21 Jan 2026 02:29:38 -0500 Subject: [PATCH 07/10] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 074b6e1..35df577 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ The system supports seven modes (or codecs). In the order they were implemented: 2. **UASTC LDR 4x4 (with or without RDO)**: Custom ASTC 4x4-like format designed for very fast transcoding to other LDR texture formats, high quality 3. **UASTC HDR 4x4**: Standard ASTC HDR 4x4 texture data, but constrained for very fast transcoding to BC6H 4. **ASTC HDR 6x6 (with or without RDO)**: Standard ASTC HDR 6x6 -5. **UASTC HDR 6x6 Intermediate ("GPU Photo")**: Supercompressed ASTC HDR 6x6 +5. **UASTC HDR 6x6 Intermediate ("GPU Photo HDR")**: Supercompressed ASTC HDR 6x6 6. **ASTC LDR 4x4-12x12 (all 14 standard ASTC block sizes)**: Standard ASTC LDR 4x4-12x12 -7. **XUASTC LDR 4x4-12x12 (all 14 standard ASTC block sizes)**: Supercompressed ASTC LDR 4x4-12x12, very high quality, utilizes Weight Grid DCT ([Discrete Cosine Transform](https://grokipedia.com/page/Discrete_cosine_transform)) for very high compression ratios. See [JPEG for ASTC](https://github.com/BinomialLLC/basis_universal/wiki/JPEG-for-ASTC). +7. **XUASTC LDR 4x4-12x12 (all 14 standard ASTC block sizes, "GPU Photo LDR/SDR")**: Supercompressed ASTC LDR 4x4-12x12, very high quality, utilizes Weight Grid DCT ([Discrete Cosine Transform](https://grokipedia.com/page/Discrete_cosine_transform)) for very high compression ratios. See [JPEG for ASTC](https://github.com/BinomialLLC/basis_universal/wiki/JPEG-for-ASTC). The C/C++ encoder and transcoder libraries can be compiled to native code or WebAssembly (web or WASI), and all encoder/transcoder features can be accessed from JavaScript via a C++ wrapper library which optionally supports [WASM multithreading](https://web.dev/articles/webassembly-threads) for fast encoding in the browser. [WASM WASI](https://wasi.dev/) builds, for the command line tool and the encoder/transcoder as a WASI module using a pure C API, are also supported. @@ -87,13 +87,13 @@ Here is the [UASTC HDR 4x4 specification document](https://github.com/BinomialLL The ASTC HDR decoder, used in the transcoder module, supports the entire ASTC HDR format. -5. **UASTC HDR 6x6 Intermediate ("GPU Photo")**: A custom compressed intermediate format that can be rapidly transcoded to ASTC HDR 6x6, BC6H, and various uncompressed HDR formats. The custom compressed file format is [described here](https://github.com/BinomialLLC/basis_universal/wiki/UASTC-HDR-6x6-Intermediate-File-Format-(Basis-GPU-Photo-6x6)). The format supports 75 unique ASTC configurations, weight grid upsampling, 1-3 subsets, single or dual planes, CEM's 7 and 11, and all unique ASTC partition patterns. +5. **UASTC HDR 6x6 Intermediate ("GPU Photo HDR")**: A custom compressed intermediate format that can be rapidly transcoded to ASTC HDR 6x6, BC6H, and various uncompressed HDR formats. The custom compressed file format is [described here](https://github.com/BinomialLLC/basis_universal/wiki/UASTC-HDR-6x6-Intermediate-File-Format-(Basis-GPU-Photo-6x6)). The format supports 75 unique ASTC configurations, weight grid upsampling, 1-3 subsets, single or dual planes, CEM's 7 and 11, and all unique ASTC partition patterns. 6. **Standard ASTC LDR-4x4-12x12**. Supports all 14 ASTC block sizes. Transcodable to any other supported LDR texture format. The ASTC LDR decoder, used in the transcoder module, supports the entire standard ASTC LDR format. -7. **XUASTC LDR 4x4-12x12**: Supercompressed ASTC with Weight Grid DCT. Bitrate ranges between approximately .3-5.7bpp, depending on profile, block size, and Weight Grid DCT quality settings. Supports context-based range/arithmetic coding (for higher ratios), Zstd (for faster transcoding), or a hybrid profile using both. Supports all 14 ASTC block sizes. Transcodable to all other supported LDR texture formats. Certain common block sizes (4x4, 6x6, and 8x6) have specializations for particularly fast transcoding directly to BC7. +7. **XUASTC LDR 4x4-12x12 ("GPU Photo LDR/SDR")**: Supercompressed ASTC with Weight Grid DCT. Bitrate ranges between approximately .3-5.7bpp, depending on profile, block size, and Weight Grid DCT quality settings. Supports context-based range/arithmetic coding (for higher ratios), Zstd (for faster transcoding), or a hybrid profile using both. Supports all 14 ASTC block sizes. Transcodable to all other supported LDR texture formats. Certain common block sizes (4x4, 6x6, and 8x6) have specializations for particularly fast transcoding directly to BC7. Supported ASTC configurations: L/LA/RGB/RGBA CEM's, base+scale or RGB/RGBA direct, base+ofs CEM's, Blue Contraction encoding, 1-3 subsets, all partition patterns, single or dual plane. Here is the [XUASTC LDR specification](https://github.com/BinomialLLC/basis_universal/wiki/XUASTC-LDR-Specification-v1.0). From f32760600e089378f751ccef63f7cf7d16fcb287 Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Thu, 22 Jan 2026 18:15:52 -0500 Subject: [PATCH 08/10] Update README with WASM executable instructions Added instructions for running precompiled WASM WASI executables and provided examples for usage. --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 35df577..28db4cc 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,29 @@ The system now supports loading basic 2D .DDS files with optional mipmaps, but t ---- +Running the Precompiled WASM WASI Executables +--------------------------------------------- + +There are precompiled, cross platform .WASM WASI executables checked into the `bin` directory: `basisu_mt.wasm` (multithreaded) and `basisu_st.wasm` (single threaded). See the `runwt.sh`, `runwt.bat`, `runw.sh`, or `runw.bat` scripts for examples on how to run the WASM executables using [wasmtime](https://wasmtime.dev/). + +Here's `runwt.bat`: + +``` +wasmtime --wasm threads=yes --wasi threads=yes --dir=. --dir=.. --dir=..\test_files basisu_mt.wasm %* +``` + +Example for XUASTC LDR compression using the arithmetic profile, with Weight Grid DCT level 70: + +``` +cd bin +runwt.bat test_images/xmen.png -xuastc_ldr_6x6 -quality 70 -xuastc_arith +runwt.bat xmen.ktx2 +``` + +The [wasmer](https://wasmer.io/) runtime should work too, but we haven't tested it yet. + +---- + Building (Native) ----------------- From 6bf6540d90eb1696d15f5c7f681de282d22b224f Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Thu, 22 Jan 2026 18:18:18 -0500 Subject: [PATCH 09/10] Update example commands in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 28db4cc..ad66417 100644 --- a/README.md +++ b/README.md @@ -130,8 +130,8 @@ Example for XUASTC LDR compression using the arithmetic profile, with Weight Gri ``` cd bin -runwt.bat test_images/xmen.png -xuastc_ldr_6x6 -quality 70 -xuastc_arith -runwt.bat xmen.ktx2 +runwt.bat x.png -xuastc_ldr_6x6 -quality 70 -xuastc_arith +runwt.bat x.ktx2 ``` The [wasmer](https://wasmer.io/) runtime should work too, but we haven't tested it yet. From f16359985c2f5b506f213f681f88e2f38b38967c Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Thu, 22 Jan 2026 18:23:58 -0500 Subject: [PATCH 10/10] Update README with XUASTC LDR compression examples Added Windows and Linux examples for XUASTC LDR compression. --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ad66417..f7327fb 100644 --- a/README.md +++ b/README.md @@ -126,12 +126,21 @@ Here's `runwt.bat`: wasmtime --wasm threads=yes --wasi threads=yes --dir=. --dir=.. --dir=..\test_files basisu_mt.wasm %* ``` -Example for XUASTC LDR compression using the arithmetic profile, with Weight Grid DCT level 70: +Windows example for XUASTC LDR compression using the arithmetic profile, with Weight Grid DCT level 70: ``` cd bin -runwt.bat x.png -xuastc_ldr_6x6 -quality 70 -xuastc_arith -runwt.bat x.ktx2 +runwt.bat ../test_files/tough.png -xuastc_ldr_6x6 -quality 70 -xuastc_arith +runwt.bat tough.ktx2 +``` + +Linux: + +``` +cd bin +chmod +x runwt.sh +./runwt.sh ../test_files/tough.png -xuastc_ldr_6x6 -quality 70 -xuastc_arith +./runwt.sh tough.ktx2 ``` The [wasmer](https://wasmer.io/) runtime should work too, but we haven't tested it yet.