MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / load_texel_u8

Function load_texel_u8

Source/astcenc_image.cpp:48–54  ·  view source on GitHub ↗

* @brief Load an 8-bit UNORM texel from a data array. * * @param data The data pointer. * @param base_offset The index offset to the start of the pixel. */

Source from the content-addressed store, hash-verified

46 * @param base_offset The index offset to the start of the pixel.
47 */
48static vfloat4 load_texel_u8(
49 const void* data,
50 size_t base_offset
51) {
52 const uint8_t* data8 = static_cast<const uint8_t*>(data);
53 return int_to_float(vint4(data8 + base_offset)) / 255.0f;
54}
55
56/**
57 * @brief Load a 16-bit fp16 texel from a data array.

Callers

nothing calls this directly

Calls 2

int_to_floatFunction · 0.70
vint4Class · 0.70

Tested by

no test coverage detected