Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git subrepo pull (merge) lib/astc-encoder #537

Merged
merged 3 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/astc-encoder/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/ARM-software/astc-encoder.git
branch = main
commit = e7cb1e453968b0e16e48ef6d68fc9d1227d8a378
parent = b87158d371723ba9670f5dc13e50a3e2a2799eba
commit = 42a8f6ee01715f45edffb6773e34b8bb914a47df
parent = 2b1c072a13e9b69ada8457665b51ed5b59ddb408
method = merge
cmdver = 0.4.3
4 changes: 2 additions & 2 deletions lib/astc-encoder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if(MSVC)
add_compile_options("/wd4324") # Disable structure was padded due to alignment specifier
endif()

project(astcencoder VERSION 3.2.0)
project(astcencoder VERSION 3.3.0)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down Expand Up @@ -215,7 +215,7 @@ if(PACKAGE)

set(PKG_VER ${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR})

set(CPACK_PACKAGE_FILE_NAME "astcenc-${PKG_VER}-${PKG_OS}${PACKAGE}")
set(CPACK_PACKAGE_FILE_NAME "astcenc-${PKG_VER}-${PKG_OS}-${PACKAGE}")
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY FALSE)
set(CPACK_PACKAGE_CHECKSUM SHA256)
set(CPACK_GENERATOR ZIP)
Expand Down
55 changes: 0 additions & 55 deletions lib/astc-encoder/Docs/Analysis.md

This file was deleted.

11 changes: 7 additions & 4 deletions lib/astc-encoder/Docs/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,22 @@ cd build
# Configure your build of choice, for example:

# x86-64 using NMake
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=.\ ^
-DISA_AVX2=ON -DISA_SSE41=ON -DISA_SSE2=ON ..
cmake -G "NMake Makefiles" -T ClangCL -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX=.\ -DISA_AVX2=ON -DISA_SSE41=ON -DISA_SSE2=ON ..

# x86-64 using Visual Studio solution
cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=.\ ^
cmake -G "Visual Studio 16 2019" -T ClangCL -DCMAKE_INSTALL_PREFIX=.\ ^
-DISA_AVX2=ON -DISA_SSE41=ON -DISA_SSE2=ON ..

```

This example shows all SIMD variants being enabled. It is possible to build a
subset of the supported variants by enabling only the ones you require. At
least one variant must be enabled.

Using the Visual Studio Clang-cl LLVM toolchain (`-T ClangCL`) is optional but
produces signficantly faster binaries than the default toolchain. The C++ LLVM
toolchain component must be installed via the Visual Studio installer.

### Building

Once you have configured the build you can use NMake to compile the project
Expand Down
6 changes: 3 additions & 3 deletions lib/astc-encoder/Docs/ChangeLog-2x.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ speed. Our test sets show an average of 12% improvement in the codec for
Key for performance charts:

* Color = block size (see legend).
* Letter = image format (N = normal map, G = greyscale, L = LDR, H = HDR).
* Letter = image format (N = normal map, G = grayscale, L = LDR, H = HDR).

**Absolute performance vs 2.1 release:**

Expand Down Expand Up @@ -283,7 +283,7 @@ recompile your client-side code using the updated `astcenc.h` header.
Key for performance charts:

* Color = block size (see legend).
* Letter = image format (N = normal map, G = greyscale, L = LDR, H = HDR).
* Letter = image format (N = normal map, G = grayscale, L = LDR, H = HDR).

**Absolute performance vs 2.0 release:**

Expand Down Expand Up @@ -313,7 +313,7 @@ major changes over the earlier 1.7 series, and is not command-line compatible.
Key for performance charts

* Color = block size (see legend).
* Letter = image format (N = normal map, G = greyscale, L = LDR, H = HDR).
* Letter = image format (N = normal map, G = grayscale, L = LDR, H = HDR).

**Absolute performance vs 1.7 release:**

Expand Down
85 changes: 76 additions & 9 deletions lib/astc-encoder/Docs/ChangeLog-3x.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,86 @@ This page summarizes the major functional and performance changes in each
release of the 3.x series.

All performance data on this page is measured on an Intel Core i5-9600K
clocked at 4.2 GHz, running astcenc using AVX2 and 6 threads.
clocked at 4.2 GHz, running `astcenc` using AVX2 and 6 threads.


<!-- ---------------------------------------------------------------------- -->
## 3.4

**Status:** In development

The 3.4 release introduces another round of optimizations, removing a number
of power-user configuration options to simplify the core compressor data path.

* **General:**
* **Feature:** The `-v` and `-va` options to set a per-texel error weight
function are no longer supported.
* **Feature:** The `-b` option to set a per-texel error weight boost for
block border texels is no longer supported.
* **Feature:** The `-a` option to set a per-texel error weight based on texel
alpha value is no longer supported as an error weighting tool, but is still
supported for providing sprite-sheet RDO.
* **Feature:** The `-mask` option to set an error metric for mask map
textures is still supported, but is currently a no-op in the compressor.
* **Feature:** The `-perceptual` option to set a perceptual error metric is
still supported, but is currently a no-op in the compressor for mask map
and normal map textures.

### Performance:

Key for charts:

* Color = block size (see legend).
* Letter = image format (N = normal map, G = grayscale, L = LDR, H = HDR).

**Relative performance vs 3.3 release:**

Pending ...

<!-- ---------------------------------------------------------------------- -->
## 3.3

**Status:** November 2021

The 3.3 release improves image quality for normal maps, and two component
textures. Normal maps are expected to compress 25% slower than the 3.2
release, although it should be noted that they are still faster to compress
in 3.3 than when using the 2.5 series. This release also fixes one reported
stability issue.

* **General:**
* **Feature:** Normal map image quality has been improved.
* **Feature:** Two component image quality has been improved, provided
that unused components are correctly zero-weighted using e.g. `-cw` on the
command line.
* **Bug-fix:** Improved stability when trying to compress complex blocks that
could not beat even the starting quality threshold. These will now always
compress in to a constant color blocks.

<!-- ---------------------------------------------------------------------- -->
## 3.2

**Status:** August 2021

The 3.2 release is a bugfix release; no significant image quality or
performance differences are expected.

* **General:**
* **Bug-fix:** Improved stability when new contexts were created while other
contexts were compressing or decompressing an image.
* **Bug-fix:** Improved stability when decompressing blocks with invalid
block encodings.

<!-- ---------------------------------------------------------------------- -->
## 3.1

**Status:** July 2021

The 3.1 release is the second release in the 3.x series. This release gives
another performance boost, typically between 5 and 20% faster than the 3.0
release, as well as further incremental improvements to image quality. A number
of build system improvements make astcenc easier and faster to integrate into
other projects as a library, including support for building universal binaries
on macOS. Full change list is shown below.
The 3.1 release gives another performance boost, typically between 5 and 20%
faster than the 3.0 release, as well as further incremental improvements to
image quality. A number of build system improvements make astcenc easier and
faster to integrate into other projects as a library, including support for
building universal binaries on macOS. Full change list is shown below.

Reminder for users of the library interface - the API is not designed to be
binary compatible across versions, and this release is not compatible with
Expand Down Expand Up @@ -59,7 +126,7 @@ updated `astcenc.h` header.
Key for charts:

* Color = block size (see legend).
* Letter = image format (N = normal map, G = greyscale, L = LDR, H = HDR).
* Letter = image format (N = normal map, G = grayscale, L = LDR, H = HDR).

**Relative performance vs 3.0 release:**

Expand Down Expand Up @@ -110,7 +177,7 @@ updated `astcenc.h` header.
Key for charts:

* Color = block size (see legend).
* Letter = image format (N = normal map, G = greyscale, L = LDR, H = HDR).
* Letter = image format (N = normal map, G = grayscale, L = LDR, H = HDR).

**Absolute performance vs 2.5 release:**

Expand Down
11 changes: 3 additions & 8 deletions lib/astc-encoder/Docs/Encoding.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Effective ASTC Encoding

Most texture compression schemes encode a single color format at single
bitrate, so there are relatively few configuration options available to
content creators beyond selecting which compressed format to use.
bitrate, so there are relatively few configuration options available to content
creators beyond selecting which compressed format to use.

ASTC on the other hand is an extremely flexible container format which can
compress multiple color formats at multiple bit rates. Inevitably this
Expand Down Expand Up @@ -169,12 +169,7 @@ vector rather than for absolute color error in the data, which improves the
perceptual quality of the image.

Both the encoding swizzle and the angular error function are enabled by using
the `-normal` command line option. Normal map compression additionally supports
a dedicated perceptual error mode, enabled with the `-perceptual` switch, which
also optimizes for variance in the normal vector over a small neighborhood.
This can improve perceived visual quality by reducing variability that is
amplified by specular lighting calculations, but it will reduce the apparent
PSNR of the image.
the `-normal` command line option.

## Encoding sRGB data

Expand Down
2 changes: 1 addition & 1 deletion lib/astc-encoder/Docs/FileFormat.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ Binary payload

The binary payload is a byte stream that immediately follows the header. It
contains 16 bytes per compressed block. The number of compressed blocks is
determined programmatically based on the header information.
determined from the header information.
67 changes: 0 additions & 67 deletions lib/astc-encoder/Docs/OptimizationIdeas.md

This file was deleted.

Loading