Commit Graph

8 Commits

Author SHA1 Message Date
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
richgel999
f8f87d51f4 Basis Universal doesn't pack blocks to plain ETC1, and it doesn't try to explicitly pack solid color blocks. To reduce the size of the code to maintain, I'm removing this unused/dead code. 2019-07-28 20:29:51 -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
richgel999
ab722fa2e1 - Adding support for skip blocks, i-frames and p-frames to the backend and transcoder, for texture video use.
- For PVRTC1, we now memset() any extra blocks after the blocks we know will be transcoded into. This is done because in GL there is padding that occurs on textures smaller than 8x8.
- Removing all OpenMP usage and replacing it with a basis C++11 job system.
- Fixing TSVQ class so it can split very long "thin" clusters that before weren't being split. This improves endpoint quantization on videos and complex 2D textures.
- More frontend perf. optimizations.

Tested on OSX, Linux with gcc/clang, and Win using MSVC 2019.
2019-06-07 20:35:38 -07:00
Rich Geldreich
f631b29a7e Frontend optimizations: Adding multiple compression levels to the encoder's frontend. Level 2 and 4 are equivalent to the initial release (default or -slower). Level 1 is now the new default, and is on average 21% faster than level 2. (Or more, up to 2-2.5x, on large images.) The help text documents what encoder features are used in each level. Level 0 is fine for most images, but is weak on artificial images and really large complex images. -slower now sets level 2 (not 4).
Adding -only_etc1 command line option, because sometimes during unpack you only want the ETC1 images.

Total timing and avg. Y PSNR across 59 test images, quality 128:

L Time PSNR
0 121.4	35.45
1 172.4	36.87
2 216.0	37.13
3 511.4	37.15
4 665.9	37.41
5 1483.4	37.43

Initial release:
L Time PSNR
0 216.77	37.13
1 701.84	37.41
2019-05-31 15:14:58 -07:00
Rich Geldreich
3050ca4a70 Optimizing basisu_frontend::init_endpoint_training_vectors() so it doesn't go recompute the ETC1S block basecolor/inten tables again. We already do this in basisu_frontend::init_etc1_images(). This change should not change the output files in any way. 2019-05-29 12:11:48 -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
fb07f0e805 Initial checkin. Compiles with Visual Studio 2019, or under Ubuntu Linux using either clang 3.8 or gcc 5.4. 2019-04-29 18:50:54 -07:00