Fix build. Minor cleanups.

pull/216/head
castano 14 years ago
parent cfdc731634
commit 1e0dea0738

@ -61,7 +61,7 @@ ELSE(NVTT_SHARED)
ADD_LIBRARY(nvtt ${NVTT_SRCS})
ENDIF(NVTT_SHARED)
TARGET_LINK_LIBRARIES(nvtt ${LIBS} nvcore nvmath nvimage squish)
TARGET_LINK_LIBRARIES(nvtt ${LIBS} nvcore nvmath nvimage squish bc6h)
INSTALL(TARGETS nvtt
RUNTIME DESTINATION bin

@ -29,6 +29,9 @@
#include "bc6h/zoh.h"
#include "bc6h/utils.h"
//#include "bc7/avpcl.h"
//#include "bc7/utils.h"
using namespace nv;
using namespace nvtt;
@ -52,3 +55,7 @@ void CompressorBC6::compressBlock(Tile & tile, AlphaMode alphaMode, const Compre
}
void CompressorBC7::compressBlock(Tile & tile, AlphaMode alphaMode, const CompressionOptions::Private & compressionOptions, void * output)
{
// @@ TODO
}

@ -29,16 +29,16 @@
namespace nv
{
struct CompressorBC6 : public TileCompressor
{
{
virtual void compressBlock(Tile & tile, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output);
virtual uint blockSize() const { return 16; }
};
virtual uint blockSize() const { return 16; }
};
struct CompressorBC7 : public TileCompressor
{
{
virtual void compressBlock(Tile & tile, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output);
virtual uint blockSize() const { return 16; }
};
virtual uint blockSize() const { return 16; }
};
} // nv namespace

@ -20,6 +20,8 @@ using namespace nv;
static int denom7_weights_64[] = {0, 9, 18, 27, 37, 46, 55, 64}; // divided by 64
static int denom15_weights_64[] = {0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64}; // divided by 64
/*static*/ Format Utils::FORMAT;
int Utils::lerp(int a, int b, int i, int denom)
{
nvDebugCheck (denom == 3 || denom == 7 || denom == 15);

@ -44,7 +44,7 @@ enum Format { UNSIGNED_F16, SIGNED_F16 };
class Utils
{
public:
static ::Format FORMAT; // this is a global -- we're either handling unsigned or unsigned half values
static ::Format FORMAT; // this is a global -- we're either handling unsigned or unsigned half values
// error metrics
static double norm(const nv::Vector3 &a, const nv::Vector3 &b);

@ -465,7 +465,7 @@ void ZOH::decompresstwo(const char *block, Tile &t)
// lookup
for (int y = 0; y < Tile::TILE_H; y++)
for (int x = 0; x < Tile::TILE_W; x++)
t.data[y][x] = palette[REGION(x,y,shapeindex)][indices[y][x]];
t.data[y][x] = palette[REGION(x,y,shapeindex)][indices[y][x]];
}
// given a collection of colors and quantized endpoints, generate a palette, choose best entries, and return a single toterr

Loading…
Cancel
Save