Dali 3D User Interface Engine
Classes | Typedefs | Functions | Variables
Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp} Namespace Reference

Classes

struct  AstcFileHeader
 This struct defines the ASTC file header values. More...
 

Typedefs

typedef uint8_t Byte
 

Functions

struct
Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::AstcFileHeader 
__attribute__ ((__packed__))
 
Pixel::Format GetAstcPixelFormat (AstcFileHeader &header)
 Uses header information to return the respective ASTC pixel format. More...
 
bool LoadAstcHeader (FILE *const filePointer, unsigned int &width, unsigned int &height, AstcFileHeader &fileHeader)
 Internal method to load ASTC header info from a file. More...
 

Variables

const unsigned MAX_TEXTURE_DIMENSION = 4096
 
const unsigned MAX_IMAGE_DATA_SIZE = MAX_TEXTURE_DIMENSION * MAX_TEXTURE_DIMENSION
 
const unsigned int MINIMUM_ASTC_BLOCK_SIZE = 4
 
const unsigned int MAXIMUM_ASTC_BLOCK_SIZE = 12
 
const Byte FileIdentifier []
 
Pixel::Format AstcLinearBlockSizeToPixelFormatTable [][(MAXIMUM_ASTC_BLOCK_SIZE-MINIMUM_ASTC_BLOCK_SIZE)+1]
 This table allows fast conversion from an ASTC block size ([height][width]) to a pixel format. More...
 

Typedef Documentation

typedef uint8_t Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::Byte

Definition at line 51 of file loader-astc.cpp.

Function Documentation

struct Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::AstcFileHeader Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::__attribute__ ( (__packed__)  )
Pixel::Format Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::GetAstcPixelFormat ( AstcFileHeader &  header)

Uses header information to return the respective ASTC pixel format.

Parameters
[in]headerA populated AstcFileHeader struct
Returns
The pixel format, or INVALID if the block size was invalid

Definition at line 103 of file loader-astc.cpp.

References AstcLinearBlockSizeToPixelFormatTable, Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::AstcFileHeader::blockdim_x, Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::AstcFileHeader::blockdim_y, Dali::Pixel::INVALID, and MINIMUM_ASTC_BLOCK_SIZE.

Referenced by Dali::TizenPlatform::LoadBitmapFromAstc().

Here is the caller graph for this function:

bool Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::LoadAstcHeader ( FILE *const  filePointer,
unsigned int &  width,
unsigned int &  height,
AstcFileHeader &  fileHeader 
)

Internal method to load ASTC header info from a file.

Parameters
[in]filePointerThe file pointer to the ASTC file to read
[out]widthThe width is output to this value
[out]heightThe height is output to this value
[out]fileHeaderThis will be populated with the header data
Returns
True if the file is valid, false otherwise

Definition at line 125 of file loader-astc.cpp.

References DALI_LOG_ERROR, Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::AstcFileHeader::magic, MAX_TEXTURE_DIMENSION, Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::AstcFileHeader::xsize, Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::AstcFileHeader::ysize, and Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::AstcFileHeader::zsize.

Variable Documentation

Pixel::Format Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::AstcLinearBlockSizeToPixelFormatTable[][(MAXIMUM_ASTC_BLOCK_SIZE-MINIMUM_ASTC_BLOCK_SIZE)+1]
Initial value:

This table allows fast conversion from an ASTC block size ([height][width]) to a pixel format.

This could be done within a switch, but this way we have a constant time function. Note: As 4 is the minimum block size, 4 is subtracted from both the width and height to optimise size. IE. Table format is: Increasing order of block width from left-to-right: 4 -> 12 Increasing order of block height from top-to-bottom: 4 -> 12

Definition at line 85 of file loader-astc.cpp.

Referenced by GetAstcPixelFormat().

const Byte Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::FileIdentifier[]
Initial value:
= {
0x13, 0xAB, 0xA1, 0x5C
}

Definition at line 54 of file loader-astc.cpp.

Referenced by Dali::TizenPlatform::anonymous_namespace{loader-ktx.cpp}::CheckFileIdentifier().

const unsigned Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::MAX_IMAGE_DATA_SIZE = MAX_TEXTURE_DIMENSION * MAX_TEXTURE_DIMENSION

Definition at line 45 of file loader-astc.cpp.

const unsigned Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::MAX_TEXTURE_DIMENSION = 4096

Definition at line 43 of file loader-astc.cpp.

Referenced by LoadAstcHeader().

const unsigned int Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::MAXIMUM_ASTC_BLOCK_SIZE = 12

Definition at line 49 of file loader-astc.cpp.

const unsigned int Dali::TizenPlatform::anonymous_namespace{loader-astc.cpp}::MINIMUM_ASTC_BLOCK_SIZE = 4

Definition at line 48 of file loader-astc.cpp.

Referenced by GetAstcPixelFormat().

Dali Docs Home
Read more about Dali