Data structure for a DXT3 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 DXT3. | |
void | Compress (const RGBAWord8_t *pInput, uintptr_t uStride=sizeof(RGBAWord8_t) *4) |
Public Attributes | |
uint8_t | m_uAlpha [8] |
Array of 4 bits per pixel alpha. | |
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 DXT3 compressed texture block.
This structure is a 1:1 mapping of a 16 byte DXT3 encoded data block used by many modern video cards. The first 8 bytes represent the 4 bits per pixel alpha for the 4x4 block and the next 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::Dxt3Packet_t::Compress | ( | const RGBAWord8_t * | pInput, |
uintptr_t | uStride = sizeof(RGBAWord8_t) *4 ) |
void Burger::Dxt3Packet_t::Decompress | ( | RGBAWord8_t * | pOutput, |
uintptr_t | uStride = sizeof(RGBAWord8_t)*4 ) const |
Decompress a single 4x4 block compressed with DXT3.
Given a 16 byte block of DXT3 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::Dxt3Packet_t::m_uAlpha[8] |
Array of 4 bits per pixel alpha.
uint8_t Burger::Dxt3Packet_t::m_uColorIndexes[4] |
2 bits per pixel color indexes for 4x4 tile
uint16_t Burger::Dxt3Packet_t::m_uRGB565Color1 |
First color endpoint in R5:G6:B5 little endian format.
uint16_t Burger::Dxt3Packet_t::m_uRGB565Color2 |
Second color endpoint in R5:G6:B5 little endian format.