- 3 subset CEM 7/11 partition compression needs to check for rare failures
- adding clamp to bc6h encoder's smooth block weight index assigner (assign_weights_simple_4)
This update impacts the UASTC HDR 4x4, UASTC HDR 6x6i, and XUASTC LDR formats. New KTX2 files in these specific formats using v2.1 can't be loaded using v2.0, however we've kept backwards compatibility with all of our previously written KTX2 files. (v2.1 can transcode all previously written files.)
This is part of our effort to be compatible with Khronos's specification.
bc6hf encoder's smooth block path updated to handle inputs with texels close to MAX_HALF_FLOAT.
Adding command line options to basisu tool so it can write either v2.0 or v1.6 compatible UASTC HDR 6x6i files. The default is v1.6.
Updating WebGL KTX2 testbed so on ASTC devices it automatically switches between sRGB or linear internal formats for the created texture.
PR 408's cmakelists.txt file has too many issues (OpenCL breaks on Windows/OSX) and changing our options to have the "BASISU_" prefix will break upstream builds.
Fixing overflow issue on extreme colors in color_distance().
Explicitly disabling unaligned addressing in miniz and transcoder when UBSAN is enabled
Disabling a needless optimization in transcoder causing ubsan issues (that could have easily been worked around in a different way, but it was an unnecessary optimization to begin with)
Rebuild wasm builds
- Minor fix to basisu_frontend::optimize_selector_codebook() so the new_selector_cluster_indices array is initialized correctly. (The backend doesn't use this array so no harm was being done.)
- Optimized ETC1S encoder (3-4.5x faster)
- Added optional SSE 4.1 support to encoder
- Switched from std::vector to a custom vector in the encoder and transcoder
- Added CppSPMD (SSE only for now)
- UASTC RDO is now more effective, but the command line parameter controlling qualiy has changed (to "lambda")
Some of our static analysis tools were complaining about unreachable code due to "#if ... return false; #endif code " blocks. This was changed to "#if ... return false #else ... #endif" which doesn't change the functionality but makes the static analyzers happy.
Also removed BASISU_NOTE_UNUSED on two variables that are no longer declared (resulting in a build error when BASISD_SUPPORT_UASTC was not defined)
Encoder is now a library in the "encoder" directory
JavaScript wrappers now expose the entire codec: encoder, transcoder, container independent transcoding, and .basis file information
(1 << num_bits) was converted to a signed integer that caused an overflow (as num_bits was usually set to 31). It worked fine since the value was later converted back to uint32_t but signed integer overflow is technically an undefined behavior and it was triggering errors in our automated tests.
With the default Xcode 11 settings, these non-functional changes remove warnings when building for iOS and Mac, notably:
Possible misuse of comma operator here
Implicit conversion loses integer precision: 'long' to 'int'
- Removing BC7 mode 6 support from transcoder (will alway use the much smaller mode 5 tables now)
- Adding BMP support
- Adding -bench mode, for development
- CMakeLists.txt file now compatible with Visual Studio 2019 (MSVC)