138 Commits

Author SHA1 Message Date
Richard Geldreich
cbb8ebefa4 Fixing ftell() error handling issue introduced by warning merge from PR 408 2025-11-08 11:28:34 -05: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
2c6712697c Fixing thread pool shutdown so the kill flag is set inside the mutex, preventing a race. This could cause very rare lockups on the previous code.
Also for more safety to prevent lockups on buggy C run-times, adding a 1s timeout in the thread pool condition variable wait.
2025-09-05 21:13:04 -04:00
Richard Geldreich
dcb7db72d2 Very minor fix/improvement to HDR 6x6 encoder (channel pair min correlation check). On blocks with all channels active (by far the most common case in practice), there's no difference. 2025-09-05 21:08:02 -04:00
Richard Geldreich
69ad18e035 removing unnecessary debug prints 2025-09-02 17:33:13 -04:00
Richard Geldreich
5d64f944f5 Fixing BASISU_OPENCL_ASSERT_ON_ANY_ERRORS so it's 0 by default 2025-07-17 12:18:18 -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
Jakub Marcowski
4855a3e338 Change ² (U+00B2) to ^2 2025-04-25 15:54:31 +02:00
Richard Geldreich, Jr.
b7ce25fd02 Windows ARM fixes 2025-02-19 15:09:52 -05:00
Richard Geldreich
ac02bea0a5 adding empty line at end of file 2025-01-21 12:14:47 -05:00
Richard Geldreich
1ba75b4e34 ASTC 6x6 HDR/6x6 HDR intermediate update 2025-01-21 11:01:08 -05:00
Richard Geldreich
acdf7620a8 new files 2025-01-21 10:08:45 -05:00
Richard Geldreich
3093d8bba6 removing renamed files 2025-01-21 10:07:55 -05:00
Richard Geldreich
6588a8a443 fixing load_png() so it checks the correct pointer 2024-11-15 04:02:04 -05:00
Rich Geldreich
7c046f89b2 Merge pull request #380 from zeux/fix-exrwarn
Fix gcc's calloc-transposed-args warning
2024-10-08 12:47:11 -04:00
Arseny Kapoulkine
660d897848 Fix gcc's calloc-transposed-args warning
calloc takes sizeof as the second argument.
2024-10-05 15:27:00 -07:00
Arseny Kapoulkine
23791a55f5 Fix verbose printfs when m_status_output = false
Regression since HDR merge; m_status_output = false should result in no
prints outside of error cases.
2024-10-05 15:23:53 -07:00
Richard Geldreich
59d28d60e9 Fixing UASTC HDR DFD 2024-09-10 23:37:07 -04:00
Richard Geldreich
1d56bfd544 Modifying UASTC HDR DFD 2024-09-10 20:48:20 -04:00
Richard Geldreich
14c52fc02c fixing build warning 2024-09-10 17:16:54 -04:00
Richard Geldreich
fb721b9e62 UASTC HDR merge 2024-09-10 14:44:59 -04:00
Richard Geldreich
3cab5169dc new files for UASTC HDR merge 2024-09-10 14:44:11 -04:00
Richard Geldreich
ac8898a466 UASTC HDR merge 2024-09-10 14:43:47 -04:00
Richard Geldreich
3f14dea423 Visual Studio 2022 (v143) compiler bug workaround. Test works now. Only impacted this compiler, not v142 or clang/gcc. 2023-04-12 17:45:30 -04:00
Ștefan Talpalaru
e61fe1e4ff SIMD: disable compile time checks
SSE4.1 support is checked at runtime, so compile time checks are
redundant at best and harmful when compiling for a different machine.

Further more, a logic error prevented the use of SSE4.1 on systems with
any version of AVX available. This is fixed now.
2023-01-31 14:39:17 +01:00
Rich Geldreich
a91e94c849 Merge pull request #328 from walkingeyerobot/master
emscripten no longer provides sys/timex.h, but does provide sys/time.h
2022-10-07 19:41:09 -04:00
Richard Geldreich
c86a40c7e6 Adding -clbench command line option, and a new API basis_benchmark_etc1s_opencl() to determine if OpenCL encoding is worthwhile on the current machine/driver/GPU. 2022-10-07 19:33:34 -04:00
walkingeyerobot
18b4868d2c Update encoder/basisu_enc.cpp
Co-authored-by: Derek Schuff <dschuff@chromium.org>
2022-10-07 18:38:59 -04:00
Mitch Foley
53372fc512 emscripten no longer provides sys/timex.h, but does provide sys/time.h 2022-10-07 16:58:42 -04:00
Rich Geldreich
498bba430b Merge pull request #319 from zeux/timer-tsan
Ensure interval_timer is initialized from main thread
2022-08-21 00:23:41 -04:00
Arseny Kapoulkine
7270755488 Ensure interval_timer is initialized from main thread
This avoids the race condition in interval_timer::init which triggers
thread sanitizer errors.
2022-08-20 21:15:20 -07:00
Rich Geldreich
547cdf85aa Merge pull request #285 from zeux/macos-fix
Fix clang warnings
2022-02-24 16:58:26 -08:00
Richard Geldreich
7a2094b807 Adding SAN option to CMakeLists.txt, to make it easier to use clang's address/undefined behavior sanitizer on codebase
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
2022-02-24 19:45:01 -05:00
Richard Geldreich
19111ce77b Fixing glTypeSize so it's always 1, as the KTX spec requires. 2022-02-11 21:28:02 -05:00
Arseny Kapoulkine
4556b570d5 Fix macOS warnings 2022-01-29 18:44:34 -08: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
Richard Geldreich
5d23f64073 New files 2022-01-28 08:30:50 -05:00
Richard Geldreich
fcbd0e7df1 New files 2022-01-28 08:30:40 -05:00
Rich Geldreich
928a0caa3e Fixing asserts on 1x1 jpeg's when chroma filtering is enabled. 2021-12-27 02:18:33 -05:00
Rich Geldreich
0da4c110b0 Merge pull request #233 from atteneder/sse4.2
fix: Allow building SSE kernels regardless of SSE 4.2 being (in)active
2021-12-18 17:39:44 -08:00
Hugo Locurcio
9ecbdaa7dd Fix compilation on FreeBSD
Linux's `<sys/timex.h>` header was used instead of
FreeBSD's <sys/time.h> due to missing preprocessor comparison.

Co-authored-by: robfram <robfram@gmail.com>
2021-11-19 20:47:26 +01:00
Rich Geldreich
646a9f8261 Rewriting reduce_all() helpers. They aren't actually used, but they are good to have around. 2021-10-19 23:25:00 -04:00
Rich Geldreich
77b7df8e5d Merge pull request #234 from omar-polo/master
fix the build on OpenBSD
2021-09-22 20:17:31 -04:00
Rich Geldreich
1ad79624f2 Merge pull request #235 from cwoffenden/single-file-fixes
Single file transcoder fixes
2021-09-22 20:14:36 -04:00
Rich Geldreich
716f6ee9dc Fixing bug in tree structured VQ code that would generate nodes with redundant input vector indices, causing rare frontend verify crashes. 2021-09-22 20:09:16 -04:00
Rich Geldreich
b993de4209 Merge pull request #237 from zeux/enc1
Make it easier to build Basis encoder as one .cpp
2021-09-09 23:19:38 -04:00
Rich Geldreich
6ac519f1e5 Merge pull request #238 from zeux/cppfix
apg_bmp: Fix building C source as C++
2021-08-03 21:41:04 -04:00
Andreas Atteneder
2849bbd177 fix: Compile SSE kernel regardless of SSE 4.2 support being enabled 2021-06-21 17:38:38 +02:00
Rich Geldreich
c4c0db735a Merge pull request #240 from zeux/nominmax
Remove redundant definitions of min/max
2021-06-15 19:21:08 -04:00
Arseny Kapoulkine
35c42cb00b Remove redundant definitions of min/max
These aren't used and they conflict with other sources in single-source
build.
2021-06-06 22:04:31 -07:00