Data structure for a DXT1 compressed texture block. More...
Public Member Functions | |
void | Decompress (RGBAWord8_t *pOutput, uintptr_t uStride=sizeof(RGBAWord8_t) *4) const |
Decompress a single 4x4 block compressed with DXT1. | |
void | Compress (const RGBAWord8_t *pInput, uintptr_t uStride=sizeof(RGBAWord8_t) *4) |
Public Attributes | |
uint16_t | m_uRGB565Color1 |
First color endpoint in R5:G6:B5 little endian format. | |
uint16_t | m_uRGB565Color2 |
Second color endpoint in R5:G6:B5 little endian format. | |
uint8_t | m_uColorIndexes [4] |
2 bits per pixel color indexes for 4x4 tile | |
Data structure for a DXT1 compressed texture block.
This structure is a 1:1 mapping of a 8 byte DXT1 encoded data block used by many modern video cards. The 8 bytes represent the color for the 4x4 block.
The data compressor and decompresser are designed to be able to use frame buffers as input and output to reduce the need for intermediate buffers for speed.
void Burger::Dxt1Packet_t::Compress | ( | const RGBAWord8_t * | pInput, |
uintptr_t | uStride = sizeof(RGBAWord8_t) *4 ) |
void Burger::Dxt1Packet_t::Decompress | ( | RGBAWord8_t * | pOutput, |
uintptr_t | uStride = sizeof(RGBAWord8_t)*4 ) const |
Decompress a single 4x4 block compressed with DXT1.
Given an 8 byte block of DXT1 compressed data, extract the 4x4 RGBA color block.
pOutput | Pointer to the start of an array of sixteen RGBAWord8_t encoded 32 bit pixels |
uStride | Byte width of each scan line for the block of uncompressed data. The default is sizeof(RGBAWord8_t)*4 to create a single array of 16 RGBAWord8_t pixels in a linear row. |
uint8_t Burger::Dxt1Packet_t::m_uColorIndexes[4] |
2 bits per pixel color indexes for 4x4 tile
uint16_t Burger::Dxt1Packet_t::m_uRGB565Color1 |
First color endpoint in R5:G6:B5 little endian format.
uint16_t Burger::Dxt1Packet_t::m_uRGB565Color2 |
Second color endpoint in R5:G6:B5 little endian format.