Pyrogenesis  trunk
Classes | Macros | Functions
tex_dds.cpp File Reference
#include "precompiled.h"
#include "lib/byte_order.h"
#include "lib/bits.h"
#include "lib/timer.h"
#include "lib/allocators/shared_ptr.h"
#include "tex_codec.h"
Include dependency graph for tex_dds.cpp:

Classes

class  S3tcBlock
 
struct  S3tcDecompressInfo
 
struct  DDS_PIXELFORMAT
 
struct  DDS_HEADER
 

Macros

#define DDPF_ALPHAPIXELS   0x00000001
 
#define DDPF_FOURCC   0x00000004
 
#define DDPF_RGB   0x00000040
 
#define DDSD_CAPS   0x00000001
 
#define DDSD_HEIGHT   0x00000002
 
#define DDSD_WIDTH   0x00000004
 
#define DDSD_PITCH   0x00000008
 
#define DDSD_PIXELFORMAT   0x00001000
 
#define DDSD_MIPMAPCOUNT   0x00020000
 
#define DDSD_LINEARSIZE   0x00080000
 
#define DDSD_DEPTH   0x00800000
 
#define DDSCAPS_MIPMAP   0x00400000
 
#define DDSCAPS_TEXTURE   0x00001000
 

Functions

static void s3tc_decompress_level (size_t level, size_t level_w, size_t level_h, const u8 *RESTRICT level_data, size_t level_data_size, void *RESTRICT cbData)
 
static Status s3tc_decompress (Tex *t)
 
static bool is_valid_dxt (size_t dxt)
 
static Status decode_pf (const DDS_PIXELFORMAT *pf, size_t &bpp, size_t &flags)
 
static Status decode_sd (const DDS_HEADER *sd, size_t &w, size_t &h, size_t &bpp, size_t &flags)
 
 TIMER_ADD_CLIENT (tc_dds_transform)
 

Macro Definition Documentation

#define DDPF_ALPHAPIXELS   0x00000001
#define DDPF_FOURCC   0x00000004
#define DDPF_RGB   0x00000040
#define DDSCAPS_MIPMAP   0x00400000
#define DDSCAPS_TEXTURE   0x00001000
#define DDSD_CAPS   0x00000001
#define DDSD_DEPTH   0x00800000
#define DDSD_HEIGHT   0x00000002
#define DDSD_LINEARSIZE   0x00080000
#define DDSD_MIPMAPCOUNT   0x00020000
#define DDSD_PITCH   0x00000008
#define DDSD_PIXELFORMAT   0x00001000
#define DDSD_WIDTH   0x00000004

Function Documentation

static Status decode_pf ( const DDS_PIXELFORMAT pf,
size_t &  bpp,
size_t &  flags 
)
static
static Status decode_sd ( const DDS_HEADER sd,
size_t &  w,
size_t &  h,
size_t &  bpp,
size_t &  flags 
)
static
static bool is_valid_dxt ( size_t  dxt)
static
static Status s3tc_decompress ( Tex t)
static
static void s3tc_decompress_level ( size_t  level,
size_t  level_w,
size_t  level_h,
const u8 *RESTRICT  level_data,
size_t  level_data_size,
void *RESTRICT  cbData 
)
static
TIMER_ADD_CLIENT ( tc_dds_transform  )