Commit Graph

10 Commits

Author SHA1 Message Date
Rich Geldreich
12889dfe9d Adding -renorm option, manually merged from
29db2936fe
2020-03-22 23:53:05 -04: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
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
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
c7e14a97fa - Fixing minor block artifacts on pure 2 color B&W blocks when transcoding to BC1/BC7. This was caused by the ETC1S blocks using extreme ETC1S settings: codetable 7 (the one with the largest intensity deltas), using blocks with selectors that took up the full range (0-3), but the blocks only actually used the two outlier colors (0 and 3 only). The ETC1S->BC1/BC7 table based format conversion system doesn't realize that only the outlie colors were going to be used (i.e. not all 4 colors, just the outer 2), and so the quality of the transcoded block suffered because pure black could not be mapped. In BC7 mode, we now switch to pure BCT (block truncation coding) for any blocks with <= 2 unique colors, independent of their selectors.
- Adding -csv_file option, to generate .csv files for mass benchmarking/testing
- Adding -no_ktx option, to avoid writing large .KTX files while unpacking
- Fixing printf() format issue when one of the -multifile options wasn't correct
Rebuilt compiled javascript transcoder
2019-05-09 10:44:38 -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
33996b1a5f Important: Changing the Basis file version, so any existing files will need to be recompressed!
Adding new fields to the basis header: texture type and framerate. Texture type may be 2D, 2D array, video, volume, or cubemap array. The compressor makes sure that anything other than pure 2D follows certain constraints (cubemap arrays must have a multiple of 6 input images, videos/texture array images all must have the same resolution/# of mipmaps, etc.)
When unpacking cubemaps, the -unpack command now writes cubemap .KTX files which various tools like PVRTexTool support.
2019-05-02 16:09:11 -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