Skip to content

Commit

Permalink
Update code for 4.7.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
solidpixel committed Jan 11, 2024
1 parent d596f6d commit 1a51f29
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# ----------------------------------------------------------------------------
# Copyright 2020-2023 Arm Limited
# Copyright 2020-2024 Arm Limited
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
Expand All @@ -24,7 +24,7 @@ if(MSVC)
add_compile_options("/wd4324") # Disable structure was padded due to alignment specifier
endif()

project(astcencoder VERSION 4.6.1)
project(astcencoder VERSION 4.7.0)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
32 changes: 21 additions & 11 deletions Docs/ChangeLog-4x.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,27 @@ clocked at 4.2 GHz, running `astcenc` using AVX2 and 6 threads.
<!-- ---------------------------------------------------------------------- -->
## 4.7.0

**Status:** TBD
**Status:** January 2024

The 4.7.0 release is a maintenance release.
The 4.7.0 release is a major maintenance release, fixing rounding behavior in
the decompressor to match the Khronos specification. This fix includes the
addition of explicit support for optimizing for `decode_unorm8` rounding.

Reminder - the codec library API is not designed to be binary compatible across
versions. We always recommend rebuilding your client-side code using the updated
`astcenc.h` header.

* **General:**
* **Bug fix:** sRGB LDR decompression now uses correct `decode_fp16` decode
mode rounding rules for the alpha channel.
* **Bug fix:** Linear LDR decompression now uses correct `decode_unorm8`
decode mode rounding rules when writing to an 8-bit output image.
* **Bug fix:** Avoid using `alignas()` the reference C implementation, as the
default `alignas(16)` is narrower than the native alignment on some CPUs.
* **Bug fix:** sRGB LDR decompression now uses the correct endpoint expansion
method to create the 16-bit RGB endpoint colors, and removes the previous
correction code from the interpolation function. This bug could result in
LSB bit flips relative to the standard specification.
* **Bug fix:** Decompressing to an 8-bit per component output image now matches
the `decode_unorm8` extension rounding rules. This bug could result in
LSB bit flips relative to the standard specification.
* **Bug fix:** Code now avoids using `alignas()` in the reference C
implementation, as the default `alignas(16)` is narrower than the
native minimum alignment requirement on some CPUs.
* **Feature:** Library configuration supports a new flag,
`ASTCENC_FLG_USE_DECODE_UNORM8`. This flag indicates that the image will be
used with the `decode_unorm8` decode mode. When set during compression
Expand All @@ -30,7 +40,7 @@ The 4.7.0 release is a maintenance release.
decode mode. This option will automatically be set for decompression
(`-d*`) and trial (`-t*`) tool operation if the decompressed output image
is stored to an 8-bit per component file format. This option must be set
maually for compression (`-c*`) tool operation, as the desired decode mode
manually for compression (`-c*`) tool operation, as the desired decode mode
cannot be reliably determined.
* **Feature:** Library configuration supports a new optional progress
reporting callback to be specified. This is called during compression to
Expand All @@ -49,7 +59,7 @@ large core count Windows systems.
* **General:**
* **Optimization:** Windows builds of the `astcenc` command line tool can now
use more than 64 cores on large core count systems. This change doubled
command line performance for `-exhastive` compression when testing on an
command line performance for `-exhaustive` compression when testing on an
96 core/192 thread system.
* **Feature:** Windows Arm64 native builds of the `astcenc` command line tool
are now included in the prebuilt release binaries.
Expand Down Expand Up @@ -385,4 +395,4 @@ Key for charts:

- - -

_Copyright © 2022-2023, Arm Limited and contributors. All rights reserved._
_Copyright © 2022-2024, Arm Limited and contributors. All rights reserved._
2 changes: 0 additions & 2 deletions Source/astcenc_compress_symbolic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1237,8 +1237,6 @@ void compress_block(
vfloat4 color_f32 = clamp(0.0f, 1.0f, blk.origin_texel) * 65535.0f;
vint4 color_u16 = float_to_int_rtn(color_f32);
store(color_u16, scb.constant_color);

// TODO: Check this encodes correctly for decode_unorm8
}

trace_add_data("exit", "quality hit");
Expand Down

0 comments on commit 1a51f29

Please sign in to comment.