mirror of
https://github.com/BinomialLLC/basis_universal.git
synced 2026-09-10 12:38:18 +00:00
Update README.md
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
# basis_universal
|
||||
Basis Universal GPU Texture/Video Compression Reference Encoder
|
||||
|
||||
Basis Universal is a ["supercompressed"](http://gamma.cs.unc.edu/GST/gst.pdf) GPU texture and video compression system that outputs a highly compressed intermediate file format (.basis) that can be quickly transcoded to a wide variety of GPU texture compression formats: PVRTC1 4bpp RGB, BC7 mode 6 RGB, BC1-5, ETC1, and ETC2. We will be adding ASTC RGB or RGBA, BC7 mode 4/5 RGBA, and PVRTC1 4bpp RGBA next. Basis files support non-uniform texture arrays, so cubemaps, volume textures, texture arrays, mipmap levels, video sequences with I-Frames and P-Frames using Conditional Replenishment (CR), or arbitrary texture "tiles" can be stored in a single file. The compressor is able to exploit color and pattern correlations across the entire file, so multiple images with mipmaps can be stored very efficiently in a single file. For video, the system is able to entirely skip blocks which don't change from the previous frame, which can be very effective.
|
||||
Basis Universal is a ["supercompressed"](http://gamma.cs.unc.edu/GST/gst.pdf) GPU texture and video compression system that outputs a highly compressed intermediate file format (.basis) that can be quickly transcoded to a wide variety of GPU texture compression formats: PVRTC1 4bpp RGB, BC7 mode 6 RGB, BC1-5, ETC1, and ETC2. We will be adding ASTC RGB or RGBA, BC7 mode 4/5 RGBA, and PVRTC1 4bpp RGBA next. Basis files support non-uniform texture arrays, so cubemaps, volume textures, texture arrays, mipmap levels, video sequences with I-Frames and P-Frames using Conditional Replenishment (CR), or arbitrary texture "tiles" can be stored in a single file.
|
||||
|
||||
The compressor is able to exploit color and pattern correlations across the entire file, so multiple images with mipmaps can be stored very efficiently in a single file. For video, the system is able to entirely skip blocks which don't change from the previous frame, which can be very effective on videos with mostly static backgrounds.
|
||||
|
||||
The system's bitrate depends on the quality setting and image content, but common usable bitrates are .3-1.25 bits/texel. .basis files are typically 10-25% smaller than using RDO texture compression of the internal texture data stored in the .basis file followed by LZMA. For video, the average bitrate will highly depend on how dynamic the content is, but we usually get around .3-.5 bits/texel on average across long video sequences. The current system is what we've been calling the "baseline" system, which is designed to reach all the GPU formats. The next major step is to extend the system to allow for much higher quality for the ASTC and BC7 texture formats.
|
||||
|
||||
@@ -63,7 +65,7 @@ To compress small video sequences, say using tools like ffmpeg and VirtualDub:
|
||||
|
||||
'basisu -slower -tex_type video -framerate 25 -stats -debug -multifile_printf "pic%04u.png" -multifile_num 200 -multifile_first 1 -max_selectors 16128 -max_endpoints 16128'
|
||||
|
||||
The reference encoder will take a LONG time and a lot of CPU to encode video, especially with -slower. (-slower is needed to generate better codebooks, which many videos need.) The more cores your machine has, the better. Basis is intended for smaller videos of a few dozen seconds or so. If you are very patient and have a Threadripper or Xeon workstation, you should be able to encode up to a few thousand 720P frames. Over time, we will be optimizing the codebook generators for higher performance, especially with video.
|
||||
We just added video to the system, and please be aware that we're still tuning and optimizing the system for video. The reference encoder will take a LONG time and a lot of CPU to encode video, especially with -slower. (-slower is needed to generate better codebooks, which many videos need.) The more cores your machine has, the better. Basis is intended for smaller videos of a few dozen seconds or so. If you are very patient and have a Threadripper or Xeon workstation, you should be able to encode up to a few thousand 720P frames. Over time, we will be optimizing the codebook generators for higher performance, especially with video.
|
||||
|
||||
The .basis file will contain multiple images (all using the same global codebooks), which you can retrieve using the transcoder's image API. For videos, the images must be requested from the transcoder in sequence from first to last, and random access is only allowed to I-Frames. Currently, the first image is always an I-Frame, and all subsequent images are P-Frames that can use CR. Videos can optionally contain mipmaps and alpha channels.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user