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