Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Burger::Dxt3Packet_t Struct Reference

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
 

Detailed Description

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.

Member Function Documentation

◆ Compress()

void Burger::Dxt3Packet_t::Compress ( const RGBAWord8_t * pInput,
uintptr_t uStride = sizeof(RGBAWord8_t) *4 )

◆ Decompress()

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.

Parameters
pOutputPointer to the start of an array of sixteen RGBAWord8_t encoded 32 bit pixels
uStrideByte 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.

Member Data Documentation

◆ m_uAlpha

uint8_t Burger::Dxt3Packet_t::m_uAlpha[8]

Array of 4 bits per pixel alpha.

◆ m_uColorIndexes

uint8_t Burger::Dxt3Packet_t::m_uColorIndexes[4]

2 bits per pixel color indexes for 4x4 tile

◆ m_uRGB565Color1

uint16_t Burger::Dxt3Packet_t::m_uRGB565Color1

First color endpoint in R5:G6:B5 little endian format.

◆ m_uRGB565Color2

uint16_t Burger::Dxt3Packet_t::m_uRGB565Color2

Second color endpoint in R5:G6:B5 little endian format.