Commit Graph

560 Commits

Author SHA1 Message Date
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
57b9051d94 Forward declaring hash_map::iterator and const_iterator. This doesn't fix issues in basisu, but hopefully in the KTX2 repo. 2021-03-17 12:29:08 -04:00
Rich Geldreich
f035aa4ce3 Adding remark v1.13_3_16 2021-03-16 23:51:06 -04:00
Rich Geldreich
d2454fb1da - Renaming some members to be more descriptive
- Fixing find_optimal_selector_clusters_for_each_block() so if some clusters don't get assigned any blocks during refinement the selector cluster block index array is still correctly sized.
2021-03-16 22:58:01 -04:00
Rich Geldreich
7fa283edb0 Fixing VS 2015 compilation issue 2021-03-16 21:31:17 -04:00
Rich Geldreich
a7994821e5 Disabling unaligned reads unless it's x86/x64 by default 2021-03-16 21:16:57 -04:00
Rich Geldreich
b5334deb8a Putting miniz into its own C++ namespace to fix clashes 2021-03-13 09:52:35 -05:00
Rich Geldreich
2f2965992b Was always including malloc.h - this is now only done on Linux. It was for malloc_usable_size(). 2021-03-10 03:22:15 -05:00
Rich Geldreich
0b137c169b Update README.md 2021-03-09 15:17:40 -05:00
Rich Geldreich
95f410c941 Update README.md v1.13 2021-03-09 14:43:12 -05:00
Rich Geldreich
b34959181b Modified files 2021-03-09 11:31:29 -05:00
Rich Geldreich
53264b1c28 New file 2021-03-09 11:02:48 -05: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
4299495f77 New files 2021-03-09 10:58:57 -05:00
Rich Geldreich
bb2a355560 New files 2021-03-09 10:58:49 -05:00
Rich Geldreich
465ca44f4c New files 2021-03-09 10:58:42 -05:00
Rich Geldreich
1fb8b51311 Merge pull request #198 from ondys/patch-4
Build and warning fixes for basisu_transcoder.cpp
pre_v1.13
2021-01-29 18:33:25 -05:00
Ondrej Stava
c959383657 Build and warning fixes for basisu_transcoder.cpp
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)
2021-01-29 13:37:01 -08:00
Rich Geldreich
ef70ddd7c9 Fixing missing newline at end of file 2020-12-21 18:47:43 -05:00
Rich Geldreich
7b9004899b Merge pull request #192 from fintelia/patch-1
Fix comment typo in basisu_transcoder.h
2020-12-18 14:05:05 -05:00
Rich Geldreich
16a2989aa5 Update README.md 2020-12-18 14:00:39 -05:00
Rich Geldreich
044d18f4ef Update README.md 2020-12-18 14:00:01 -05:00
Rich Geldreich
b3be08410f Update README.md 2020-12-18 13:54:53 -05:00
Rich Geldreich
9e6eca249c Update README.md 2020-12-18 13:45:26 -05:00
Rich Geldreich
d0eb95e8b2 Update README.md 2020-12-18 13:41:39 -05:00
Rich Geldreich
2882de8126 Update README.md 2020-12-18 13:40:12 -05:00
Rich Geldreich
e25d8dd7a8 Update README.md 2020-12-18 07:17:48 -05:00
Rich Geldreich
4eff205f2f Update README.md 2020-12-17 15:15:52 -05:00
Rich Geldreich
33fe39f9cc Update README.md 2020-12-17 15:14:48 -05:00
Rich Geldreich
45fa7d6d21 Updating REUSE file 2020-12-17 15:13:45 -05:00
Rich Geldreich
107ae4b936 Update README.md 2020-12-17 15:11:23 -05:00
Rich Geldreich
8fceed472a Update README.md 2020-12-17 14:55:57 -05:00
Rich Geldreich
2d63617d71 Update README.md 2020-12-17 14:54:09 -05:00
Rich Geldreich
5d2120b085 Update README.md 2020-12-17 14:52:36 -05:00
Rich Geldreich
ea668ac2c3 Updating preview image 2020-12-17 14:47:34 -05:00
Rich Geldreich
5b299684cd Update README.md 2020-12-17 14:46:25 -05:00
Rich Geldreich
f51ea57463 Update README.md 2020-12-17 14:43:29 -05:00
Rich Geldreich
a21ea7f25b Adding missing files 2020-12-17 14:38:15 -05:00
Rich Geldreich
79245d48d5 Update README.md 2020-12-17 14:31:22 -05:00
Rich Geldreich
85fa18ec94 Adding encoder WebAssembly support, encode_test sample
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
2020-12-17 14:26:28 -05:00
Rich Geldreich
9ebf01854c new file 2020-12-17 14:24:34 -05:00
Rich Geldreich
5eebb7e4f9 new files 2020-12-17 14:24:22 -05:00
Rich Geldreich
e88073088d Missing file 2020-12-17 13:59:00 -05:00
Rich Geldreich
62539278e1 Moving encoder-related files to the "encoder" directory 2020-12-17 13:57:57 -05:00
Jonathan Behrens
ad5daec2fc Fix comment typo in basisu_transcoder.h 2020-12-12 14:44:14 -05:00
Rich Geldreich
2952f6dc67 Merge pull request #187 from slimbuck/rgba-swizzle
General RGBA swizzle param
before_webasm_encoder
2020-11-30 16:11:56 -05:00
Rich Geldreich
638c348294 Adding container independent transcoding support. See methods basisu_lowlevel_etc1s_transcoder::transcode_image() and basisu_lowlevel_uastc_transcoder::transcode_image(). 2020-11-23 17:58:38 -05:00
Donovan Hutchence
ef7d326654 apply swizzle patch 2020-11-17 09:03:29 +00:00
Rich Geldreich
d3fadac767 Merge pull request #175 from UebelAndre/standardize-on-appveyor
Standardize on App Veyor
2020-10-27 20:56:03 -04:00