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
Arseny Kapoulkine
94d8efb875
Disable read/wrote output when status output is off
...
This was the only output that was being printed when m_status_output is
false; since this defaults to true in command-line builds this doesn't
affect them.
2021-06-05 22:25:30 -07:00
Arseny Kapoulkine
ce94722f41
Fix building C source as C++
...
apg_bmp used implicit void*->type* cast which compiles in C but not in
C++.
2021-06-05 22:23:37 -07:00
Arseny Kapoulkine
d564299635
Make it easier to build Basis encoder as one .cpp
...
This is adding a missing #pragma once to bc7enc.h and renaming
ast_interpolate to avoid conflicts with the copy in basisu_uastc_enc
(and also making the color space obvious).
2021-06-05 21:15:50 -07:00
Carl Woffenden
f5722a8025
Removed/moved unused vars
...
Relates to issue #230
2021-05-31 14:46:12 +02:00
Omar Polo
ed2df5ba57
fix the build on OpenBSD
2021-05-22 17:46:43 +02:00
Andreas Atteneder
b55d5b311d
fix: Allow building SSE kernels even when SSE 4.2 is active
2021-05-16 02:15:02 +02:00
Arseny Kapoulkine
0eb541a118
Implement custom resampling command line args
...
This change implements -resample X Y command line support in addition to
-resample_factor, when a more sophisticated algorithm is needed to
compute the desired image size.
For example, these can be used to round the image to a multiple of 4 or
to a power of 2 for improved compatibility with various graphics APIs.
2021-04-14 21:13:19 -07:00
Rich Geldreich
24ba5ded22
Merge pull request #214 from zeux/trial_errors
...
Optimize find_optimal_selector_clusters_for_each_block
2021-04-14 23:50:22 -04:00
Rich Geldreich
f3f7f750bb
Updating comment
2021-04-14 23:36:10 -04:00
flashk
1cd2b7506a
Apply swizzle to user supplied mipmaps
2021-04-14 10:37:16 -07:00
Rich Geldreich
ee626cec19
Adding initial support for user-provided mipmaps. This isn't hooked up to the command line tool or the JS wrappers yet.
2021-04-13 22:48:01 -04:00
Rich Geldreich
48a5914a73
- Fixing ETC1S backend endpoint palette related bug that was causing a CRC check to fail on the decompressed data during compression.
...
- Fixing -etc1_only option so it doesn't write uncompressed image formats.
2021-04-13 14:58:28 -04:00
Rich Geldreich
5f98685bb9
Fixing gcc warning
2021-04-12 23:39:49 -04:00
Rich Geldreich
3f168577bb
Fixing gcc warning
2021-04-12 23:38:01 -04:00
Rich Geldreich
ed135f03a0
Re-enabling the ktx2 mipPadding alignment workaround
2021-04-12 14:52:37 -04:00
Rich Geldreich
316a8de5f1
Fixing comment
2021-04-12 14:51:57 -04:00
Rich Geldreich
cb6322848b
Adding some macros to disable the KTX2 mipPadding alignment bug workaround, and to not write key value fields at all.
2021-04-12 14:47:15 -04: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
Rich Geldreich
041ad47c27
- Global codebook related fixes
...
- 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.)
2021-03-31 00:01:52 -04:00
Rich Geldreich
bf13257528
Merge branch 'branch'
2021-03-30 14:53:22 -04:00
Rich Geldreich
053ed374b4
In progress global codebook changes
2021-03-30 14:51:26 -04:00
Rich Geldreich
2fd9aec037
Merge pull request #220 from JCash/basisu-min-max
...
Replaced std::min/std::max with basisu::minimum/basisu::maximum
2021-03-30 14:06:56 -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
Arseny Kapoulkine
aee16b4eab
Add two newlines at EOF to make the CI happy
2021-03-24 09:34:22 -07:00
Arseny Kapoulkine
950e452f7d
Optimize find_optimal_selector_clusters_for_each_block
...
In find_optimal_selector_clusters_for_each_block, a noticeable amount of
time is spent computing color distances for pixels of different clusters.
Because for each pixel we only have 4 colors to compare against, we have
to compute a grand total of 64 unique color deltas; the cluster count,
however, is typically ~200 and we computed 16 deltas for each cluster.
It's thus cheaper to precompute all 64 deltas ahead of time and just add
the right deltas up for each cluster.
This reduces the time to encode a 2Kx2K image with a mip chain in a
single thread with SSE4.1 enabled from 7.8 seconds to 7.3 seconds; the
resulting image is binary identical before/after this change.
2021-03-24 09:12:31 -07:00
Rich Geldreich
f035aa4ce3
Adding remark
2021-03-16 23:51:06 -04:00