|
|
|
@ -32,45 +32,47 @@
|
|
|
|
|
namespace nvtt
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
struct CompressionOptions::Private
|
|
|
|
|
{
|
|
|
|
|
Format format;
|
|
|
|
|
|
|
|
|
|
Quality quality;
|
|
|
|
|
|
|
|
|
|
nv::Vector4 colorWeight;
|
|
|
|
|
|
|
|
|
|
// Pixel format description.
|
|
|
|
|
uint bitcount;
|
|
|
|
|
uint rmask;
|
|
|
|
|
uint gmask;
|
|
|
|
|
uint bmask;
|
|
|
|
|
uint amask;
|
|
|
|
|
uint8 rsize;
|
|
|
|
|
uint8 gsize;
|
|
|
|
|
uint8 bsize;
|
|
|
|
|
uint8 asize;
|
|
|
|
|
|
|
|
|
|
PixelType pixelType;
|
|
|
|
|
struct CompressionOptions::Private
|
|
|
|
|
{
|
|
|
|
|
Format format;
|
|
|
|
|
|
|
|
|
|
Quality quality;
|
|
|
|
|
|
|
|
|
|
nv::Vector4 colorWeight;
|
|
|
|
|
|
|
|
|
|
// Pixel format description.
|
|
|
|
|
uint bitcount;
|
|
|
|
|
uint rmask;
|
|
|
|
|
uint gmask;
|
|
|
|
|
uint bmask;
|
|
|
|
|
uint amask;
|
|
|
|
|
uint8 rsize;
|
|
|
|
|
uint8 gsize;
|
|
|
|
|
uint8 bsize;
|
|
|
|
|
uint8 asize;
|
|
|
|
|
|
|
|
|
|
PixelType pixelType;
|
|
|
|
|
uint pitchAlignment;
|
|
|
|
|
|
|
|
|
|
nv::String externalCompressor;
|
|
|
|
|
nv::String externalCompressor;
|
|
|
|
|
|
|
|
|
|
// Quantization.
|
|
|
|
|
bool enableColorDithering;
|
|
|
|
|
bool enableAlphaDithering;
|
|
|
|
|
bool binaryAlpha;
|
|
|
|
|
int alphaThreshold; // reference value used for binary alpha quantization.
|
|
|
|
|
|
|
|
|
|
// Quantization.
|
|
|
|
|
bool enableColorDithering;
|
|
|
|
|
bool enableAlphaDithering;
|
|
|
|
|
bool binaryAlpha;
|
|
|
|
|
int alphaThreshold; // reference value used for binary alpha quantization.
|
|
|
|
|
Decoder decoder;
|
|
|
|
|
|
|
|
|
|
uint getBitCount() const
|
|
|
|
|
{
|
|
|
|
|
if (format == Format_RGBA) {
|
|
|
|
|
if (bitcount != 0) return bitcount;
|
|
|
|
|
else return rsize + gsize + bsize + asize;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
uint getBitCount() const
|
|
|
|
|
{
|
|
|
|
|
if (format == Format_RGBA) {
|
|
|
|
|
if (bitcount != 0) return bitcount;
|
|
|
|
|
else return rsize + gsize + bsize + asize;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // nvtt namespace
|
|
|
|
|
|
|
|
|
|