BrotliG::BrotligDataconditionParams
option of Brotli-G Encoder API allows the user to enable pre-conditioning for supported texture types and provides information about the texture that is required for pre-conditioning, such as width, height, pitch, and number of mip levels.
Copied!
brotlig.exe -precondition -texture-width 256 -texture-height 256 -row-pitch 2048 -num-mip-levels 5 abc.DDS
Pre-conditioning employs block swizzling and delta encoding of color. These can be enabled or disabled by setting BrotliG::BrotligDataconditionParams::swizzle
and BrotliG::BrotligDataconditionParams::delta_encode
flags, providing additional control.
If the texture is ill-formatted, compression is applied without pre-conditioning and a warning is displayed if the appropriate feedback function is provided.
Brotli-G currently supports pre-conditioning of BC1-5 textures. Supported texture formats are listed in the enum BROTLIG_DATA_FORMAT
(common/BrotligCommon.h). Textures with multiple mip levels are supported. Limits on textures sizes and mip levels can be found in common/BrotligConstants.h. For more usage details, refer to the help section of the sample application.
Note, a known issue on AMD Renoir causes the GPU Decoder to fail intermittently if pre-conditioning is applied.
The latest release of Brotli-G SDK is available on GitHub.