Do precomputation only when needed.
This commit is contained in:
parent
7b433f08f3
commit
91ff256adf
@ -36,9 +36,11 @@
|
||||
|
||||
// squish
|
||||
#include "squish/colourset.h"
|
||||
//#include "squish/clusterfit.h"
|
||||
#include "squish/fastclusterfit.h"
|
||||
#include "squish/weightedclusterfit.h"
|
||||
|
||||
|
||||
// s3_quant
|
||||
#if defined(HAVE_S3QUANT)
|
||||
#include "s3tc/s3_quant.h"
|
||||
@ -217,8 +219,6 @@ void nv::compressDXT1(const Image * image, const OutputOptions::Private & output
|
||||
fit.SetColourSet(&colours, squish::kDxt1);
|
||||
fit.Compress(&block);
|
||||
|
||||
// @@ Use iterative cluster fit algorithm to improve error in production quality mode.
|
||||
|
||||
if (outputOptions.outputHandler != NULL) {
|
||||
outputOptions.outputHandler->writeData(&block, sizeof(block));
|
||||
}
|
||||
@ -235,8 +235,6 @@ void nv::compressDXT1a(const Image * image, const OutputOptions::Private & outpu
|
||||
ColorBlock rgba;
|
||||
BlockDXT1 block;
|
||||
|
||||
doPrecomputation();
|
||||
|
||||
squish::WeightedClusterFit fit;
|
||||
fit.SetMetric(compressionOptions.colorWeight.x(), compressionOptions.colorWeight.y(), compressionOptions.colorWeight.z());
|
||||
|
||||
@ -250,8 +248,6 @@ void nv::compressDXT1a(const Image * image, const OutputOptions::Private & outpu
|
||||
fit.SetColourSet(&colours, squish::kDxt1);
|
||||
fit.Compress(&block);
|
||||
|
||||
// @@ Use iterative cluster fit algorithm to improve error in highest quality mode.
|
||||
|
||||
if (outputOptions.outputHandler != NULL) {
|
||||
outputOptions.outputHandler->writeData(&block, sizeof(block));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user