28 Commits

Author SHA1 Message Date
Richard Geldreich
e93d3beb36 merging v2.0 from xuastc_private 2026-01-19 01:59:54 -05:00
Aaron Franke
f3a63a3f54 Remove trailing space characters 2025-11-21 11:52:38 -08:00
Richard Geldreich
196db8cbe2 Merging as much of PR #408 as we safely can.
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.
2025-11-06 13:19:40 -05:00
Richard Geldreich
e8855f8840 Compiler warning fixes.
Cleaning up handling of 8-byte lengths/offsets in KTX2 files. (In practice, we don't currently accept files this large anyway.)
2025-09-20 10:10:08 -04:00
Richard Geldreich
100ace82d2 emcc warning fixes, fixing warnings in WASM cmakelists.txt files, changing ETC1S encoder to use std::map vs. std::unordered_map for hopefully more cross platform determinism 2025-06-24 17:22:05 -04:00
Richard Geldreich
1ba75b4e34 ASTC 6x6 HDR/6x6 HDR intermediate update 2025-01-21 11:01:08 -05:00
Richard Geldreich
8318d0c1b8 UASTC HDR merge 2024-09-10 14:38:10 -04:00
Richard Geldreich
deeb5acb56 v1.16 release: OpenCL support, removing global selector palette code (it was unused/dead code), ETC1S encoding optimizations, -parallel command line option 2022-01-28 08:32:54 -05:00
Rich Geldreich
7f0a00afe1 Adding KTX2 transcoding/encoding/decompression to PNG/KTX1 support to the transcoder, encoder, JavaScript wrappers. This is also adding Zstandard to the repo, which is optional. Set BASISD_SUPPORT_KTX2_ZSTD=0 when compiling the encoder/transcoder to disable it, or from cmake set KTX2_ZSTANDARD=FALSE. 2021-04-12 13:30:45 -04:00
JCash
2c0c038ffe Renamed to minimum/maximum 2021-03-30 19:17:50 +02:00
JCash
03cca3778e Replaced std::min/std::max with basisu::min/basisu::max
Removed use of NOMINMAX
2021-03-30 18:44:07 +02:00
Rich Geldreich
2d4fe933b2 Basis Universal v1.13:
- 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")
2021-03-09 11:00:25 -05:00
Rich Geldreich
525458ae82 Merge pull request #137 from ondys/patch-2
Fixed undefined behavior in BASISU_OFFSETOF
2020-05-06 19:56:56 -04:00
richgel999
a1689504ea Huffman encoder fixes for very large streams
Allowing Huffman decoder to use different fast bits table sizes
Adding NV and AMD BC1 decoders
2020-05-05 23:10:21 -04:00
Ondrej Stava
57ca9acadd Fixed undefined behavior in BASISU_OFFSETOF
The original implementation was dereferencing a nullptr which is an undefined behavior according to the C++ spec. It was triggering some automatic errors during our sanitizer tests (asan with nullptr check).

The fix replaces the offset with standard implementation of offsetof that uses compiler built in instructions when available (avoiding the undefined behavior).
2020-04-28 11:11:10 -07:00
Carl Woffenden
3953f6099a Merge branch 'master' into single-file-transcoder 2020-03-20 19:40:30 +01:00
Rich Geldreich
5b6eb565e4 - Adding UASTC support to encoder, transcoder, .basis file format
- 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)
2020-03-20 02:00:34 -04:00
Carl Woffenden
a6bd48a16c Minor Clang fixes
Minor fixes so that Clang doesn't trip with `-Werror` and `-Wextra`.
2019-09-28 07:04:29 +02:00
richgel999
54304fa014 - Adding PVRTC2 RGB/RGBA and ETC2 EAC R11 and RG11
- Renaming -no_auto_global_sel_pal to -auto_global_sel_pal, disabling global selector palette usage by default to speed up compression on small images
- Renaming texture format enums
- Fixing uninitialized memory issue in front end - it wouldn't have affected the correctness of the output, or output quality
- Bumping command line tool up to v1.10
2019-09-26 22:35:14 -07:00
richgel999
3629438d43 Transcoder update: ASTC 4x4 RGB/RGBA, ATC RGB/RGBA, BC7 mode 5 RGBA, PVRTC1 4bpp RGBA, and uncompressed raster formats. 2019-09-19 12:29:44 -07:00
Squareys
2df7937bbf Add BASISU_NO_ITERATOR_DEBUG_LEVEL symbol to avoid debug level mismatches
Signed-off-by: Squareys <squareys@googlemail.com>
2019-07-07 22:48:27 +02:00
Brad Davis
fccfdd93ef Properly disable copy ctor and assignment operator 2019-06-15 10:31:21 -07:00
Rich Geldreich
7d784c7288 Correcting the copyright date, as all of the Basis Universal code was written during/after April '19. 2019-06-09 18:29:41 -07:00
Arseny Kapoulkine
af8f9f8bc4 Remove assert(x) hack in favor of NDEBUG
basis_transcoder.js 140999
basis_transcoder.wasm 832985
2019-05-22 20:51:29 -07:00
Rich Geldreich
1afb8e714b Fixing BASISU_DEVEL_MESSAGES for MSVC. 2019-05-10 22:33:52 -07:00
Rich Geldreich
130eb9f115 Major compression performance/quality improvements, for a 15-35% or so decrease in file size for the same Y PSNR/SSIM. The basis file format has changed due to these optimizations.
Increasing the max codebook size to 16K vs. 8K, for a major increase in the max achievable quality.
Adding exception catching to command line tool.
Enabling debug iterators on MSVC.
Refining command line options, adding "-individual" flag to create multiple .basis files (vs. a texture array).
Changing default colorspace to sRGB, because that's probably the best default. -linear disables this and uses linear colorspace metrics.
PNG reader in 32-bit builds checks the size of the file before loading to avoid out of memory exceptions.
2019-05-07 15:52:54 -07:00
Rich Geldreich
7a727fb31c ETC1S->DXT5A transcoding bugfix on solid color blocks
Adding development messages support
Adding a few new transcoder get methods to help with creating C-style wrappers
2019-04-30 20:01:39 -07:00
Rich Geldreich
bd7d786a8a Initial checkin 2019-04-29 18:53:00 -07:00